Skip to main content
CO

Coinbase Commerce

v0.2.1API Key

Aceitação de cripto do lado merchant: o comprador paga BTC/ETH/USDC no checkout, a Coinbase liquida na cripto ou fiat escolhida pelo merchant. Distinto de MoonPay/Transak (onramp) e UnblockPay (corredor) — zero overlap.

18 ferramentas3 env vars🌐 GLOBALestável no npm

O que seu agente faz

O Coinbase Commerce dá ao seu agente 18 tools que ele chama direto — escolha as que precisar, no Claude, Cursor ou qualquer cliente MCP.

  • create_chargeCreate 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_chargeRetrieve 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_chargesList charges, newest first. Supports cursor pagination via starting_after / ending_before.
Exemplo de chamada
// 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", { /* ... */ });

Instalar

terminal
$ npm install @codespar/mcp-coinbase-commerce

Quickstart

Adicione esta entrada ao seu claude_desktop_config.json (ou a config de qualquer cliente compatível com MCP).

claude_desktop_config.json
{
  "mcpServers": {
    "coinbase-commerce": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-coinbase-commerce"
      ],
      "env": {
        "COINBASE_COMMERCE_API_KEY": "<your_coinbase_commerce_api_key>"
      }
    }
  }
}

Depois de reiniciar, seu agente pode chamar qualquer uma das 18 ferramentas abaixo — teste create_charge primeiro.

Variáveis de ambiente · 3

Necessárias pra autenticar o server. Armazenadas criptografadas ao usar a hospedagem gerenciada da CodeSpar.

COINBASE_COMMERCE_API_KEY
obrigatóriosecret

Coinbase Commerce API key. Create one at https://beta.commerce.coinbase.com/settings/security.

COINBASE_COMMERCE_API_VERSION
opcional

Coinbase Commerce API version pin (X-CC-Version header). Defaults to 2018-03-22.

COINBASE_COMMERCE_WEBHOOK_SECRET
opcionalsecret

Shared secret used to verify X-CC-Webhook-Signature on incoming webhooks. Only required for the verify_webhook_signature tool.

Ferramentas disponíveis · 18

Cada ferramenta é independente — seu agente carrega só o que precisa pra reduzir contexto e tempo de resposta.

WRITEcreate_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.
WRITEretrieve_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.
WRITElist_charges
List charges, newest first. Supports cursor pagination via starting_after / ending_before.
DELETEcancel_charge
Cancel a charge that has not yet been paid. Only charges in NEW status can be cancelled; once pending or completed the call will fail.
WRITEresolve_charge
Manually resolve a charge as paid. Used for out-of-band settlement (e.g. underpayment you accept, delayed confirmation you want to honour).
WRITEcreate_checkout
Create a reusable hosted checkout — think product-page-style link that can be paid multiple times. Good for evergreen SKUs and donation pages.
READretrieve_checkout
Retrieve a checkout by id.
READlist_checkouts
List reusable hosted checkouts, newest first. Cursor pagination via starting_after / ending_before.

Frameworks compatíveis

MCP é um protocolo — qualquer framework que o fale pode montar este server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Qualquer cliente MCPProtocolo

Perguntas frequentes

Rode `npx -y @codespar/mcp-coinbase-commerce` e adicione o bloco de config acima ao seu cliente MCP — Claude, Cursor, VS Code ou qualquer cliente compatível com MCP. Sem build, sem SDK. Prefere hospedado? O tier gerenciado da CodeSpar roda pra você, com a auth resolvida.
Coinbase Commerce — MCP server · 18 tools | CodeSpar