Skip to main content
Give your agent the card tools. Once a user has connected, your backend holds their connection token — point any spec-compliant MCP client at the Agentcard MCP server with that token and the tools load automatically. There is no service to build here: it’s a few lines of wiring in the agent you already run.

Instructions for your agent

Paste this into your coding agent to integrate the MCP server.
Instructions for your agent

How it works

  1. Your backend takes the connection token it stored when the user authenticated.
  2. Your agent’s MCP client connects to https://mcp.agentcard.sh/mcp with that token as the bearer.
  3. The tools load via tools/list, and every call the agent makes runs as that user — scoped to the cards your app created for them.

The flow

1

Get the user's connection token

The access_token returned when the user verified their one-time code. Keep it fresh with the refresh token — see user authentication.
2

Connect an MCP client

One client per user, pointed at https://mcp.agentcard.sh/mcp with Authorization: Bearer <connection token>. Any spec-compliant MCP client over Streamable HTTP works.
3

Register the tools dynamically

Expose everything tools/list returns rather than a hardcoded list — new tools ship into your agent automatically. See the MCP overview.
4

Handle approvals and expiry

Resolve approval_required responses with approve_request, and reconnect with a refreshed token when calls start returning 401.
Whether the agent acts on test or live cards is set by the OAuth client the user connected through — a sandbox client means test cards, a production client means live ones. See Production.

What your agent can do

Every tool has its own page with parameters, returns, and an example call. The main areas:

Cards

Create, pause, resume, and close cards, update limits, and list transactions.

Balance

Check the cash balance, add funds, and withdraw.

Shopping

The conversational buy tool covers the whole flow — search stores and products, build a cart, and check out.

Approvals & KYC

Approve sensitive actions and run identity verification when a tool asks for it.

Payment methods

Set up, list, and manage the user’s payment methods.

Rewards

Check and redeem rewards.

Account

Identify the connected user, manage their plan, settings, and connections.

Support

Open a support chat, send messages, and read replies.