---
title: "How AI agents get live FX quotes and pay out through MCP and Agent Skills"
seoTitle: "How AI agents get live FX quotes and pay out via MCP"
description: "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."
date: "2026-10-13"
updated: "2026-10-13"
category: "payments"
author: "BlindPay Team"
faq:
  - q: "Can an AI agent get a live FX quote?"
    a: "Yes. An agent connected to a payments API through the Model Context Protocol can call a quote tool the same way a backend calls an endpoint. With BlindPay's MCP server, an agent in Claude Code, Cursor, Codex, or Windsurf can create a payout or payin quote and read the rate, fees, amounts, and expiry from the response."
  - q: "How do I connect Claude Code to BlindPay?"
    a: "Run claude mcp add blindpay with two environment variables, BLINDPAY_API_KEY and BLINDPAY_INSTANCE_ID, pointing at npx -y @blindpay/mcp, or add the same server to your project's .mcp.json. Then load Agent Skills with npx skills add blindpaylabs/skills so the agent knows BlindPay's rails, corridors, and API patterns. Start on a development instance."
  - q: "Should an AI agent execute payouts without confirmation?"
    a: "No. The MCP specification says there should always be a human in the loop with the ability to deny tool invocations, and BlindPay's docs ask you to build a confirmation step into the agent prompt or app flow before any payout, payin, or transfer executes. Have the agent show the quote and wait for an explicit reply."
  - q: "What happens if the quote expires while the agent waits?"
    a: "The quote can no longer back a payout. BlindPay quotes expire 5 minutes after creation by default, and the response carries expires_at in epoch milliseconds. The agent should request a new quote, show the new numbers, and ask for confirmation again, rather than executing against the old quote id."
  - q: "Do AI app builders like Lovable or v0 use the MCP server?"
    a: "They use the REST API instead. Lovable, v0, Bolt, and Replit generate application code rather than hosting MCP tools, so you paste a prompt that describes a backend route calling BlindPay's quote and payout endpoints, and store the API key as a server-side secret. The key never goes into client code."
---

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](/docs/build-with-ai).

| 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](https://modelcontextprotocol.io/docs/getting-started/intro) 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](https://skills.sh/) with `npx skills add`.

For how agent payments fit with card and protocol initiatives, see [agent payment protocols compared](/resources/more/agent-payment-protocols-compared).

## How do you connect an agent to BlindPay's MCP server?

Two environment variables and one command. In Claude Code:

```bash
claude mcp add blindpay \
  --env BLINDPAY_API_KEY=YOUR_API_KEY \
  --env BLINDPAY_INSTANCE_ID=in_000000000000 \
  -- npx -y @blindpay/mcp
```

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:

```bash
npx skills add blindpaylabs/skills
```

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](/resources/more/stablecoin-api-sandbox-vs-production) covers what changes when you switch the key. Claude Code's own [MCP documentation](https://code.claude.com/docs/en/mcp) 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:

1. **Find the rail.** `GetV1AvailableRails` lists every payout rail, then `GetV1AvailableBankDetails` returns the fields a bank account needs for the chosen rail.
2. **Create the quote.** The agent calls the payout quote tool with the bank account, amount, `currency_type`, `cover_fees`, network, and token.
3. **Show the numbers.** Market rate, applied rate, each fee, what leaves, what arrives, and the expiry time.
4. **Wait for confirmation.** Nothing executes until the human replies.
5. **Execute against the `quote_id`.** Before `expires_at`. The funding step depends on where the stablecoins sit; see the [payouts docs](/docs/payouts).
6. **Report status.** `GetV1InstancesPayoutsById` returns the payout and its status.

A prompt that encodes those rules:

```text
Use the BlindPay tools to create a payout quote that delivers exactly
25,000 BRL to bank account ba_000000000000, with cover_fees true.
Show me the market rate, the applied rate, every fee, the USDC I send,
and when the quote expires. Do not execute until I reply "confirm".
If the quote expires first, request a new one and show me the new numbers.
```

**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](/resources/more/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_amount` or `sender_amount` differs, 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](/resources/more/handle-expired-quotes-typescript-python). The quote fields themselves are covered in [stablecoin API quotes explained](/resources/more/stablecoin-api-quotes-explained).

## Which guardrails should wrap money-moving tools?

A human confirmation, a scoped key, and a log. The [MCP specification](https://modelcontextprotocol.io/specification/2025-06-18/server/tools) 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](/prompts/connect-ai-agent-mcp) 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](/resources/more/indicative-rate-vs-binding-quote-api) explains when each one belongs in a flow, and the [payin quotes docs](/docs/payin-quotes) 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](/resources/more/payout-quality-metrics-slippage-expiry-rate). The vocabulary throughout follows the [on/off-ramp liquidity glossary](/resources/more/onramp-offramp-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](/docs/integrations/claude-code) and its sibling pages cover each builder, and [how to integrate a stablecoin API](/resources/more/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](/docs/build-with-ai).

*This article is general information, not legal, tax, or financial advice.*
