AgentCard MCP Server
Give your AI agent a real payment method, straight from Claude, Cursor, or any MCP client. The agentcard-mcp server exposes AgentCard's purchase surface as MCP tools: request a card credential for a purchase, choosing the payment source — an AgentCard-issued single-use virtual Visa card by default (instant, amount-capped, live for 7 days), or one of your own connected Visa/Mastercard cards via network tokenization (experimental, passkey-approved per purchase).
Spending is guarded end to end: per-card caps, separate account budgets per payment source, a hard daily ceiling, and KYC verification.
Requirements
- Node.js 18+ on the machine running your MCP client. That's it — the server runs locally over stdio, wraps the
agentcardCLI vianpx, and needs no API keys or hosted infrastructure. Your session is stored at~/.agentcard/config.json.
Setup
Claude Desktop / Claude Code
Add to your MCP config (claude_desktop_config.json, or claude mcp add agentcard -- npx -y agentcard-mcp for Claude Code):
{
"mcpServers": {
"agentcard": {
"command": "npx",
"args": ["-y", "agentcard-mcp"]
}
}
}
Cursor
Add the same block to .cursor/mcp.json.
Windsurf / Cline / other MCP clients
Same configuration — npx -y agentcard-mcp as the command.
First-time account setup
Your agent can do all of this through the MCP tools, in order:
signup— pass your email; click the magic link it sends.setup— returns a Stripe URL for you to open and save a payment method (the agent never sees or types your real card). Also provisions your agent email inbox and wallet.check_identity— new accounts may need KYC; the tool returns a hosted verification URL to complete.
After that, cards issue instantly.
Tools
Account
| Tool | Description |
|---|---|
get_setup_instructions | Usage instructions for the agent |
signup | Sign up or log in with email (sends magic link) |
setup | Save a payment method (via a Stripe URL you open), agent email, wallet |
check_identity | Check KYC status; returns a verification URL when required |
get_limits | Show both spend budgets (issued cards + wallet, connected cards) |
request_limit_increase | Change a spend limit — raises are email-approved by the account owner |
Purchases
| Tool | Description |
|---|---|
create_card | Issue a single-use virtual Visa card ($1–$150; decimal totals round up) |
list_purchases | List all purchases across both payment sources, with unified statuses |
get_card_details | Re-fetch a live issued card's number/CVV/expiry, or a connected purchase's status |
cancel_card | Cancel an unused issued card and release its hold immediately |
get_3ds_code | Checkout 3DS / verification codes from the last 5 minutes |
report_issue | Report a problem to AgentCard support |
Connected cards (experimental)
| Tool | Description |
|---|---|
list_sources | List payment sources: the built-in issued-card source + enrolled cards |
connect_card | Enroll one of your own Visa/Mastercard cards (returns a browser URL) |
create_connected_purchase | Merchant-scoped purchase on a connected card (returns a passkey-approval URL) |
get_purchase_credentials | Retrieve the one-time card credential after you approve (returned exactly once) |
A typical purchase
- Agent calls
get_limitsto confirm budget. - Agent calls
create_cardwith the checkout total (e.g.24.99→ a $25 card). - Agent completes checkout with the returned card number, CVV, expiry, cardholder name (
Alchemy Agentcard), and billing address — exactly as returned. - If the merchant asks for a verification code, agent calls
get_3ds_code. - Done with the card early?
cancel_cardreleases the hold immediately; otherwise unused holds release within 7 days and you're only ever charged when a merchant actually uses a card.
For the experimental connected-card path: connect_card once (you enter your card in the browser), then create_connected_purchase per purchase — you approve each one with a passkey, and the agent retrieves a one-time, merchant-scoped credential with get_purchase_credentials.
Safety model
- The agent never handles your real card numbers — enrollment and payment-method setup happen in your browser via Stripe/Basis Theory.
- Issued cards are single-use and capped at the requested amount; connected credentials are single-use and merchant-scoped.
- Two separate account budgets (issued + wallet, connected) — raises require email approval by the account owner — plus a hard $200/day ceiling for normal direct accounts.
- One-time connected credentials require the authenticated session; browser approval links can approve a purchase but can never retrieve card numbers.
Troubleshooting
| Symptom | Fix |
|---|---|
| Tools return "Not logged in" | Run signup again — sessions expire |
create_card says no payment method | Run setup and open the returned Stripe URL |
| KYC verification required | Run check_identity and complete the returned URL |
| Over a spend limit | get_limits to see which budget tripped; request_limit_increase with that source |
| Connected enrollment fails | The card may not be supported by Visa Intelligent Commerce yet — use create_card |
| Anything else | report_issue with the error details |
Links
- Website: agentcard.ai
- Direct REST API reference: agentcard.ai/docs/api
- Agent (skill) instructions: agentcard.ai/skill
- CLI package: npmjs.com/package/agentcard
- MCP package: npmjs.com/package/agentcard-mcp