mcpField
M
mcp-coinbase-commerce

mcp-coinbase-commerce

Local
github.com/codesparFinance275Updated 4w ago

About mcp-coinbase-commerce

mcp-coinbase-commerce is an MCP server for Coinbase Commerce, which lets merchants accept crypto payments. Merchants price orders in local fiat while buyers settle in assets such as BTC, ETH or USDC. It suits merchants and developers who want an agent to create charges, invoices and checkout pages.

Key features

  1. 01Create crypto charges priced in fiat
  2. 02Reusable hosted checkout pages
  3. 03Directed invoices sent to named recipients
  4. 04Exchange rate and payment event lookup
  5. 05Local webhook signature verification

Use cases

  1. 01Having an agent generate crypto payment links for buyers
  2. 02Managing reusable checkout pages for products
  3. 03Tracking charge status and reviewing webhook events

MCP support

The server exposes 18 MCP tools covering charges, checkouts, invoices, events and exchange rates for MCP clients to call.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-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>"
}
}
}
}
Run commandnpx -y @codespar/mcp-coinbase-commerce
Environment variables to set
COINBASE_COMMERCE_API_KEYSecretCoinbase 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_SECRETSecretShared secret used to verify X-CC-Webhook-Signature on incoming webhooks. Only required for the verify_webhook_signature tool.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@codespar/mcp-coinbase-commerce0.2.2

Tools

18

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
namestringYesShort product/order name shown on the hosted payment page
metadataobjectNoArbitrary JSON you want echoed back on events (customer_id, order_id, etc.)
cancel_urlstringNoBrowser redirect if the buyer abandons the hosted page
descriptionstringYesLonger human-readable description of what the buyer is paying for
local_priceobjectNoFiat-denominated price the charge is quoted in. Required when pricing_type is fixed_price.
local_price.amountstringYesAmount as a decimal string (e.g. "29.90")
local_price.currencystringYesISO-4217 fiat currency code (e.g. USD, BRL, EUR, MXN)
pricing_typeenumYesfixed_price: exact amount in local_price. no_price: buyer chooses (donations).fixed_price | no_price
redirect_urlstringNoBrowser redirect after a successful payment

Details

From the project README

@codespar/mcp-coinbase-commerce

MCP server for Coinbase Commerce — global crypto merchant payments.

Coinbase Commerce is the merchant-accept side of crypto. Your store prices an order in local fiat (USD, BRL, EUR, MXN, ...), the buyer settles in BTC / ETH / USDC / and other supported assets, and Coinbase settles to you in the crypto or fiat of your choice.

Positioning vs the rest of the catalog

ServerUse caseDirection
@codespar/mcp-coinbase-commerceMerchants accept crypto at checkoutBuyer pays merchant
@codespar/mcp-unblockpayBRL / MXN <-> USDC corridorValue transfer
@codespar/mcp-moonpayEnd-user fiat <-> crypto (100+ assets)Onramp / offramp
@codespar/mcp-transakEnd-user fiat <-> crypto (broad geo)Onramp / offramp

Use Coinbase Commerce when an agent needs to bill a buyer in crypto — hosted charge page, reusable checkout, or directed invoice.

Tools (18)

ToolPurpose
create_chargeCreate a crypto charge — a one-time merchant invoice priced in local fiat that a buyer can settle in BTC, E...
retrieve_chargeRetrieve a charge by its Coinbase Commerce id OR its short code (the 8-character code embedded in the hoste...
list_chargesList charges, newest first.
cancel_chargeCancel a charge that has not yet been paid.
resolve_chargeManually resolve a charge as paid.
create_checkoutCreate a reusable hosted checkout — think product-page-style link that can be paid multiple times.
retrieve_checkoutRetrieve a checkout by id.
list_checkoutsList reusable hosted checkouts, newest first.
update_checkoutUpdate an existing reusable checkout.
delete_checkoutDelete a reusable checkout.
list_eventsList events — the lifecycle signals (charge:created, charge:confirmed, charge:failed, charge:delayed, charg...
retrieve_eventRetrieve a single event by id.
create_invoiceCreate an invoice — a directed bill sent to a specific named recipient.
retrieve_invoiceRetrieve an invoice by code.
list_invoicesList invoices, newest first.
void_invoiceVoid an unpaid invoice.
list_exchange_ratesFetch current Coinbase exchange rates for a base asset (e.g.
verify_webhook_signatureLocal helper — verify a Coinbase Commerce webhook payload using HMAC-SHA256.

Install

npm install @codespar/mcp-coinbase-commerce

Environment

COINBASE_COMMERCE_API_KEY="..."         # API key (required, secret)
COINBASE_COMMERCE_API_VERSION="..."     # Optional. Defaults to 2018-03-22.

Create an API key at https://beta.commerce.coinbase.com/settings/security.

Authentication

Every request carries two headers:

X-CC-Api-Key: <COINBASE_COMMERCE_API_KEY>
X-CC-Version: 2018-03-22

The version header is required. Pin it so future API changes don't silently break your integration.

Run

# stdio (default — for Claude Desktop, Cursor, etc)
npx @codespar/mcp-coinbase-commerce

# HTTP (for server-to-server testing)
MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-coinbase-commerce

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.