# mcp-coinbase-commerce

Gives an agent 18 Coinbase Commerce tools: bill a buyer in local fiat, take crypto at checkout, check a webhook signature.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 274
- Author: codespar
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/codespar/mcp-dev-latam/tree/HEAD/packages/crypto/coinbase-commerce
- Updated: 2026-09-27
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-coinbase-commerce

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `COINBASE_COMMERCE_API_KEY`, `COINBASE_COMMERCE_API_VERSION`, `COINBASE_COMMERCE_WEBHOOK_SECRET` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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-commerce
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
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-commerce
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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-commerce
```
Replace <…> with your own values

## When to use it
- 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
- 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.json` against the secret in the environment

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44583
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5458
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2814
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2188
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

From the same set: [codespar/mcp-dev-latam](https://affpapa.org/en/nevibecode/by/codespar/mcp-dev-latam.md) — 40 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
