Talk to usGet started
Agents and SDKs

MCP server

One command gives any MCP client the six AgentPay tools. Claude Desktop, Claude Code, Cursor, and every other client that speaks the Model Context Protocol.

Configure

Add the server to your client's MCP configuration. The only setting is the API key.

JSON
{
  "mcpServers": {
    "agentpay": {
      "command": "npx",
      "args": ["-y", "@agentpay-global/mcp"],
      "env": { "AGENTPAY_API_KEY": "mk_live_your_key_here" }
    }
  }
}

Or run it by hand to check it starts:

cURL
AGENTPAY_API_KEY=mk_live_... npx -y @agentpay-global/mcp

The older variable name JOOMJOO_API_KEY is still read.

The six tools

ToolWhat it doesEndpoint
complete_purchaseHand AgentPay the whole checkout: task, merchant, cap, confirm_pay, idempotency_key, optional start_url. Preferred.POST /v1/checkout
get_checkout_statusPoll a checkout until it ends.GET /v1/checkout/{id}
issue_cardA real card with a cap, when the agent must type it itself.POST /v1/cards
get_spend_statusWas the card charged.GET /v1/spend/{id}
get_walletBalance, available, reserved, pending, and the cards that already hold money.GET /v1/wallet
create_topup_linkA Stripe page for the person when the wallet is short.POST /v1/wallet/funding-sessions

The tool descriptions carry the rules the agent must follow: never above the cap, one card per purchase, prefer the checkout, never ask the person for a card number or a one-time code, always send an idempotency key.

An agent that checks get_wallet before buying should read ready_to_spend, not available: an open card that already holds money pays a checkout whose total fits it.

npmjs.com/package/@agentpay-global/mcp