Mcp Coinbase Cdp

io.github.codespar由 GitHub 账号 codespar 发布v0.1.1更新于 Oct 24, 2026

MCP server for Coinbase Developer Platform (CDP) — Trading, Wallets, Payments under one CDP key

已验证STDIO仅桌面金融商业与电商

概览

AI 生成的概览

面向 Coinbase Developer Platform 的本地 MCP 服务器,让助手用同一把 CDP 密钥管理兑换、钱包和链上支付。

可以做什么
列出、创建、查询和取消链上兑换,包括状态、成交数量、gas 和交易哈希。创建和列出钱包、按 id 获取钱包,并列出跨地址和网络的资产余额。从钱包发起转账,并查询单笔或历史交易。创建、列出、查询和取消向收款方的链上对外支付。
适用场景
当你想在桌面 MCP 客户端中让助手操作 Coinbase Developer Platform 的交易、钱包或支付功能,而不是使用单独的 Advanced Trade 或 Commerce 服务器时使用。
运行要求
以 npm 包形式在本地运行(需要 Node.js),默认走 stdio;设置 MCP_HTTP 后可通过 HTTP 运行。需要 CDP 账户和两个环境变量:COINBASE_CDP_KEY_NAME(密钥 id)和 COINBASE_CDP_PRIVATE_KEY(完整 PEM 块,含 BEGIN/END 行)。需要访问 CDP API 主机的网络。
安装前请注意
私钥是用于签署每个请求的机密,避免写入日志或共享配置;该 PEM 只能下载一次。工具可创建钱包、发起转账、创建支付和兑换、取消待处理项,会实际转移链上资金。批准任何写入或发送操作前请先核对。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Coinbase Cdp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@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

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

Environment

bash
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

bash
# 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

来源:packages/crypto/coinbase-cdp/README.md,提交 d0a519a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分