How AI agents get live FX quotes and pay out through MCP and Agent Skills
How an AI agent creates a live stablecoin quote, shows rate, fees, and expiry, waits for a human to confirm, and pays out through BlindPay's MCP server.
An AI agent gets a live FX quote by calling a payments API as a tool. With BlindPay's MCP server, an agent in Claude Code, Cursor, Codex, or another MCP host can create a payout quote, show the rate, fees, and expiry, wait for a person to confirm, and execute the payout before the 5-minute window closes.
Key takeaways
- Three surfaces: an MCP server for agent hosts, Agent Skills for domain knowledge, and the REST API for code-generating builders.
- The quote is the same binding quote a backend gets: rate, fees, amounts, and
expires_at, locked for 5 minutes by default. - Confirmation is the agent's job. Build an explicit "confirm" step into the prompt or the app before any money moves.
- Start on a free development instance, where the token is USDB and nothing real moves.
- Agents are also useful after the payout: status checks and quality reports run on the same tools.
What does an AI agent need to quote and pay out?
It needs tools to call, knowledge of how payments work, and credentials it cannot leak. BlindPay ships one surface for each, described in the Build with AI docs.
| Surface | What it gives the agent | Where it fits |
|---|---|---|
MCP server (@blindpay/mcp) | The BlindPay API as callable tools | Agent hosts: Claude Code, Codex, Cursor, Windsurf, and other MCP clients |
Agent Skills (blindpaylabs/skills) | Rails, corridors, fees, and API patterns as packaged knowledge | Any agent that loads skills, alongside MCP or on its own |
| REST API | Plain HTTP endpoints | Builders that generate code: Lovable, v0, Bolt, Replit |
The Model Context Protocol is an open-source standard for connecting AI applications to external tools and data. An MCP server turns an API into a list of tools the agent can discover and call. Skills are a separate layer: reusable instructions an agent loads to do a task well, installed through the open skills ecosystem with npx skills add.
For how agent payments fit with card and protocol initiatives, see agent payment protocols compared.
How do you connect an agent to BlindPay's MCP server?
Two environment variables and one command. In Claude Code:
Codex uses codex mcp add with the same arguments, and Cursor reads the same server block from .cursor/mcp.json. Then add the knowledge layer:
Use a development instance first. Development instances are free, run on testnets with USDB as the only token, and auto-complete payins, so an agent can rehearse the full flow without touching real money. Sandbox vs production covers what changes when you switch the key. Claude Code's own MCP documentation explains project-scoped .mcp.json files if you want the server checked into a repo.
What does a quote-to-payout run look like in an agent?
Six steps, each a tool call or a message to the human:
- Find the rail.
GetV1AvailableRailslists every payout rail, thenGetV1AvailableBankDetailsreturns the fields a bank account needs for the chosen rail. - Create the quote. The agent calls the payout quote tool with the bank account, amount,
currency_type,cover_fees, network, and token. - Show the numbers. Market rate, applied rate, each fee, what leaves, what arrives, and the expiry time.
- Wait for confirmation. Nothing executes until the human replies.
- Execute against the
quote_id. Beforeexpires_at. The funding step depends on where the stablecoins sit; see the payouts docs. - Report status.
GetV1InstancesPayoutsByIdreturns the payout and its status.
A prompt that encodes those rules:
Illustrative example. The agent requests a receiver-side quote: currency_type: "receiver", request_amount: 2500000 (R$25,000.00 in minor units), cover_fees: true. Suppose the quote returns a market rate (commercial_quotation) of 5.40, an applied rate (blindpay_quotation) of 5.373, and a 5.00 USDC flat fee added on top because the sender covers fees.
- USDC needed at the applied rate: 25,000 / 5.373 = 4,652.89
- Plus the flat fee: 4,652.89 + 5.00 = 4,657.89 USDC sent
- Delivered value at the market rate: 25,000 / 5.40 = $4,629.63
- All-in cost: (4,657.89 - 4,629.63) / 4,657.89 = 0.61%
The agent can show that last line too. Cost per delivered dollar explains the formula, and every number here is illustrative, not a BlindPay price.
How should an agent handle quote expiry?
Treat expiry as a normal path. A BlindPay quote expires 5 minutes after creation by default, and expires_at is epoch milliseconds. If the human replies after that, the agent requests a new quote, shows what changed, and asks again.
Three rules to put in the prompt:
- Never reuse an expired
quote_id. A quote backs one payout, and an expired one is rejected rather than executed at a new rate. - Quote late. Ask for the quote when the human is ready to decide, not at the start of a long conversation.
- Say what moved. If the new
receiver_amountorsender_amountdiffers, show the old and new numbers side by side.
For the same logic in application code, with retries and idempotency keys, see how to handle expired quotes in TypeScript and Python. The quote fields themselves are covered in stablecoin API quotes explained.
Which guardrails should wrap money-moving tools?
A human confirmation, a scoped key, and a log. The MCP specification says there should always be a human in the loop with the ability to deny tool invocations, and that applications should show confirmation prompts for operations. BlindPay's docs apply that to payments: build the confirmation step into the agent prompt or app flow before any payout, payin, or transfer executes.
| Guardrail | Why it matters | How to set it up |
|---|---|---|
| Explicit confirmation | Agents chain tool calls on their own | "Do not execute until I reply confirm" in the prompt, plus the host's tool approval |
| Development instance first | Mistakes cost nothing on testnets | Separate dev and production keys; USDB on dev |
| Scoped credentials | Limits what a confused agent can do | Give the agent only the key it needs, stored as an env var |
| Amount ceiling in the prompt | Catches a misread amount | "Refuse any payout above 5,000 USDC without a second confirmation" |
| Quote and payout ids in the transcript | Makes every action traceable | Ask the agent to print quote_id and payout_id |
Autonomous agents that chain many calls, such as OpenClaw, need the confirmation rule most. The connect an AI agent prompt packages these guardrails into a setup prompt you can paste.
Can an agent show a price before creating a quote?
Yes, on the payin side. POST /payin-quotes/fx returns an indicative rate and amount without creating a quote, so an agent can answer "roughly how much USDC will 10,000 BRL buy?" before committing to a binding, time-limited payin quote. Indicative rate vs binding quote explains when each one belongs in a flow, and the payin quotes docs list the fields.
How do agents help after the payout?
They answer status and quality questions in plain language. "Where is payout po_...?" maps to GetV1InstancesPayoutsById, which returns the same payout object your backend sees. Since October 2, 2026, the MCP server lists the authenticated status tools instead of the public tracking-page endpoints, which only answer BlindPay's shareable tracking pages.
Agents also make reporting cheaper. Ask for last week's payouts by corridor, then compute expiry rate and delivery success with the formulas in payout quality metrics. The vocabulary throughout follows the on/off-ramp liquidity glossary.
What about AI app builders without an MCP host?
They call the REST API from a backend route. Lovable, v0, Bolt, and Replit generate application code, so you paste a prompt describing a server function that creates a payout quote with POST /v1/instances/{instance_id}/quotes, shows the live quote, and executes the payout before it expires. The API key lives in the builder's secrets, never in client code. The Claude Code integration guide and its sibling pages cover each builder, and how to integrate a stablecoin API walks the same flow by hand.
What to do next
Add the BlindPay MCP server to your agent host with a development instance key, load Agent Skills, and paste the prompt above with a test bank account. Watch the agent quote, wait, and execute. Setup for every host is in the Build with AI docs.
Using agents to build the app itself? Build a neobank with AI agents covers the CLI, MCP setup, Agent Skills, and guardrails for payments.
This article is general information, not legal, tax, or financial advice.
FAQ
More payments articles
See all payments articlesStablecoin FX slippage: how live quotes turn the quoted rate into the rate you get
FX slippage is the gap between the rate a stablecoin on-ramp or off-ramp shows and the rate that settles. Why quote freshness is a liquidity signal, and how to check a quote-then-execute flow.
How to run batch payouts with live quotes: one quote per payout, expiry, and rate drift
How to pay 100+ recipients from USDC with live quotes: quote and execute per payout, size the funding, handle expiry and retries, and track the batch.
Cross-border checkout abandonment: 9 causes and fixes (2026)
Why international shoppers abandon checkout in 2026: missing local methods, FX surprises, declines, bad forms, silent status. How to confirm and fix each.