{"_id":"@codespar/mcp-coinbase","_rev":"2-6118f8b6f889b301cd123d847e92a878","name":"@codespar/mcp-coinbase","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@codespar/mcp-coinbase","version":"0.1.0","keywords":["mcp","coinbase","crypto","exchange","trading","treasury"],"license":"MIT","_id":"@codespar/mcp-coinbase@0.1.0","maintainers":[{"name":"codespar-npm","email":"contact@codespar.dev"}],"bin":{"mcp-coinbase":"dist/index.js"},"dist":{"shasum":"c2d08f93c7ce2a463ca4de5dfaa863c1ea58c656","tarball":"https://registry.npmjs.org/@codespar/mcp-coinbase/-/mcp-coinbase-0.1.0.tgz","fileCount":6,"integrity":"sha512-LwXkRrDxEVOZogN1sGzZcaPhV4TSFFoifgiFi5ipRINw4QazkMdt/ELDHGNRRtD3fvI9/5yHbtpVUl4KzDFGFg==","signatures":[{"sig":"MEYCIQD06x+H0B4Mdtz6mkJh2bsSbGx5SVbDXqsK3TydbI8yNgIhAIxSWmdR5f2y7Wmq8vKokyvcyMErbN3EyzRhCnWc6ulC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38061},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"0415d66b592dea0d2042f25a7bc3aaf8ee8fdd92","mcpName":"io.github.codespar/mcp-coinbase","scripts":{"build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"codespar-npm","email":"contact@codespar.dev"},"_npmVersion":"11.8.0","description":"MCP server for Coinbase Advanced Trade — exchange / treasury API. Account balances, market data, orders, fills, transaction summary.","directories":{},"_nodeVersion":"25.5.0","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-coinbase_0.1.0_1778101513938_0.39268052881127957","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-05-06T21:05:13.779Z","modified":"2026-05-28T02:15:42.998Z","0.1.0":"2026-05-06T21:05:14.086Z"},"license":"MIT","keywords":["mcp","coinbase","crypto","exchange","trading","treasury"],"description":"MCP server for Coinbase Advanced Trade — exchange / treasury API. Account balances, market data, orders, fills, transaction summary.","maintainers":[{"email":"contact@codespar.dev","name":"codespar-npm"},{"email":"daniel.gazineu@gmail.com","name":"dangazineu"}],"readme":"# @codespar/mcp-coinbase\n\n> MCP server for **Coinbase Advanced Trade** — global crypto exchange with account balances, market data, orders, fills, and transaction summary\n\n[![npm](https://img.shields.io/npm/v/@codespar/mcp-coinbase)](https://www.npmjs.com/package/@codespar/mcp-coinbase)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n## Quick Start\n\n### Claude Desktop\n\nAdd to `~/.config/claude/claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"coinbase\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@codespar/mcp-coinbase\"],\n      \"env\": {\n        \"COINBASE_ACCESS_KEY\": \"your-access-key\",\n        \"COINBASE_API_SECRET\": \"your-api-secret\"\n      }\n    }\n  }\n}\n```\n\n### Claude Code\n\n```bash\nclaude mcp add coinbase -- npx @codespar/mcp-coinbase\n```\n\n### Cursor / VS Code\n\nAdd to `.cursor/mcp.json` or `.vscode/mcp.json`:\n\n```json\n{\n  \"servers\": {\n    \"coinbase\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@codespar/mcp-coinbase\"],\n      \"env\": {\n        \"COINBASE_ACCESS_KEY\": \"your-access-key\",\n        \"COINBASE_API_SECRET\": \"your-api-secret\"\n      }\n    }\n  }\n}\n```\n\n## Tools (13)\n\n| Tool | Purpose |\n|---|---|\n| `list_accounts` | List authenticated accounts with available + held balances per asset |\n| `get_account` | Get a specific account by UUID |\n| `list_products` | List tradable products (BTC-USD, ETH-USD, USDC-BRL, etc.) |\n| `get_product` | Get a single product's metadata + status |\n| `get_best_bid_ask` | Top-of-book bid + ask + size for one or more products |\n| `get_market_trades` | Recent trades for slippage estimation |\n| `create_order` | Place a market or limit order (idempotent via client_order_id) |\n| `list_orders` | List historical orders with status / time / product filters |\n| `get_order` | Get full status of a single order including fills |\n| `cancel_orders` | Cancel one or more open orders by order_id |\n| `list_fills` | List individual fills for fee accounting + reconciliation |\n| `get_transaction_summary` | 30-day volume + maker/taker fee tier |\n| `list_portfolios` | List portfolios under the authenticated user |\n\n## Authentication\n\nCoinbase Advanced Trade uses HMAC-SHA256 request signing with three headers:\n\n- `CB-ACCESS-KEY` — API key\n- `CB-ACCESS-TIMESTAMP` — UNIX timestamp in **seconds** (not milliseconds)\n- `CB-ACCESS-SIGN` — hex HMAC-SHA256 of `${ts}${method}${path}${body}` using API secret\n\nBase URL: `https://api.coinbase.com`\n\n> **Legacy HMAC keys only.** This package supports the classic\n> `CB-ACCESS-KEY` / `CB-ACCESS-SIGN` flow. Coinbase Cloud / CDP keys\n> (JWT-ECDSA) are **not** supported here — a separate `auth_type` is on\n> the roadmap. Mint a legacy HMAC key from\n> [coinbase.com/settings/api](https://www.coinbase.com/settings/api).\n\n### Get your credentials\n\n1. Go to [coinbase.com/settings/api](https://www.coinbase.com/settings/api)\n2. Click **New API Key** and select the legacy (HMAC) option\n3. Choose the permissions you need (view, trade, transfer)\n4. Copy the access key + secret immediately — the secret is shown only once\n5. Set the environment variables\n\n## Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `COINBASE_ACCESS_KEY` | Yes | Legacy HMAC API key from the Coinbase dashboard |\n| `COINBASE_API_SECRET` | Yes | API secret paired with the access key (HMAC-SHA256) |\n\n## Crypto Exchanges in CodeSpar\n\nHedge liquidity across global + LATAM crypto venues:\n\n- **Coinbase (this)** — global exchange, deepest USD/USDC liquidity, treasury-grade tooling\n- **[Foxbit](../foxbit)** — Brazilian exchange, focus on BTC / ETH / LTC, strong institutional desk\n- **[Mercado Bitcoin](../mercado-bitcoin)** — biggest BR exchange, 200+ tokens, deep altcoin coverage\n- **[Bitso](../bitso)** — Mexican exchange, MXN / BRL fiat rails, OTC desk\n\nMerchants and traders use multiple venues for best execution and redundancy.\n\n## Roadmap\n\n### v0.2 (planned)\n- JWT-ECDSA (Coinbase Cloud / CDP) auth — complement legacy HMAC\n- WebSocket market data streams (where MCP transport allows)\n- Coinbase Prime endpoints (institutional custody + portfolio management)\n\nWant to contribute? [Open a PR](https://github.com/codespar/mcp-dev-latam) or [request a tool](https://github.com/codespar/mcp-dev-latam/issues).\n\n## Links\n\n- [Coinbase Website](https://www.coinbase.com)\n- [Coinbase Advanced Trade API Documentation](https://docs.cdp.coinbase.com/advanced-trade/docs/welcome)\n- [MCP Dev LATAM](https://github.com/codespar/mcp-dev-latam)\n- [Landing Page](https://codespar.dev/mcp)\n\n## Enterprise\n\nNeed governance, budget limits, and audit trails for agent payments? [CodeSpar Enterprise](https://codespar.dev/enterprise) adds policy engine, payment routing, and compliance templates on top of these MCP servers.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}