Merchant-side crypto accept: buyer pays BTC/ETH/USDC at checkout, Coinbase settles to merchant's chosen crypto or fiat. Distinct from MoonPay/Transak (onramp) and UnblockPay (corridor) — zero overlap.
Coinbase Commerce gives your agent 18 tools it calls directly — pick the ones it needs, in Claude, Cursor, or any MCP client.
create_charge — Create a crypto charge — a one-time merchant invoice priced in local fiat that a buyer can settle in BTC, ETH, USDC, and other supported assets. Returns a hosted_url the buyer can be redirected to, plus per-asset payment addresses.retrieve_charge — Retrieve a charge by its Coinbase Commerce id OR its short code (the 8-character code embedded in the hosted URL). Returns current status, timeline, and payments.list_charges — List charges, newest first. Supports cursor pagination via starting_after / ending_before.// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("create_charge", { /* ... */ });$ npm install @codespar/mcp-coinbase-commerceAdd this entry to your claude_desktop_config.json (or any MCP-compatible client config).
{
"mcpServers": {
"coinbase-commerce": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-coinbase-commerce"
],
"env": {
"COINBASE_COMMERCE_API_KEY": "<your_coinbase_commerce_api_key>"
}
}
}
}After restart, your agent can call any of the 18 tools below — try create_charge first.
Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.
COINBASE_COMMERCE_API_KEYCoinbase Commerce API key. Create one at https://beta.commerce.coinbase.com/settings/security.
COINBASE_COMMERCE_API_VERSIONCoinbase Commerce API version pin (X-CC-Version header). Defaults to 2018-03-22.
COINBASE_COMMERCE_WEBHOOK_SECRETShared secret used to verify X-CC-Webhook-Signature on incoming webhooks. Only required for the verify_webhook_signature tool.
Each tool is independent — your agent loads only what it needs to reduce context and response time.
create_chargeretrieve_chargelist_chargescancel_chargeresolve_chargecreate_checkoutretrieve_checkoutlist_checkoutsMCP is a protocol — any framework that speaks it can mount this server.