> ## Documentation Index
> Fetch the complete documentation index at: https://docs.routeur.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Cursor

> Add Routeur to Cursor's MCP configuration and use it from the agent.

Cursor reads MCP servers from `~/.cursor/mcp.json` (every project) or `.cursor/mcp.json` in a repository (that project only).

```json theme={null}
{
  "mcpServers": {
    "routeur": {
      "url": "https://api.routeur.app/mcp",
      "headers": { "Authorization": "Bearer ${ROUTEUR_API_KEY}" }
    }
  }
}
```

Reload Cursor, then check **Settings → MCP**: Routeur should be listed with its tools. Ask the agent for something the codebase cannot answer:

```
Using routeur, compare the Fed decision market across Kalshi and Polymarket and tell me which venue is cheaper for a Yes on a cut.
```

<Note>
  Cursor expands `${ROUTEUR_API_KEY}` from your environment in most builds; if yours does not, put the key in the file and keep the file out of version control. A project `.cursor/mcp.json` that is committed should never carry a key.
</Note>

## Using it while you build

Routeur's tools are useful inside a coding session, not just in chat:

* Ask the agent to fetch a real response (`get_market`, `list_relations`) before it writes the types for it — the shapes come from the same OpenAPI description as this reference.
* `routeur://openapi.json` is a resource, so the agent can read the whole API description without a web fetch.
* When it writes client code, tell it the API is read-only `GET` endpoints with cursor pagination, and point it at [Pagination](/pagination) and [Rate limits](/rate-limits).
