mcp.json file and sends fixed headers on every request. Routeur needs one header, the API key as a bearer token, which Cursor can read from an environment variable so the file never holds the secret.
Configuration
mcp.json
url; no type field is needed. ${env:NAME} is Cursor’s interpolation syntax for environment variables (format and file locations from cursor.com/docs/context/mcp, checked on 2026-09-17). Set ROUTEUR_API_KEY in the environment Cursor is launched from; on macOS a GUI launch does not read your shell profile, so start Cursor from a terminal or set the variable at the login level.
Verify
Open Cursor Settings > MCP (or the Customize sidebar) and togglerouteur on. The server should list its 38 tools within a few seconds; if it shows an error, the header was not sent or the key is wrong, which the server reports as 401. Then ask the agent for something the codebase cannot answer:
Using it while you build
Routeur’s tools are useful inside a coding session as well as in chat:- Have the agent fetch a real response (
get_market,list_relations,get_market_book) before it writes types for it. The shapes come from the same OpenAPI description as the API reference. routeur://openapi.jsonis an MCP resource, so the agent can read the whole API description without a web fetch, and it costs no requests.- Tell the agent the API is read-only
GETendpoints with decimal-string prices,graph_runon graph-derived responses, and cursor or offset pagination; point it at Errors and conventions and Pagination. - The agent’s tool calls spend your key’s quota like any other request.
market_snapshotcosts five; see what a tool call costs.
Related
- Any MCP client: headers, protocol versions and
mcp-remote. - Tool reference: every tool the agent sees.
- Reading order for LLMs: the facts to put in your project rules.