mcp-coinbase-commerce — Coinbase Commerce MCP server: what it does
Gives an agent 18 Coinbase Commerce tools: bill a buyer in local fiat, take crypto at checkout, check a webhook signature.
claude mcp add --env COINBASE_COMMERCE_API_KEY=<COINBASE_COMMERCE_API_KEY> --env COINBASE_COMMERCE_API_VERSION=<COINBASE_COMMERCE_API_VERSION> --env COINBASE_COMMERCE_WEBHOOK_SECRET=<COINBASE_COMMERCE_WEBHOOK_SECRET> --transport stdio coinbase-commerce -- npx -y @codespar/mcp-coinbase-commerceWhat mcp-coinbase-commerce does
This server connects your agent to the merchant side of Coinbase Commerce. You price an order in local fiat, the buyer pays in BTC, ETH or USDC, and Coinbase settles to you in crypto or fiat. The toolset covers one-time charges, reusable hosted checkouts, directed invoices, event listings and exchange rates.
Requests carry two headers, X-CC-Api-Key and X-CC-Version. No key, no calls. Create the key in the Coinbase Commerce security settings and put it in COINBASE_COMMERCE_API_KEY. Pin the version yourself so a future API change on Coinbase's side does not break your integration quietly.
Webhook payloads are verified locally with HMAC-SHA256, which needs COINBASE_COMMERCE_WEBHOOK_SECRET. The default transport is stdio; an HTTP mode on MCP_PORT exists for testing between services. Charges can also be marked paid by hand through resolve_charge — worth keeping an eye on if you reconcile payments from more than event stream alone.
What it helps with
- bill a buyer in local currency and let them pay in crypto
- put a reusable payment link on a product page
- cancel an unpaid charge before it expires
- verify an incoming webhook signature before acting on it
- look up the current exchange rate for a base asset
Example prompts for the agent
- Create a charge for 49.90 EUR and give me the payment link
- List the latest events for that charge and tell me which are still unconfirmed
- Check the webhook signature in
payload.jsonagainst the secret in the environment
How to install mcp-coinbase-commerce
Platform CLI
claude mcp add --env COINBASE_COMMERCE_API_KEY=<COINBASE_COMMERCE_API_KEY> --env COINBASE_COMMERCE_API_VERSION=<COINBASE_COMMERCE_API_VERSION> --env COINBASE_COMMERCE_WEBHOOK_SECRET=<COINBASE_COMMERCE_WEBHOOK_SECRET> --transport stdio coinbase-commerce -- npx -y @codespar/mcp-coinbase-commerceReplace <…> with your own values
Platform CLI
codex mcp add coinbase-commerce --env COINBASE_COMMERCE_API_KEY=<COINBASE_COMMERCE_API_KEY> --env COINBASE_COMMERCE_API_VERSION=<COINBASE_COMMERCE_API_VERSION> --env COINBASE_COMMERCE_WEBHOOK_SECRET=<COINBASE_COMMERCE_WEBHOOK_SECRET> -- npx -y @codespar/mcp-coinbase-commerceReplace <…> with your own values
Config file
{
"mcpServers": {
"coinbase-commerce": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-coinbase-commerce"
],
"env": {
"COINBASE_COMMERCE_API_KEY": "<COINBASE_COMMERCE_API_KEY>",
"COINBASE_COMMERCE_API_VERSION": "<COINBASE_COMMERCE_API_VERSION>",
"COINBASE_COMMERCE_WEBHOOK_SECRET": "<COINBASE_COMMERCE_WEBHOOK_SECRET>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"coinbase-commerce": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codespar/mcp-coinbase-commerce"
],
"env": {
"COINBASE_COMMERCE_API_KEY": "<COINBASE_COMMERCE_API_KEY>",
"COINBASE_COMMERCE_API_VERSION": "<COINBASE_COMMERCE_API_VERSION>",
"COINBASE_COMMERCE_WEBHOOK_SECRET": "<COINBASE_COMMERCE_WEBHOOK_SECRET>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e COINBASE_COMMERCE_API_KEY=<COINBASE_COMMERCE_API_KEY> -e COINBASE_COMMERCE_API_VERSION=<COINBASE_COMMERCE_API_VERSION> -e COINBASE_COMMERCE_WEBHOOK_SECRET=<COINBASE_COMMERCE_WEBHOOK_SECRET> coinbase-commerce npx -y @codespar/mcp-coinbase-commerceReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-coinbase-commerce
How do I install mcp-coinbase-commerce in Claude Code?
One command: `claude mcp add mcp-coinbase-commerce -e COINBASE_COMMERCE_API_KEY=<COINBASE_COMMERCE_API_KEY> -e COINBASE_COMMERCE_WEBHOOK_SECRET=<COINBASE_COMMERCE_WEBHOOK_SECRET> -- npx -y @codespar/mcp-coinbase-commerce`. Use your own API key and webhook secret.
What does mcp-coinbase-commerce do?
It hands the agent Coinbase Commerce operations: create charges and checkout links, issue invoices, read events and rates, resolve a charge as paid.
What does the server need to run?
A COINBASE_COMMERCE_API_KEY from your Coinbase Commerce settings. The COINBASE_COMMERCE_WEBHOOK_SECRET is used to verify webhook signatures locally with HMAC-SHA256.