mcp-coinbase-cdp — Claude Code MCP server: what it does, install
Connects Coinbase Developer Platform APIs to your AI assistant. It handles crypto wallets, onchain asset swaps, and outbound transfers using a single key.
claude mcp add mcp-coinbase-cdp -e COINBASE_CDP_KEY_NAME=<COINBASE_CDP_KEY_NAME> -e COINBASE_CDP_PRIVATE_KEY=<COINBASE_CDP_PRIVATE_KEY> -- npx -y @codespar/mcp-coinbase-cdpWhat mcp-coinbase-cdp does
This server covers three areas of CDP: onchain swaps, wallet operations, and outgoing transfers. It exposes 15 tools to agents. Assistants can deploy smart or MPC wallets, monitor balances across networks, initiate token swaps, and track execution transactions.
It talks directly to https://api.cdp.coinbase.com. Unlike Coinbase Advanced Trade or Commerce APIs, CDP relies on per-request ES256 JWT signatures. The server imports your private key at boot and creates signed tokens for every outbound call.
Authentication fails if the multiline PEM key loses its line breaks inside environment variables. Download that private key immediately upon generation at Coinbase Portal, because the interface never displays it again.
What it helps with
- Spin up MPC and smart wallets on supported chains
- Query token balances across multiple addresses
- Execute or revoke onchain token swaps
- Send outbound crypto payments with status tracking
Example prompts for the agent
- List balances across all addresses linked to my CDP account.
- Create a new smart wallet and output its address.
- Check recent swap quotes and get gas details for the transaction.
How to install mcp-coinbase-cdp
Platform CLI
claude mcp add mcp-coinbase-cdp -e COINBASE_CDP_KEY_NAME=<COINBASE_CDP_KEY_NAME> -e COINBASE_CDP_PRIVATE_KEY=<COINBASE_CDP_PRIVATE_KEY> -- npx -y @codespar/mcp-coinbase-cdpReplace <…> with your own values
Platform CLI
codex mcp add coinbase-cdp --env COINBASE_CDP_KEY_NAME=<COINBASE_CDP_KEY_NAME> --env COINBASE_CDP_PRIVATE_KEY=<COINBASE_CDP_PRIVATE_KEY> -- npx -y @codespar/mcp-coinbase-cdpReplace <…> with your own values
Config file
{
"mcpServers": {
"coinbase-cdp": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-coinbase-cdp"
],
"env": {
"COINBASE_CDP_KEY_NAME": "<COINBASE_CDP_KEY_NAME>",
"COINBASE_CDP_PRIVATE_KEY": "<COINBASE_CDP_PRIVATE_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"coinbase-cdp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codespar/mcp-coinbase-cdp"
],
"env": {
"COINBASE_CDP_KEY_NAME": "<COINBASE_CDP_KEY_NAME>",
"COINBASE_CDP_PRIVATE_KEY": "<COINBASE_CDP_PRIVATE_KEY>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e COINBASE_CDP_KEY_NAME=<COINBASE_CDP_KEY_NAME> -e COINBASE_CDP_PRIVATE_KEY=<COINBASE_CDP_PRIVATE_KEY> coinbase-cdp npx -y @codespar/mcp-coinbase-cdpReplace <…> 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-cdp
How to install mcp-coinbase-cdp in Claude Code?
Run `claude mcp add mcp-coinbase-cdp -e COINBASE_CDP_KEY_NAME=<COINBASE_CDP_KEY_NAME> -e COINBASE_CDP_PRIVATE_KEY=<COINBASE_CDP_PRIVATE_KEY> -- npx -y @codespar/mcp-coinbase-cdp`.
How does this differ from the standard mcp-coinbase package?
The standard package targets the retail Advanced Trade API using HMAC authentication. This CDP server connects to developer infrastructure and uses ES256 JWT keys for wallet management and programmatic swaps.
Where do I generate the necessary credentials?
Generate your API key at portal.cdp.coinbase.com. Store the downloaded PEM file securely right away, as CDP does not let you retrieve it later.