Coinbase for Agents (Coinbase MCP): setup guide
Education only. Updated Oct 22, 2026. Based only on Coinbase Developer Platform documentation (sources below).
You are responsible for every trade your agent places. TraderStacks explains how the software works; this is not investment advice, and nothing here suggests what to buy, sell or when. Agents can make mistakes, and you can lose money. Coinbase's docs say: "You are solely responsible for reviewing and authorizing any trades, transfers, or account changes made through agentic workflows."
What it is
Coinbase for Agents connects AI apps to your Coinbase account through MCP (Model Context Protocol), an open standard for connecting AI agents to outside services. There are two ways to connect:
| Remote MCP (Coinbase recommends) | Local CLI | |
|---|---|---|
| Address / command | https://agents.coinbase.com/mcp | coinbase mcp from @coinbase/coinbase-cli |
| Sign-in | Sign in with Coinbase (OAuth). No API key. | CDP API key saved on your computer |
| For | ChatGPT, Grok, Grok Bot, Muse, Perplexity Computer, Claude, Claude Code, Codex CLI | Other coding agents (Coinbase names Cursor, Windsurf and Codex), or when you prefer the CLI |
Step 1: create a small, separate portfolio
Coinbase recommends portfolio isolation: before you connect, create a separate portfolio for your agent, fund it with only what you're willing to risk, and give the agent access to that portfolio only. On Coinbase Advanced, go to Portfolio → Spot, open the All portfolios dropdown above your balance, and select New portfolio. This only works on the Coinbase website, not the mobile app.
Isolated agent portfolios support spot crypto only. Coinbase says US derivatives (futures) work only in your default portfolio.
Step 2a: remote MCP (Claude, ChatGPT and other supported apps)
Claude (web, desktop, mobile)
- Click the Customize toolbox icon in the left sidebar and go to Connectors.
- Click + → Add custom connector. Name it "Coinbase" and enter
https://agents.coinbase.com/mcp. - Leave the other fields blank and click Create.
- Sign in with Coinbase, then on the approval screen select only your agent portfolio.
Coinbase's docs also offer a one-click "Add Coinbase to Claude" button.
ChatGPT (set up on the web first)
- Open Plugins in the side navigation, then Add → Add Custom MCP Server.
- Name it "Coinbase" and enter
https://agents.coinbase.com/mcp as the Server URL. - Leave Authentication set to OAuth, check "I understand and want to continue", and click Create as a plugin.
- Sign in with Coinbase and select only your agent portfolio.
If Add Custom MCP Server isn't there, turn on developer mode in ChatGPT Settings (depends on your plan and workspace). Once set up on the web, it's available in ChatGPT desktop and mobile.
Claude Code
- Run
claude mcp add coinbase --transport http https://agents.coinbase.com/mcp - Start Claude, run
/mcp, then choose coinbase → Authenticate.
Codex CLI
- Run
codex mcp add coinbase --url https://agents.coinbase.com/mcp - Sign in when prompted. If the browser doesn't open, run
codex mcp login coinbase. Restart Codex if the tools don't appear.
Grok
- Click Plugins (bottom-left), search for Coinbase, choose Add → Connect, then sign in to Coinbase.
To verify, ask the agent to list your portfolios. That's a read-only call.
Step 2b: local CLI with a CDP API key (coding agents)
Create a least-privilege CDP API key
- In the CDP Portal, go to API Keys → Create API Key and name it (for example
my-trading-agent). - Under Advanced Settings → Coinbase App & Advanced Trade → Accounts, select only your agent portfolio. Primary is selected by default, so change it.
- Coinbase's setup enables Trade and Transfer. Coinbase says Transfer only moves funds between your own portfolios and can't withdraw to outside addresses. View is on by default. Enable only what you need.
- Prefer an IP allowlist over "Allow requests from any IP address" if you know your IP range.
- Click Create & Download. The secret is shown only once, so store the JSON file safely and never paste it into a chat.
Install and configure
node --version # Node.js 22 or later
npm install -g @coinbase/coinbase-cli
coinbase --version
coinbase env live --key-file <path-to-key.json>
coinbase env # shows "live" with your key ID
coinbase balance # read-only check
On Linux, Coinbase recommends installing keyring support (libsecret-tools) so secrets aren't stored in plain text.
Add the local MCP server
Claude Code:
claude mcp add --scope user --transport stdio coinbase -- coinbase mcp
Other agents (Codex, Cursor and similar): add this to the MCP config:
{ "command": "coinbase", "args": ["mcp"], "transport": "stdio" }
Coinbase notes that Codex's default sandbox can't reach the OS keychain. Either give Codex elevated access or use the MCP server instead of direct CLI commands.
What's supported
- Spot crypto trading on Coinbase (900+ pairs). Orders run through Coinbase Advanced Trade, so Advanced Trade fees and eligibility rules apply.
- Conversions, such as USDC ↔ USD, with a quote first.
- Portfolio management: balances, positions, creating portfolios and moving funds between them.
- Coinbase's docs also list US derivatives (futures, default portfolio only) and eligible US stocks, plus x402 payments: the agent can pay per request for data from your USDC balance. Coinbase warns that settled x402 payments can't be reversed, so set a budget before you allow them.
Useful CLI safety flags: --dry-run prints a request without sending it, and --template shows the expected fields.
Coinbase CLI vs. CDP CLI
They're different tools. Coinbase CLI (@coinbase/coinbase-cli, command coinbase) is for trading on your own Coinbase account. CDP CLI (@coinbase/cdp-cli, command cdp) is for developers building apps with CDP APIs such as server wallets and onchain data. Coinbase also offers a separate Wallet MCP for self-custodial Coinbase Wallet, where you approve every write action.
Safety checklist
- Use a small, dedicated portfolio and give the agent access to that portfolio only.
- Use least privilege: scope the API key to one portfolio, enable only the permissions you need, and use an IP allowlist when you can.
- Keep approvals manual: Coinbase says the agent can work on its own or with your approval, and you choose. Tell it to preview and ask before every order. Coinbase notes ChatGPT can create an order in one turn, while Claude previews and asks first.
- Review orders and fills regularly on Coinbase.
- Disconnect when done: Coinbase Account → Security → Connections → revoke. Deleting a chat or local skill does not revoke access. For the CLI, delete the API key in the CDP Portal.
- Never paste passwords, 2FA codes, tokens or API secrets into a chat.
- Work through our interactive AI agent safety checklist, and read the general before-you-connect checklist.
How we checked this - Sources (official Coinbase Developer Platform docs, opened Oct 22, 2026)
- Coinbase MCP overview: remote MCP, supported apps, setup steps, portfolio isolation, API key, what's supported, disconnecting
- Coinbase for Agents skill guide: CLI install, local MCP config, Codex sandbox note
- Comparing agentic tools: Coinbase MCP vs. Wallet MCP vs. CDP MCP/CLI
- Checked on
- Oct 22, 2026
- Not covered
- Fees, account eligibility by country, and x402 provider pricing. We did not test the connection with a funded account.
Frequently asked questions
What is Coinbase for Agents?
Coinbase for Agents (also called the Coinbase MCP) is Coinbase's official way to connect an AI agent to your Coinbase account so it can check prices, place orders and manage portfolios. It comes as a remote MCP server at https://agents.coinbase.com/mcp, signed in with your Coinbase account, and as a local CLI that uses a CDP API key.
Remote MCP or local CLI: which should I use?
Coinbase recommends the remote MCP for supported apps (ChatGPT, Grok, Claude, Claude Code, Codex CLI and others it lists). You sign in with Coinbase and no API key is needed. The local CLI (@coinbase/coinbase-cli) is for other coding agents such as Cursor or Windsurf, or when you explicitly want it, and needs a CDP API key.
How do I limit what the agent can touch?
Coinbase suggests creating a separate portfolio for the agent, funding it with only what you are willing to risk, and selecting only that portfolio on the approval screen (remote MCP) or in the API key's Accounts scope (CLI). Isolated agent portfolios support spot crypto only.
Can the API key withdraw my crypto?
Coinbase's setup asks you to enable Trade and Transfer on the CDP API key, and says Transfer allows moves between your portfolios only and does not allow withdrawals to external addresses. Only enable the permissions you need, and keep the key file private.
Is Coinbase CLI the same as CDP CLI?
No. The Coinbase CLI (@coinbase/coinbase-cli, command coinbase) is for trading on your Coinbase account. The CDP CLI (@coinbase/cdp-cli, command cdp) is for developers building apps on the Coinbase Developer Platform.
Does TraderStacks suggest trades to run through the agent?
No. We teach the setup and safety settings only, never tickers, signals or strategies. You are responsible for any trade your agent places.
Next: the "Connect an AI agent to your broker" learning path · Robinhood MCP setup guide
Education only, never trade advice.
