Sign In

@codespar/mcp-coinbase-cdp

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codespar/mcp-coinbase-cdp

MCP server for Coinbase Developer Platform (CDP) — single package covering Trading, Wallets, and Payments. Auth uses ES256 JWT signed with an ECDSA P-256 private key minted at portal.cdp.coinbase.com.

latest
npmnpm
Version
0.1.1
Version published
Weekly downloads
53
47.22%
Maintainers
2
Weekly downloads
 
Created
Source

@codespar/mcp-coinbase-cdp

MCP server for the Coinbase Developer Platform (CDP) — single npm package covering three CDP product surfaces under one key:

  • Trading — onchain swap / trade API
  • Wallets — Smart / Embedded / MPC wallet primitives
  • Payments — onchain outbound payment infrastructure

All three live on the same CDP account, share one ES256 JWT-signed key, and share one base URL (https://api.cdp.coinbase.com) — so they ship as one package, not three.

Positioning vs the rest of the catalog

ServerCoinbase surfaceAuth
@codespar/mcp-coinbaseAdvanced Trade exchange (legacy retail)HMAC API keys (CB-ACCESS-*)
@codespar/mcp-coinbase-commerceCommerce merchant gateway (accept BTC/ETH/USDC at checkout)API key (X-CC-Api-Key)
@codespar/mcp-coinbase-cdpDeveloper Platform (Trading + Wallets + Payments)ES256 JWT (this package)

Each surface has a separate API host, a separate key type, and a separate dashboard — they do not share credentials. Mint the right key for the surface you want.

Tools (15)

Trading (4)

ToolPurpose
list_quotesList recent swap quotes minted under the authenticated CDP account.
create_swapCreate an onchain swap between two assets.
get_swapGet a single swap by id — full status, executed amounts, gas, tx hash.
cancel_swapCancel a pending swap before it lands onchain.

Wallets (7)

ToolPurpose
create_walletCreate a new wallet (smart / embedded / MPC).
list_walletsList wallets under the authenticated CDP account.
get_walletGet a single wallet by id.
list_balancesList asset balances across all addresses + networks.
transferSend a transfer from a wallet to a destination address.
get_transactionGet a single transaction by id.
list_transactionsList historical transactions for a wallet.

Payments (4)

ToolPurpose
create_paymentCreate an onchain payment (outbound transfer to a payee).
list_paymentsList historical payments.
get_paymentGet a single payment by id.
cancel_paymentCancel a pending payment before it lands onchain.

Install

npm install -g @codespar/mcp-coinbase-cdp

Environment

COINBASE_CDP_KEY_NAME="organizations/<org>/apiKeys/<id>"
COINBASE_CDP_PRIVATE_KEY="-----BEGIN EC PRIVATE KEY-----
...
-----END EC PRIVATE KEY-----"

Mint the key (and download the PEM once — it is not recoverable later) at https://portal.cdp.coinbase.com. The same key authenticates Trading, Wallets, and Payments.

Important — the PEM must be the full multi-line block including BEGIN/END lines. When supplying via shell env, wrap in double quotes and preserve newlines (or use $'...' / a .env file).

Authentication

CDP signs every request with a fresh ES256 JWT in the Authorization: Bearer … header.

JWT claims (per request):

ClaimValue
subCOINBASE_CDP_KEY_NAME
iss"cdp"
aud["cdp_service"]
nbfnow (unix seconds)
expnow + 120
uri"<METHOD> api.cdp.coinbase.com<path>" (path includes any query string)

JWT header:

FieldValue
alg"ES256"
typ"JWT"
kidCOINBASE_CDP_KEY_NAME
noncerandom 16-byte hex (per request)

Signed with the ECDSA P-256 private key from COINBASE_CDP_PRIVATE_KEY. The PEM is imported once at startup and cached — only the JWT is minted per request.

Run

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

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

Enterprise

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

License

MIT

Keywords

mcp

FAQs

Package last updated on 22 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts