Get started
- Local MCP / CLI (recommended)
- Remote MCP (ChatGPT & Claude)
The local MCP server runs on your machine with a CDP API key. It’s the most reliable setup for executing trades consistently across all models — remote MCP has known issues with high-reasoning models blocking trades on certain platforms.Your agent will ask you to create a CDP API key (below) during setup.Linux only: install keyring support to keep secrets out of plaintext:2. Configure your API key3. Register the MCP server
Quickstart
Paste this into your coding agent and it will install, configure, and verify automatically:Create a CDP API key
- Go to API Keys in the CDP Portal (a project is auto-created on first sign-in)
- Click Create API Key and give it a name (e.g.,
my-trading-agent) - Under Advanced Settings > Coinbase App & Advanced Trade:
- Under Accounts, select the portfolio you want the agent to trade from (Primary is selected by default)
- Enable Trade and Transfer. Transfer allows moves between your portfolios only and does not allow withdrawals to external addresses.
- Check Opt out of IP allowlisting if you haven’t configured specific IP addresses.
- Click Create & Download and save the JSON key file
Manual setup
If you prefer to set things up yourself instead of using the quickstart:1. Install the CLINode.js 22 or later is required.
- Claude Code
- Codex
- Cursor / Windsurf
- Other MCP clients
To disconnect Coinbase from an app, go to Coinbase Account > Security > Connections and revoke the connection.
What’s supported today
Coinbase for Agents currently supports:- Spot crypto trading: buy and sell 900+ trading pairs on Coinbase Advanced Trade
- Isolated agent portfolios: spot crypto only, scoped to a specific portfolio selected when logging in or creating an API key
- Portfolio management: Check balances and positions across your account
- USDC/USD conversions: instant zero-fee conversions between USDC and USD
Coming soon: x402 payments for agent-consumed services (paywalled research, data APIs, compute), equities, prediction markets, and additional asset classes. If it’s on Coinbase, your agent will be able to trade it.
Guiding agents to place orders
Based on order-creation testing across Claude and ChatGPT clients and models connected to the Coinbase for Agents remote MCP server:- Web clients for Claude and ChatGPT reliably create orders from clear, well-specified instructions, across models. The exception is GPT-5.5 Pro, which doesn’t appear to automatically discover the connected MCP.
- Claude previews and requests confirmation in the chat to create the order, whereas ChatGPT creates the order in one turn.
- Claude Desktop refuses most orders that the web client creates; Sonnet 4.6 is the exception, creating orders when the request includes an explicit authorization (e.g.
I authorize you to buy…). - Lower-tier models may create orders with the wrong product, for example,
ETH-USDinstead ofETH-USDC. Prompt for approval to confirm before creating the order.
Buy 1 USDC of ETH in my agent portfolio. Vague or partial requests require the model to infer and resolve additional details.
Best practices
- Scope the agent’s access to the portfolio(s) you want it to use — a focused set gives the agent a clear, unambiguous target.
- Higher-reasoning models translate more complex intent and recover from underspecified orders; use one for multi-step or vague requests, e.g.
check my balance, then put 5% of my USDC into BTC.
Tools
Market data
Orders
Market order: executes immediately at the best available price.
Market buys use
quote_size (the amount to spend in USD). Market sells use base_size (the amount of the asset to sell). When switching between buy and sell, explicitly clear the other field (e.g., add quote_size= to clear a stale value).