Coinbase AgentKit MCP: Documentation
Updated:
Connection
npm install @coinbase/agentkit-model-context-protocol @coinbase/agentkit @modelcontextprotocol/sdk (stdio, Node.js 18+). In code, create AgentKit.from({ cdpApiKeyId, cdpApiKeySecret }), then getMcpTools(agentKit) builds the tool list and call handler, which you register on a standard @modelcontextprotocol/sdk server via StdioServerTransport. Create a CDP API key in the CDP Portal (portal.cdp.coinbase.com).
Tools
The tool set depends on which action providers you attach — by default that's the wallet and basic CDP actions:
get_wallet_details— the managed wallet's address and balance.native_transfer— transfer the network's native token (ETH etc.).request_faucet_funds— fund a testnet wallet.get_erc20_token_address— look up a common ERC-20 token's contract address by symbol and network.
Additional action providers (ERC-20, ERC-721, a DeFi swap router, Morpho, Pyth, Superfluid and more) plug in individually and add their own tools.
Agent flow
"Fund my testnet wallet and show me the balance", "transfer 0.01 ETH to address 0x9F…4d", "look up USDC's contract address on Base", "check this wallet's balance of ERC-20 token X".
Important
This is managing a real blockchain wallet through CDP, NOT Coinbase exchange trading — there's no Coinbase Exchange order book here. A CDP Secret API Key gives the agent control over the managed wallet's funds: start on a testnet (Base Sepolia, etc.) with request_faucet_funds before connecting mainnet with real assets.
Pricing
AgentKit and its MCP extension are free (open source); network fees (gas) are paid from the wallet's own funds, and the CDP API itself carries no extra charge at the basic tier.