MCP Server

Run the Bitcompare API as tools inside Claude Desktop, Claude Code, Claude.ai, and any other Model Context Protocol-compatible agent. 18 read-only tools covering rates, coins, prices, market stats, stablecoin stability, and symbol resolution — all gated by the same API key and plan limits as REST.

Two ways to connect

TransportWhen to useEndpoint
Hosted (Streamable HTTP)Any client that supports HTTP MCP — fastest setup, nothing to installhttps://api.bitcompare.net/mcp
Local (stdio)Claude Desktop, Claude Code, or any client that spawns subprocessesnpx @bitcompare/mcp-server

Both connect to the same backend. Pick whichever your client supports.

Setup

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json on macOS (or the equivalent on Windows/Linux):

claude_desktop_config.json

{
  "mcpServers": {
    "bitcompare": {
      "command": "npx",
      "args": ["-y", "@bitcompare/mcp-server"],
      "env": {
        "BITCOMPARE_API_KEY": "ck_live_..."
      }
    }
  }
}

Restart Claude Desktop, then ask: "What's the best yield on BTC right now?" Claude picks up the get_rates tool and answers from live data.

Claude Code

Add to .claude/settings.local.json in your project:

.claude/settings.local.json

{
  "mcpServers": {
    "bitcompare": {
      "command": "npx",
      "args": ["-y", "@bitcompare/mcp-server"],
      "env": {
        "BITCOMPARE_API_KEY": "ck_live_..."
      }
    }
  }
}

Hosted (Streamable HTTP)

Point any HTTP-MCP client at the hosted endpoint:

mcp config

{
  "mcpServers": {
    "bitcompare": {
      "url": "https://api.bitcompare.net/mcp",
      "headers": {
        "Authorization": "Bearer ck_live_..."
      }
    }
  }
}

You can also call it directly:

cURL

curl -X POST https://api.bitcompare.net/mcp \
  -H "Authorization: Bearer ck_live_..." \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

Tool catalog

Each tool maps 1:1 to a REST endpoint and respects the same plan limits.

Rates

  • get_rates — Current rates across providers, filterable by symbol, category, provider. → GET /api/v1/rates
  • get_rate_by_symbol — All provider rates for a single coin. → GET /api/v1/rates/{symbol}
  • get_rate_history — Historical rate timeseries (Pro: 5 years; lower plans clamped). → GET /api/v1/rates/{symbol}/history
  • list_providers — All rate providers, optionally filtered by category. → GET /api/v1/providers

Coins

  • get_coin — Full metadata: description, links, categories, market data, developer stats. → GET /api/v1/coins/{coinId}
  • list_coins — Paginated coin list with optional name/symbol search. → GET /api/v1/coins
  • top_coins — Top N coins by market cap. → GET /api/v1/coins/top
  • similar_coins — Coins similar to a given coin. → GET /api/v1/coins/{coinId}/similar
  • coin_history — Historical OHLC and market data. → GET /api/v1/coins/{coinId}/history
  • coin_markets — Per-exchange market data for a coin. → GET /api/v1/coins/{coinId}/markets

Prices

  • get_price — Median price across multiple providers. → GET /api/v1/prices/{symbol}

Market

  • market_summary — Total market cap, dominance, 24h volume. → GET /api/v1/global
  • fear_greed_index — Crypto Fear & Greed Index. → GET /api/v1/global/fear-and-greed
  • top_movers — Biggest 24h gainers and losers. → GET /api/v1/global/movers

Stablecoins

  • stablecoin_index — Stability leaderboard ranked by peg deviation. → GET /api/v1/stablecoins
  • stablecoin_peg_stability — Historical peg deviation for a stablecoin. → GET /api/v1/stablecoins/{symbol}/history

Symbols

  • resolve_symbol — Map exchange-specific tickers (e.g. BTC, XBT, wBTC) to canonical coin IDs. → GET /api/v1/symbols/resolve
  • resolve_symbols_batch — Resolve many exchange tickers in a single call. → POST /api/v1/symbols/resolve/batch

Authentication

The MCP server uses the same ck_live_* keys as the REST API. The Pro plan ($499/mo) or Enterprise is required to authenticate against the MCP endpoint — lower tiers (Free, Starter, Growth) don't include MCP access.

  • stdio transport — set BITCOMPARE_API_KEY in the env block of your client config
  • HTTP transport — send Authorization: Bearer ck_live_...

See Authentication for full details on key lifecycle, rotation, and revocation.

Rate limits

MCP requests count against your plan's per-key request budget. The plan determines burst capacity and monthly volume:

PlanRequests/minMonthly cap
Pro3001,000,000
EnterpriseCustomCustom

Exceeding the burst budget returns 429 Too Many Requests over HTTP, or a rate_limit error frame over stdio. See Rate Limiting.

Errors

The MCP transport uses standard JSON-RPC error frames; the underlying REST errors map to error.data.code:

  • 401 unauthorized — missing or invalid ck_live_* key
  • 402 plan_required — key is valid but the plan tier doesn't include MCP (free/starter)
  • 404 not_found — symbol, coin, or provider does not exist
  • 429 rate_limited — plan burst or monthly budget exhausted
  • 500 server_error — upstream issue; safe to retry with exponential backoff

See Errors for the full error catalog.

Discovery

The agent-readable manifest at the apex is updated automatically as tools change:

The npm package is published at @bitcompare/mcp-server and listed on Smithery.

What's next?

Was this page helpful?