Skip to content
Back to search

yolfi-agent-kit

Yolfi crypto payment integration skill and bundled local MCP server for Claude Code.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/yolfinance--yolfi-agent/badge.svg)](/listings/yolfinance--yolfi-agent)

HTML

<a href="/listings/yolfinance--yolfi-agent"><img src="/api/listings/yolfinance--yolfi-agent/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Node.js 18 or later is required. Run without a global install:

npx -y @yolfi/agent help
npx -y @yolfi/agent auth:status

If no local credential exists, start browser authorization:

npx -y @yolfi/agent setup --agent local-agent
# Open the returned loginUrl and complete owner authorization.
npx -y @yolfi/agent checkin --agent local-agent
npx -y @yolfi/agent auth:status

The agent should open the URL when its environment supports a browser and resume check-in after authorization. Repeated setup reuses an unexpired pending session from the same API environment. Account access must be checked with `auth:status`; this does not verify checkout or live webhook delivery.

Credentials and pending state are saved in `~/.yolfi/config.json` using atomic writes and process locking. Directory and file permissions are `0700` and `0600` where supported. `YOLFI_CONFIG_HOME` selects an isolated configuration directory. Explicit SDK credentials take precedence over `YOLFI_API_KEY`, which takes precedence over the stored local credential. Do not set a placeholder `YOLFI_API_KEY` when using browser authorization.

For an explicitly new account, the agent can use email-confirmed signup after the owner supplies or confirms the email and project name:

npx -y @yolfi/agent auth:agent-register \
  --email "owner@example.com" \
  --project-name "My product" \
  --agent-name "My coding agent" \
  --integration-intent accept_payments

The first call sends a confirmation link. After the owner opens it, the agent repeats the same command. A generated idempotency key and pending check-in token are persisted; an optional `--idempotency-key` must be 16-200 characters and reused on retries. The connected credential is stored without printing it. Existing emails use browser authorization instead. A lost initial signup response is recoverable; if the one-time credential response is lost after redemption, check `auth:status` and start browser authorization again if needed.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/plugin.json · Manifest · 13 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "name": "yolfi-agent-kit",
  3. "version": "0.2.1",
  4. "description": "Yolfi crypto payment integration skill and bundled local MCP server for Claude Code.",
  5. "author": {
  6. "name": "Yolfi",
  7. "url": "https://yolfi.com"
  8. },
  9. "homepage": "https://yolfi.com/ai-agent-kit",
  10. "repository": "https://github.com/yolfinance/yolfi-agent",
  11. "license": "MIT",
  12. "keywords": ["payments", "crypto", "stablecoins", "mcp", "checkout", "webhooks"]
  13. }
