Skip to main content
Cursor connects to remote Streamable HTTP servers from a 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
Remote servers are identified by 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.
A committed .cursor/mcp.json must never carry a literal key. If your build does not expand ${env:...}, keep the key in ~/.cursor/mcp.json and out of version control.

Verify

Open Cursor Settings > MCP (or the Customize sidebar) and toggle routeur 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:
The observed result on 2026-09-17, trimmed to the fields the question needs:

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.json is 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 GET endpoints with decimal-string prices, graph_run on 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_snapshot costs five; see what a tool call costs.