Skip to main content
@coinbase/cdp-cli is a CLI and MCP server for the CDP API. It handles authentication, provides inline documentation for every endpoint, and exposes the full API surface as typed tools for AI agents.

Why CDP CLI

Auth-transparent

Configure credentials once per environment. The CLI handles JWT signing for every request.

AI-native

Doubles as an MCP server with bundled agent skills. New API features become available the moment the CLI updates.

Inline schema discovery

Every command has built-in help with fields, types, and examples.

Zero dependencies

A single ESM bundle on Node.js 22+. Zero runtime dependencies.

Install

npm install -g @coinbase/cdp-cli
cdp --version
Node.js 22 or later is required.

What’s available

Run cdp to see the current resources and commands. EVM Accounts and Solana Accounts: create accounts, sign messages and transactions, send using the encode-sign-send pipeline, manage smart accounts (ERC-4337), and execute token swaps. Onchain Data: token balances, SQL queries against indexed chain data, and webhook subscriptions for on-chain event monitoring. Policy Engine: accept/reject rules by value, address, or network, attachable to any account. End User Accounts, Onramp, and x402: embedded wallets for end users, fiat-to-crypto onramp via Coinbase, and payments over the x402 protocol. Client-side utilities: transaction encoding and decoding, ABI encoding, and key encryption. These run locally with no network calls.

Already using the CDP SDK?

The CLI complements the SDK for workflows where a command is faster than writing code:
  • Ad-hoc operations: create an account, check a balance, or fund a testnet wallet without opening an editor
  • Debugging: decode a raw transaction with cdp util tx-decode, inspect request and response headers with cdp api -v
  • Exploration: browse every endpoint with cdp api, preview request shapes with ‑‑template, iterate with --edit
  • AI agents: the MCP server exposes every CDP operation as a typed tool
The CLI is self-documenting. Run cdp evm --help to see all actions, or cdp evm accounts create --help to see fields and examples for a specific action.

Architecture

LayerDescription
CLICommands for exploration and automation
MCP serverStdio-based Model Context Protocol server for AI tool-calling
Agent skillsBundled workflows that teach assistants how to use the CLI

Next steps

Quickstart

Install, authenticate, and send a first testnet transaction.

How It Works

Credentials, environments, field syntax, and the encode-sign-send pipeline.

MCP Integration

Typed tool access to every CDP endpoint for AI agents.