README.md · README · 212 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ![Yolfi Agent Kit: AI agent payment integration for crypto checkout](assets/ai-agent-payment.png)
  2. # Yolfi Agent Kit: AI Agent Payment Integration
  3. [![npm version](https://img.shields.io/npm/v/@yolfi/agent.svg)](https://www.npmjs.com/package/@yolfi/agent)
  4. [![MIT license](https://img.shields.io/npm/l/@yolfi/agent.svg)](LICENSE)
  5. [![Node.js 18+](https://img.shields.io/badge/node-%3E%3D18-0b7f79)](package.json)
  6. AI agent payment integration for crypto and stablecoin checkout. `@yolfi/agent` provides a local MCP server, a JSON CLI, a JavaScript SDK, and the Yolfi Payments Agent Skill for payment links, Checkout Sessions, payment status checks, and signed webhooks.
  7. For AI integration, copy this message to your agent in the project you want to integrate:
  8. ```text
  9. Add Yolfi payments to this project. Follow https://docs.yolfi.com/ai
  10. ```
  11. The agent inspects the project, reuses an existing connection or selects a supported connection method, reads the account settings, and implements the requested integration. The owner completes account authorization and supplies only decisions that are missing, such as a receiving wallet or product price. Connecting the account alone does not finish the integration.
  12. [Website](https://yolfi.com) | [Agent Kit](https://yolfi.com/ai-agent-kit) | [AI guide](https://docs.yolfi.com/en/agent-kit) | [Agent connection reference](https://docs.yolfi.com/en/agent-kit/connections) | [HTTP API](https://docs.yolfi.com/en/api) | [CLI reference](https://docs.yolfi.com/en/cli) | [npm](https://www.npmjs.com/package/@yolfi/agent) | [GitHub](https://github.com/yolfinance/yolfi-agent) | [MCP directory](https://glama.ai/mcp/servers/yolfinance/yolfi-agent)
  13. ## Languages
  14. [English](README.md), [Español](docs/i18n/README.es.md), [Deutsch](docs/i18n/README.de.md), [Français](docs/i18n/README.fr.md), [简体中文](docs/i18n/README.zh-CN.md), [Русский](docs/i18n/README.ru.md), [हिन्दी](docs/i18n/README.hi.md), [Türkçe](docs/i18n/README.tr.md), [한국어](docs/i18n/README.ko.md), [日本語](docs/i18n/README.ja.md).
  15. ## Choose your entry point
  16. - **AI integration:** send the message above. The [agent guide](https://docs.yolfi.com/ai) owns the workflow; [SKILL.md](SKILL.md) provides the packaged instructions.
  17. - **HTTP API:** use the [API guide](https://docs.yolfi.com/en/api) for authentication, request bodies, checkout, and webhooks.
  18. - **Terminal automation:** use the commands below and the [CLI reference](https://docs.yolfi.com/en/cli).
  19. - **JavaScript application:** install the SDK and use the server/runtime guidance below.
  20. ## Crypto payment integration features
  21. - Hosted checkout and one-time payment links for SaaS products, digital downloads, credits, games, and donations.
  22. - Recurring payment links for subscription flows supported by the Yolfi account.
  23. - Checkout Sessions for server-priced orders with a stable idempotency key for retries.
  24. - Payment status checks and webhook signature verification for the application's existing access and subscription logic.
  25. - Organization settings, selected settlement wallets, and independent webhook endpoints through the existing Yolfi API.
  26. Use the integration workflow with Codex, Claude Code, Cursor, ChatGPT, Claude, OpenClaw, Hermes, or another agent with a supported MCP connector or local tools. Browser and cloud environments need a supported remote connector when they cannot run commands. See the [connection reference](https://docs.yolfi.com/en/agent-kit/connections) for the available paths in each host.
  27. ## CLI installation and authorization
  28. Node.js 18 or later is required. Run without a global install:
  29. ```bash
  30. npx -y @yolfi/agent help
  31. npx -y @yolfi/agent auth:status
  32. ```
  33. If no local credential exists, start browser authorization:
  34. ```bash
  35. npx -y @yolfi/agent setup --agent local-agent
  36. # Open the returned loginUrl and complete owner authorization.
  37. npx -y @yolfi/agent checkin --agent local-agent
  38. npx -y @yolfi/agent auth:status
  39. ```
  40. The agent should open the URL when its environment supports a browser and resume check-in after authorization. Repeated setup reuses an unexpired pending session from the same API environment. Account access must be checked with `auth:status`; this does not verify checkout or live webhook delivery.
  41. Credentials and pending state are saved in `~/.yolfi/config.json` using atomic writes and process locking. Directory and file permissions are `0700` and `0600` where supported. `YOLFI_CONFIG_HOME` selects an isolated configuration directory. Explicit SDK credentials take precedence over `YOLFI_API_KEY`, which takes precedence over the stored local credential. Do not set a placeholder `YOLFI_API_KEY` when using browser authorization.
  42. For an explicitly new account, the agent can use email-confirmed signup after the owner supplies or confirms the email and project name:
  43. ```bash
  44. npx -y @yolfi/agent auth:agent-register \
  45. --email "owner@example.com" \
  46. --project-name "My product" \
  47. --agent-name "My coding agent" \
  48. --integration-intent accept_payments
  49. ```
  50. The first call sends a confirmation link. After the owner opens it, the agent repeats the same command. A generated idempotency key and pending check-in token are persisted; an optional `--idempotency-key` must be 16-200 characters and reused on retries. The connected credential is stored without printing it. Existing emails use browser authorization instead. A lost initial signup response is recoverable; if the one-time credential response is lost after redemption, check `auth:status` and start browser authorization again if needed.
  51. ## MCP server for crypto payments
  52. Use an already connected Yolfi server first. Connection selection depends on the tools available in the agent's environment, not just its brand. Full host setup instructions live in the [connection reference](https://docs.yolfi.com/en/agent-kit/connections).
  53. An authenticated MCP connection needs no additional organization API key. Continue through its tools, including Checkout Session creation; skip local CLI setup unless a separate local workflow is actually needed. Local MCP uses its stored browser-setup credential automatically. Application server credentials are a separate concern, described below.
  54. - Remote Streamable HTTP: `https://app.yolfi.com/mcp`, with OAuth managed by the MCP host.
  55. - Local stdio: `npx -y @yolfi/agent mcp`, using the protected local credential.
  56. A single local server provides payment tools, knowledge resources, and guided prompts:
  57. ```json
  58. {
  59. "mcpServers": {
  60. "yolfi": {
  61. "command": "npx",
  62. "args": ["-y", "@yolfi/agent", "mcp"]
  63. }
  64. }
  65. }
  66. ```
  67. The bundled Codex and Claude plugins start the local server. Local-only tools include `yolfi_agent_setup_start`, `yolfi_agent_checkin`, `yolfi_agent_register`, and `yolfi_webhooks_verify`. Remote MCP uses host OAuth. Verify it with `yolfi_auth_status` in that host, not a separate CLI login. An environment that cannot run commands must use a supported remote connector; the agent should explain only the required owner action if the host cannot configure it automatically.
  68. Core tools include organization read/update, settlement configuration, webhook endpoint list/create/update/rotation/removal, paylink list/get/create/disable, `yolfi_checkout_sessions_create`, `yolfi_checkout_sessions_get`, and payment create/status. Tool availability should be read from the connected server. Checkout Session tools and settlement merge require a backend that supports those endpoints; do not silently fall back to replacing organization settlement settings.
  69. ## Reuse resources before creating them
  70. ```bash
  71. npx -y @yolfi/agent organization:get
  72. npx -y @yolfi/agent paylinks:list --page 1 --rows 10
  73. npx -y @yolfi/agent webhooks:list
  74. ```
  75. Read all relevant pages and the project's existing configuration. Reuse approved wallets, prices, matching paylinks, and webhook endpoints. `settlement:configure` sends `PATCH /api/private/organization/settlement-accounts`, updating only supplied networks and preserving other networks. Changing an existing wallet still requires an owner-approved address.
  76. Create JSON payload files in the target project before passing them to `--json`; package examples are not automatically copied there. For example, after confirming these product values:
  77. ```bash
  78. cat > yolfi-paylink.json <<'JSON'
  79. {
  80. "name": "Premium Download",
  81. "price": "19",
  82. "currency": "USD",
  83. "type": "ONE_TIME",
  84. "collectEmail": true
  85. }
  86. JSON
  87. npx -y @yolfi/agent paylinks:create --json ./yolfi-paylink.json
  88. ```
  89. See [examples](examples/) for payload shapes. If create times out, list resources before retrying. Webhook create is not an upsert; creating the same URL twice creates independent endpoints with different secrets.
  90. ## Webhook secrets and deployment
  91. Local CLI/MCP create and rotate operations save the endpoint signing secret in the protected local config and return redacted metadata with `signingSecretStored: true`. Lists and updates never return the secret. Use the endpoint ID for local verification:
  92. ```bash
  93. npx -y @yolfi/agent webhooks:verify \
  94. --endpoint-id <endpointId> \
  95. --payload ./raw-webhook.json \
  96. --signature <signature>
  97. ```
  98. `YOLFI_WEBHOOK_SECRET` can supply a server/CI secret. Plaintext `--secret` flags and MCP `secret` arguments are not supported; use the endpoint ID or environment. An API key or an agent credential is never a webhook signing secret.
  99. Install the SDK for application code:
  100. ```bash
  101. npm install @yolfi/agent
  102. ```
  103. For a local provisioning script, `readWebhookSigningSecret(endpointId)` retrieves a stored secret. Pass it directly to the target deployment's secret manager or an existing ignored environment file without printing it. The app should read its deployed `YOLFI_WEBHOOK_SECRET`; it should not depend on a developer machine's `~/.yolfi`. Direct SDK create/rotate methods return the API response so trusted server code can store the secret itself.
  104. ```js
  105. import { readWebhookSigningSecret, verifyWebhookSignature } from '@yolfi/agent';
  106. // Provisioning script only: pass this value to your existing secret manager.
  107. const signingSecret = readWebhookSigningSecret(endpointId);
  108. if (!signingSecret) throw new Error('Stored endpoint secret is missing');
  109. // Application webhook handler: verify the raw body with the deployed secret.
  110. const valid = verifyWebhookSignature(rawBody, signature, process.env.YOLFI_WEBHOOK_SECRET);
  111. if (!valid) throw new Error('Invalid Yolfi webhook signature');
  112. ```
  113. Reuse a matching endpoint and its installed secret. If its secret is unavailable, explain the required recovery instead of silently rotating a live secret or creating a duplicate. Rotation and removal require explicit confirmation. Analytics endpoints use `NONE` without metadata filters; generic filters are optional flat string maps for explicit current-payment categories, never authorization or tenant routing.
  114. ## JavaScript SDK and application runtime
  115. Fixed-paylink checkout uses a public checkout URL. Public payment creation and status checks also need no organization API key. Keep the paylink ID in app configuration and verify access grants using signed webhook events or authoritative payment status.
  116. Dynamic, server-priced orders use authenticated Checkout Session creation. The backend calculates the amount and uses its own server credential; the MCP host's OAuth session is not an application credential. A deployed service needs an intentionally provisioned secret. Never copy host OAuth tokens into the app or assume a local CLI login exists in production.
  117. ```js
  118. import { YolfiClient } from '@yolfi/agent';
  119. if (!process.env.YOLFI_API_KEY) throw new Error('Server credential is not provisioned');
  120. const yolfi = new YolfiClient({ apiKey: process.env.YOLFI_API_KEY });
  121. const session = await yolfi.createCheckoutSession({
  122. amount: '19',
  123. currency: 'USD',
  124. merchantOrderId: 'order-123',
  125. clientReferenceId: 'user-123',
  126. }, { idempotencyKey: 'checkout-order-123' });
  127. ```
  128. Use `paylinkId` instead of `amount` and `currency` for a paylink-backed session. Standalone sessions require a stable idempotency key and support one-time payments. Public payment creation accepts `paylinkId` or `checkoutSessionId`, plus `network` and `symbol`; customer email must be supplied directly or already present in the session. Payment metadata and paylink `paymentMetadata` accept flat string, finite-number, or boolean values. `clientReferenceId` should be a stable app user/customer ID for subscription attribution.
  129. Choose the payment network and token from the organization's or paylink's supported-token catalog. Litecoin uses `network: "LTC"` and `symbol: "LTC"`; availability depends on the deployment and organization settings.
  130. The SDK `getApiKey()` reads the full organization API key when authorized. It is not a status check and must not be printed as diagnostic output. Use `authStatus()` for account verification.
  131. ## CLI commands
  132. ```bash
  133. npx -y @yolfi/agent organization:update --json ./organization.json
  134. npx -y @yolfi/agent settlement:configure --json ./settlement.json
  135. npx -y @yolfi/agent webhooks:add --name Application --url https://example.com/api/yolfi/webhook --adapter NONE
  136. npx -y @yolfi/agent webhooks:update --id <endpointId> --json ./endpoint.json
  137. npx -y @yolfi/agent webhooks:rotate-secret --id <endpointId> --confirm
  138. npx -y @yolfi/agent webhooks:remove --id <endpointId> --confirm
  139. npx -y @yolfi/agent paylinks:get --id <paylinkId>
  140. npx -y @yolfi/agent paylinks:disable --id <paylinkId> --confirm
  141. npx -y @yolfi/agent checkout-sessions:create --json ./checkout-session.json --idempotency-key <stable-order-key>
  142. npx -y @yolfi/agent checkout-sessions:get --id <checkoutSessionId>
  143. npx -y @yolfi/agent payments:create --json ./payment.json
  144. npx -y @yolfi/agent payments:status --id <paymentId>
  145. ```
  146. Operational commands print JSON. `help` prints usage text; `mcp` speaks the MCP protocol. Payload files must exist in your working directory. `organization:update` is a generic API update; use `settlement:configure` to preserve unmentioned networks.
  147. ## Verification
  148. Report account authorization, local tests, deployment configuration, and live payment/webhook verification separately. A redirect, a successful connection, or a local signature test is not proof that the full payment path works. Preserve the app's existing billing and entitlement logic, and do not create paid test activity merely to claim verification.
  149. Package checks: `npm run check`. No package publication or directory approval is implied by a local version or passing tests.

Version history

  • v0.2.110/28/2026

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.