# MCP Server — CryptoDataAPI

> Connect live crypto market data to any AI agent with the CryptoDataAPI MCP server — remote HTTP or local stdio, one X-API-Key, 24 tools. Free tier, no card.

The **CryptoDataAPI MCP server** turns our whole REST API into native tools your AI agent can call: live prices, cross-exchange funding and open interest, liquidations, market-health and regime reads, Fear & Greed, macro, ETF and stablecoin flows, Hyperliquid perp prices, dealer gamma, whale activity and 2,000+ coin profiles — all behind a single API key.

[Model Context Protocol (MCP)](https://modelcontextprotocol.io) is an open standard that lets an agent discover and call external tools at runtime. Point any MCP client at `https://cryptodataapi.com/mcp` and it gets the full toolset automatically — no per-endpoint glue code.

Two ways to connect: the **remote HTTP** server (recommended — nothing to install, all logic runs on our side) or a **local stdio bridge** (the `cryptodataapi-mcp` npm package) for clients that only speak stdio. Pair the server with the [Agent Skill](/ai-agents/agent-skill) — the skill teaches your agent *when and how* to use the data, the MCP server *provides* the live data.

- **Vendor:** CryptoDataAPI
- **Agent docs:** https://cryptodataapi.com/api/docs
- **Config:** `https://cryptodataapi.com/mcp`
- **MCP transports:** http (streamable, recommended), stdio (npx bridge)

## Step 1 — Connect the remote server

The remote server speaks **streamable HTTP** at `https://cryptodataapi.com/mcp` and authenticates with an `X-API-Key: cdk_live_YOUR_KEY` header. This is the recommended path — no Node, no package, and every tool call runs against our live stack (auth, tier gating, caching and rate limits all included).

Most clients take a one-line add command. Here it is for Claude Code; the exact form for each client is on its own page: [Claude Code](/ai-agents/claude-code), [Claude Desktop](/ai-agents/claude-desktop), [Claude (web)](/ai-agents/claude-web), [Cursor](/ai-agents/cursor), [OpenAI Codex](/ai-agents/openai-codex), [Gemini CLI](/ai-agents/gemini-cli), [Windsurf](/ai-agents/windsurf) and [GitHub Copilot](/ai-agents/github-copilot).

**Remote HTTP (Claude Code shown):**
```bash
claude mcp add --transport http cryptodataapi \
  https://cryptodataapi.com/mcp \
  --header "X-API-Key: cdk_live_YOUR_KEY"
```

**Generic client config (url + headers):**
```json
{
  "mcpServers": {
    "cryptodataapi": {
      "url": "https://cryptodataapi.com/mcp",
      "headers": { "X-API-Key": "cdk_live_YOUR_KEY" }
    }
  }
}
```

## Step 2 — Or run the local stdio bridge

If your client only supports stdio MCP servers, install the published **`cryptodataapi-mcp`** npm package. It is a thin bridge that forwards to the same hosted server — all tool logic still runs server-side, so you get identical behavior. It needs Node.js and reads your key from the `CRYPTODATA_API_KEY` environment variable.

Add it via CLI, or drop the block below into your client's config file (Claude Desktop, Cursor, Windsurf, and others use this exact `mcpServers` shape).

**Stdio bridge (npm, published):**
```bash
CRYPTODATA_API_KEY=cdk_live_YOUR_KEY \
  claude mcp add cryptodataapi -- npx -y cryptodataapi-mcp
```

**Client config file (stdio):**
```json
{
  "mcpServers": {
    "cryptodataapi": {
      "command": "npx",
      "args": ["-y", "cryptodataapi-mcp"],
      "env": { "CRYPTODATA_API_KEY": "cdk_live_YOUR_KEY" }
    }
  }
}
```

## Step 3 — Get a key (or let the agent mint one)

Every data tool needs a key in the `X-API-Key` header. The **Free** tier needs no card and covers the whole market picture (see tiers below). Grab one at [cryptodataapi.com/login](https://cryptodataapi.com/login), or POST an email to the auth endpoint — the key is returned once.

Agents can also bootstrap themselves: the server exposes a **`create_free_api_key`** tool that mints a free key from an email with no signup. And a few discovery tools (`create_free_api_key`, `list_capabilities`, `get_exchange_links`) need no key at all, so an agent can orient before it has one.

For autonomous upgrades, agents can self-subscribe over [x402](https://x402.org) (gasless USDC) via `POST /api/v1/payments/agent-subscribe` — no human in the loop.

**Free key, no signup:**
```bash
curl -X POST https://cryptodataapi.com/api/v1/auth/keys \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com"}'
```

## Step 4 — What tools you get

The server exposes ~24 curated, read-only tools (the heavy `/backtesting/*` bulk endpoints are intentionally left off — use the REST API for those). Grouped:

**Prices & coins:** `get_price`, `get_coin_profile`, `get_top_coins`, `search_coins`, `get_hyperliquid_prices`.

**Market intelligence:** `get_daily_snapshot` (one-call overview), `get_market_health`, `get_market_regime` (Pro), `get_cycle_regime`, `get_fear_greed`, `get_macro`, `get_stablecoins`, `get_etf_flows`.

**Derivatives & positioning:** `get_funding_rates`, `get_open_interest`, `get_liquidations`, `get_order_book`, `get_positioning` (Pro), `get_gamma_exposure` (Pro), `get_whale_activity` (Pro).

**Utility & discovery:** `create_free_api_key`, `list_capabilities`, `get_exchange_links`, and `query_api` — an escape hatch that calls any other GET endpoint across the 180+ endpoint REST surface. Start a session with `get_daily_snapshot` or `list_capabilities`.

## Example prompts

- "What's the current crypto market regime, and which strategy baskets fit it?"
- "Compare BTC funding rates across Binance and Hyperliquid and flag crowded positioning."
- "Give me a one-call market snapshot: health score, Fear & Greed, and top movers."
- "Which coins have the highest liquidation risk right now?"
- "Is dealer gamma amplifying or dampening BTC moves today?"
- "Mint me a free API key for agent@example.com, then pull the daily snapshot."

## FAQ

### How does authentication work?

Every data tool forwards your `X-API-Key` to our REST API, which is the single checkpoint for auth, tier gating, caching and rate limiting. On the remote server the key is a request header, fixed when you add the server; on the stdio bridge it comes from the `CRYPTODATA_API_KEY` env var. A handful of discovery tools (`create_free_api_key`, `list_capabilities`, `get_exchange_links`) work with no key.

### Remote HTTP or local stdio — which should I use?

Prefer **remote HTTP** if your client supports it: nothing to install, no Node, and you always get the latest tools. Use the **stdio bridge** (`npx cryptodataapi-mcp`) only for clients that can't reach a remote HTTP MCP server — it forwards to the same hosted endpoint, so behavior is identical.

### What are the rate limits and tiers?

**Free** (no card): market-health scores, short/long-term regime reads, Fear & Greed, macro, ETF & stablecoin flows, BTC cycle indicators, 2,000+ coin profiles, and full-universe Hyperliquid funding + open interest — plus BTC order book & liquidations. **Pro** (from $39/mo): the per-coin proprietary signals for every coin — quant regimes & probabilities, dealer gamma (GEX), whale activity, positioning, liquidation heatmaps and L2 books universe-wide — plus 6× rate limit. **Pro Plus** (from $149/mo): historical & bulk — the 2020→now regime archive (Parquet), a probability audit trail, and backtesting data.

Request budgets: Free 5/min, Pro 30/min, Pro Plus 60/min. A `429` means back off. Responses carry `Cache-Control`; data refreshes on 1–30 minute cadences, so poll accordingly.

### Which tools need Pro?

`get_market_regime`, `get_positioning`, `get_gamma_exposure` and `get_whale_activity` are Pro/Pro Plus. `get_liquidations` and `get_order_book` return BTC on Free and the full coin universe on Pro. Everything else — health, cycle regime, Fear & Greed, macro, flows, prices, funding and open interest (full-universe) — is on Free.

### Does it work with my client (Cursor, Codex, Gemini, Windsurf, Copilot…)?

Yes — any MCP-compatible client works. We keep a copy-paste setup page for each: [Claude Code](/ai-agents/claude-code), [Claude Desktop](/ai-agents/claude-desktop), [Claude on the web](/ai-agents/claude-web), [Cursor](/ai-agents/cursor), [OpenAI Codex](/ai-agents/openai-codex), [Gemini CLI](/ai-agents/gemini-cli), [Windsurf](/ai-agents/windsurf), [GitHub Copilot](/ai-agents/github-copilot), plus platforms like [n8n](/ai-agents/n8n), [LangChain](/ai-agents/langchain), [elizaOS](/ai-agents/elizaos) and [OpenClaw](/ai-agents/openclaw).

### Can I call endpoints that aren't wrapped as tools?

Yes. The `query_api` tool is a read-only escape hatch to any other GET endpoint on the `/api/v1` surface (180+ endpoints). The heavy backtesting and any account/mutating routes are deliberately not reachable through it — use the [REST API](/api/docs) directly for those.

## Related

- [Agent Skill](https://cryptodataapi.com/ai-agents/agent-skill)
- [Claude Code setup](https://cryptodataapi.com/ai-agents/claude-code)
- [Cursor setup](https://cryptodataapi.com/ai-agents/cursor)
- [REST API docs](https://cryptodataapi.com/api/docs)
- [Prompt library](https://cryptodataapi.com/prompts)

---

Canonical: https://cryptodataapi.com/ai-agents/mcp-server
Machine-readable API map: https://cryptodataapi.com/llms.txt
Agent skill repo: https://github.com/Crypto-Data-API/cryptodataapi-skills (`npx skills add Crypto-Data-API/cryptodataapi-skills -g -y`)
Free API key (no signup): POST https://cryptodataapi.com/api/v1/auth/keys {"email":"you@example.com"}
