# MCP server

> Connect Claude, Cursor or any MCP client to Deskr's engine. 17 tools: 11 market reads and 6 that draw on your own chart. Streamable HTTP, token auth, plan-aware. Nothing can place an order.

Deskr runs a **Model Context Protocol** server, so AI assistants can read the same numbers you see on the board: price, 24h zones, funding, open interest, order book, signals and ideas. Six more tools read or change **your own** Deskr terminal (drawings, alerts and what it shows). Nothing the server exposes can place an order or move funds.

| | |
|---|---|
| Endpoint | `POST https://deskr.trade/api/mcp` |
| Transport | MCP Streamable HTTP, stateless, JSON responses (no SSE) |
| Auth | `Authorization: Bearer dskr_…` |
| Methods | `initialize`, `ping`, `tools/list`, `tools/call`. Notifications get HTTP 202. |
| Tools | 17: 11 market tools (`readOnlyHint: true`) and 6 `chart_*` tools (2 read your chart, 4 write only to it). See [MCP tools](/api/mcp-tools). |
| Rate limit | Per token: 30 requests/min on Free, 120 on Pro and Team |
| Coverage | Free tokens: BTC and ETH. Pro and Team: every enabled coin. `macro` works on every plan. |

The overview page for people is [deskr.trade/mcp](https://deskr.trade/mcp).

## 1. Create a token

:::steps
1. Sign in and open **Settings → MCP / API**.
2. Create a token and give it a label. It looks like `dskr_…`.
3. Copy it now. It's **shown once**, and Deskr only stores its SHA-256 hash.
4. Press **Test**. Deskr runs the same `initialize` + `tools/list` your client will and prints "Connected · N tools".
:::

You can have up to 5 tokens and revoke any of them at any time.

## 2. Add it to your client

Most clients accept this shape:

```json title="mcp.json"
{
  "mcpServers": {
    "deskr": {
      "type": "http",
      "url": "https://deskr.trade/api/mcp",
      "headers": { "Authorization": "Bearer dskr_…" }
    }
  }
}
```

- **Cursor:** add it to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` in a project.
- **Claude Code:** `claude mcp add --transport http deskr https://deskr.trade/api/mcp --header "Authorization: Bearer dskr_…"`
- **Other clients:** any client that speaks Streamable HTTP and can send a bearer header.

## 3. Ask

Start with something like:

```text
Using Deskr, what are BTC's 24h zones and where is price inside them?
Which coins have the most extreme funding right now, and is open interest rising with price?
Show me Deskr's open ideas with their invalidation levels.
```

The assistant usually calls `coins` first to find valid symbols, then the tool it needs.

## Test with curl

```bash
curl -s https://deskr.trade/api/mcp \
  -H "Authorization: Bearer $DESKR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

Without a valid token the server answers HTTP 401 with JSON-RPC error `-32001` ("Missing or invalid token. Create one in Deskr → Settings → MCP.").

## Every result is labelled

Every tool result includes `t` (unix seconds), `stale` (true when engine data is older than 5 minutes) and `src` (where the numbers came from), so the assistant can tell you how fresh a number is.

## What it won't do

- Place, change or cancel orders. There are no write tools.
- Return probabilities of direction. Deskr doesn't publish them.
- Return data for coins your plan can't open. On Free, the `ideas` tool returns the backtest against a random control only (`pro: false`).

## Privacy

Usage is logged as the tool name and an ok flag only, never arguments or results.
