# Crypto price MCP server

Give Claude, Cursor and other MCP clients live crypto prices, candles, futures and prediction odds.

The server is live at `https://api.coinprice.dev/mcp` and speaks streamable HTTP. It has five tools. Three work with no key: `get_price`, `list_coins` and `search_docs`. `get_history` and `get_markets` need a free API key, sent as an `Authorization: Bearer` header. Test keys that start with `coin_test_` return made-up data and are never charged. [Get a key](/signup).

## Connect

In Claude Code, add the server with one command. Add the header to unlock the keyed tools.

Shell:

```bash
claude mcp add --transport http coinprice https://api.coinprice.dev/mcp

# with a key, for get_history and get_markets
claude mcp add --transport http coinprice https://api.coinprice.dev/mcp \
  --header "Authorization: Bearer $COINPRICE_API_KEY"
```

Clients that let you set a custom header, such as Cursor and VS Code, can add a remote HTTP MCP server with the URL above and an `Authorization` header for the keyed tools. The keyless tools work in any client that supports a remote server.

## Tools

| Tool | What it does | Key | Arguments |
|---|---|---|---|
| `get_price` | Current price of one or more coins, with the 24-hour change. | No | `ids` (up to 50 ids or tickers), `currency` (default usd) |
| `list_coins` | Coins ranked by 24-hour volume, or matching a search. | No | `query`, `limit` (1 to 100, default 20) |
| `search_docs` | Searches the API documentation. | No | `query` |
| `get_history` | Candles for one coin. | Yes | `id`, `interval` (`1m`, `5m`, `15m`, `1h`, `4h`, `1d`), `limit` (1 to 500, default 100), `from`, `to` |
| `get_markets` | Futures markets (price, funding, open interest) or prediction market odds. | Yes | `type` (`futures` or `predictions`), `coin`, `symbol`, `limit` (1 to 100) |

## Call a tool

curl:

```bash
curl -s -X POST https://api.coinprice.dev/mcp \
  -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_price","arguments":{"ids":["bitcoin","ethereum"]}}}'
```

The answer is a JSON-RPC envelope. The tool's result is a JSON string in `result.content[0].text`; decode it to read the prices. A keyless answer also carries a `get_key` field.

JSON-RPC answer, real response, 2026-11-24 07:20 UTC:

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "content": [
      {
        "text": "{\"get_key\":\"Free API key (more calls, history, futures and predictions): https://coinprice.dev/signup\",\"prices\":[{\"change_24h_pct\":-1.8524344173520557,\"currency\":\"usd\",\"id\":\"bitcoin\",\"price\":60252.585,\"symbol\":\"btc\",\"timestamp\":\"2026-11-24T07:20:59Z\"},{\"change_24h_pct\":-1.7347602401662998,\"currency\":\"usd\",\"id\":\"ethereum\",\"price\":1692.265,\"symbol\":\"eth\",\"timestamp\":\"2026-11-24T07:20:59Z\"}]}",
        "type": "text"
      }
    ],
    "isError": false
  }
}
```

Decoded text, the same response:

```json
{
  "get_key": "Free API key (more calls, history, futures and predictions): https://coinprice.dev/signup",
  "prices": [
    {
      "change_24h_pct": -1.8524344173520557,
      "currency": "usd",
      "id": "bitcoin",
      "price": 60252.585,
      "symbol": "btc",
      "timestamp": "2026-11-24T07:20:59Z"
    },
    {
      "change_24h_pct": -1.7347602401662998,
      "currency": "usd",
      "id": "ethereum",
      "price": 1692.265,
      "symbol": "eth",
      "timestamp": "2026-11-24T07:20:59Z"
    }
  ]
}
```

## Keyed tools without a key

A keyed tool called without a key answers with HTTP 200 and `isError: true`, not an error status. The text inside says where to get a key.

JSON, real response from get_history without a key, 2026-11-24 05:53 UTC:

```json
{
  "error": "unauthorized",
  "message": "get_history needs an API key. Get a free one at https://coinprice.dev/signup and send it as 'Authorization: Bearer <key>'."
}
```

## Limits

- Keyless calls are limited to 30 a minute per IP address. `initialize` and `tools/list` count.
- With a key, every tool call is a counted call on your plan. It is refunded when it errors or finds nothing.
- `get_history` takes `from` and `to` as an ISO date or time only, not Unix seconds. The interval defaults to `1d`. A `limit` out of range falls back to 100 instead of failing.
- `get_markets` falls back to a `limit` of 20 when the value is out of range.
- `get_price` takes up to 50 ids.

## The same data over REST

The tools read the same prices as the REST API. For code that is not an AI client, use REST: [the API reference](/docs) lists every route.

## Questions

**Is the MCP server available now?** Yes. It is live at https://api.coinprice.dev/mcp.

**Do I need an API key?** Not for get_price, list_coins and search_docs. get_history and get_markets need a free key sent as an Authorization header.

**Which clients work?** Any MCP client that supports a remote server over streamable HTTP, including Claude Code, Cursor and VS Code.

**What data does it return?** Current prices, coin search, candles, futures markets and prediction odds, from the same data as the REST API.
