AI Agent Payments: Crypto Checkouts from Claude Code via MCP
AI agent payments can mean two things. One is agents that pay: an AI assistant buys something or pays for an API call on its own, using a payment protocol such as x402. The other is agents that run payments for a business: a coding agent such as Claude Code creates a checkout, a subscription or a product by calling a payment API through an MCP server.
OrcaRail does the second today. Its MCP server lets Claude Code, Cursor and Codex create crypto payment intents and subscriptions that customers pay in USDC, USDT or other tokens. This post explains both meanings, what the OrcaRail MCP server does, and how to connect it safely in a sandbox.
What are AI agent payments
| Agents that pay | Agents that run payments | |
|---|---|---|
| What happens | The agent pays a merchant or an API for its user | The agent creates checkouts, subscriptions and products for your business |
| Who pays | The agent, with funds its user allows | Your customer, on a checkout the agent created |
| Built on | Payment protocols such as x402, AP2 and ACP | A payment API and its MCP server |
| Example | An agent pays per request to use a paid API | "Create a 25 USD payment link in USDC and give it to me" |
| OrcaRail today | Not offered | Yes: the @orcarail/mcp server |
AI agent payment protocols: x402, AP2 and ACP
These protocols define how an agent pays. Here is how each one describes itself, checked on 11 November 2026:
- x402 calls itself "an open, neutral standard for internet-native payments." When a request arrives without payment, the server answers with HTTP 402 (Payment Required), and the client pays and retries. The site says x402 works on EVM chains and Solana, and that stablecoin payments are the main use case.
- AP2, the Agent Payments Protocol, is "an open protocol for the emerging Agent Economy," published by Google (announcement). Its site includes sample flows that pay with x402.
- ACP, the Agentic Commerce Protocol, is "an open standard for programmatic commerce flows between buyers, AI agents, and businesses."
OrcaRail does not offer x402, AP2 or ACP payments today. If you sell to people, you still need checkouts, subscriptions and webhooks, and an MCP server lets an agent build and run those for you.
Payment APIs with an MCP server for Claude Code
An MCP (Model Context Protocol) server gives an AI agent a set of tools for one API. OrcaRail ships one as @orcarail/mcp:
- How it runs: locally over stdio, with Node.js 18 or later.
- How it connects: your OrcaRail API key and secret, passed as environment variables.
- Clients: Claude Code, Cursor, Codex, Claude Desktop and any client that supports stdio MCP servers.
- What it does: creates crypto checkouts and subscriptions paid in USDC, USDT and other tokens, with each payment forwarded to your own wallets.
Claude Code adds it with claude mcp add, as shown below.
What the OrcaRail MCP server can do
@orcarail/mcp has 27 tools, named resource.action:
| Group | Tools | Needs an API key |
|---|---|---|
| Payment intents | payment_intents.create, .retrieve, .update, .confirm, .complete, .cancel, .simulate (sandbox only) | Yes |
| Subscriptions | subscriptions.create, .retrieve, .update, .cancel, .resume, .list, .list_payment_links | Yes |
| Products | products.list, .create, .update, .delete | Yes |
| Prices | prices.list, .create, .update, .deactivate | Yes |
| Account | account.get_mode | No |
| Rates | rates.get_fiat_quote, rates.list_currencies | No |
| Hosted pay pages | pay.get_by_slug, pay.cancel_by_slug | No |
You talk to it in plain language, for example:
- "Create a product called Pro Plan with a $29/month recurring price."
- "List my active subscriptions and cancel the one for
[email protected]at period end." - "How much is 500 EUR in USDC right now?"
- "What's the status of payment intent
550e8400-…?"
Payment intents and prices need a token ID and a network ID (UUIDs), and the server has no tool that lists them. Give your agent the IDs from Networks and tokens, or use a price you already created (price_id).
How to connect Claude Code to OrcaRail
-
Create a sandbox. Sign up at app.orcarail.com, create a sandbox organization and an
ak_test_API key with its secret. A sandbox works only on testnets, so no real funds move. -
Add the server to Claude Code. It needs Node.js 18 or later. Pass the key as environment variables, not as command-line flags:
claude mcp add orcarail \-e ORCARAIL_API_KEY=ak_test_xxx \-e ORCARAIL_API_SECRET=sk_test_xxx \-- npx -y @orcarail/mcp --tools=all -
Check it with
claude mcp list. Then ask Claude Code "Which OrcaRail mode am I in?". It callsaccount.get_mode, which should returnsandbox. -
Create a checkout. For example: "Create a payment intent for price
<price-id>with return URLhttps://example.com/thanks, confirm it and give me the pay link." The agent callspayment_intents.create, thenpayment_intents.confirm. -
Test it. Ask "Simulate the payment." The
payment_intents.simulatetool completes the payment intent without a wallet and fires the usual webhooks. Simulated payments are never withdrawable. With a real payment, callpayment_intents.completeafter the customer returns to your success URL; until then the payment is not final. -
Limit the tools. Replace
--tools=allwith only what the agent needs, for example--tools=payment_intents.create,payment_intents.retrieve,subscriptions.list, so it cannot cancel subscriptions or delete products. -
Go live only when you are ready, with a live organization's
ak_live_key. In live mode the server tells the agent that real funds are involved and asks it to confirm with you before any create, confirm, complete, cancel, update or delete.
Using Cursor or Codex? Add the same command to .cursor/mcp.json or ~/.codex/config.toml. The MCP server guide has each config file.
Safety rules for giving an agent payment access
- Start in a sandbox. An
ak_test_key works only on testnets. A live key moves real funds. - Keep keys out of shell history and git. Use environment variables, and never commit a config file that contains a live key.
- Expose only the tools you need with
--tools. - Check the mode before any write.
account.get_modereturnslive,sandboxorpublic. - Rotate a key in the dashboard if it may have leaked.
The agent never holds the money. Customers pay on the hosted pay page, and each payment is forwarded to withdrawal addresses you control.
Build the rest of the integration with AI
The MCP server runs payments. To build the integration into your app, give your agent the docs as plain text: llms.txt lists every page, and Build with AI has tips. For the code itself, see payment gateway integration and the stablecoin payment API guide.
FAQ
Is it safe to give an AI agent my payment API key?
Use a sandbox key while you build: an ak_test_ key works only on testnets, so no real funds move. Before you use a live key, limit the tools with --tools, keep the key in environment variables, and have the agent confirm each write with you, which the OrcaRail server asks for in live mode. Rotate any key that may have leaked.
Which payment APIs have an MCP server for Claude Code?
OrcaRail has one: @orcarail/mcp. Claude Code adds it with claude mcp add, and it creates crypto checkouts and subscriptions paid in USDC, USDT and other tokens. See the MCP server guide.
What is an AI agent payment protocol?
A standard for how an agent pays. x402 uses the HTTP 402 status code so that a client can pay for a request and retry it, mostly with stablecoins. AP2, published by Google, is an open protocol for agent payments. ACP covers checkout and the sharing of payment credentials between agents and businesses.
Can an AI agent accept crypto payments for my business?
Yes, through an MCP server. With OrcaRail, the agent creates a payment intent and gives you the hosted pay link. Your customer pays in USDC, USDT or another supported token, and the payment is forwarded to your wallets. OrcaRail charges 0.5% per completed transaction, and the first 100 are free. See pricing.
Does OrcaRail support x402?
Not today. OrcaRail's tools for AI agents are the MCP server and the plain-text docs, and customers pay through hosted checkouts and subscriptions.
