Connect your agent
One MCP client per user, pointed athttps://mcp.agentcard.sh/mcp with the user’s connection token as the bearer. Never share a client across users: the bearer decides whose cards the agent can see.
listTools() returns rather than a hardcoded list. Tools Agentcard ships later then appear without a deploy on your side. On 401, refresh the connection with your org token and reconnect.
Fund the balance
The balance is the user’s cash. Users add it in USD with Apple Pay or Google Pay, and it is held as USDC. From the agent,add_funds prepares a single-use checkout link and moves no money by itself. The user opens it and pays in their own browser:
add_funds sends the code and says where it went. Ask the user for it, call verify_phone, then call add_funds again. The verification stays fresh for 60 days.
From your server, the same thing is POST /api/v2/wallet/fund, which returns a checkout_url to show in your UI, and GET /api/v2/wallet/fund/{session_id} to learn when the money landed. Agentcard covers the provider fee: send the exact amount the user should receive.
get_balance shows what is spendable. A deposit that shows as “confirming” is already on the way. Do not ask the user to pay again.
Create a card
string
required
issued. Draw on the user’s balance. Without it, create_card may set up the user’s own card in the Vault instead.number
required
What the card can spend, in cents. Minimum 100. Connections through your organization have no maximum.
string
single_use (default) closes after the first approved charge. multi_use stays open until its limit is spent, for subscriptions or merchants that charge repeatedly. Optional expires_at auto-closes it.string
ai_labs locks the card to AI-lab merchants (OpenAI, Anthropic, Gemini). Anything else declines at authorization.create_card may return one of these first:
Every card arrives as a
card.created webhook.