mcp tool, the Agents SDK’s MCPServerStreamableHttp client, and the Codex CLI’s codex mcp add. All three send the API key as a bearer header. ChatGPT’s own custom connectors require OAuth or no authentication, which Routeur does not offer, so that path is not available yet. Syntax below was checked against OpenAI’s documentation on 2026-09-17; the URLs are given with each section.
Responses API
The model calls Routeur from OpenAI’s side; you write no tool code. Themcp tool object takes headers for authentication (verified in the Responses API reference, where headers is “Optional HTTP headers to send to the MCP server”). Guide: Remote MCP servers and connectors.
Python
The first response includes an
mcp_list_tools item; tool calls appear as mcp_call items with the tool’s JSON result. Listing tools is free on Routeur’s side; each mcp_call costs the requests that tool makes.
Agents SDK
The Python SDK connects to the server itself, so the key stays in your process. Class and parameters from openai.github.io/openai-agents-python/mcp.Python
cache_tools_list=True lists the 38 tools once per process instead of every turn; listing is free on Routeur’s side, but it is a round trip. timeout is per request; a composed tool can take a few seconds because it fans out to up to five REST calls, and the server bounds one call at 25 seconds. max_retry_attempts retries list_tools and call_tool on transport errors; a tool error such as rate_limited is returned as a result, not raised, so the agent reads the seconds to wait.
Codex CLI
Codex stores the token’s environment variable name, not the token. Command and config from OpenAI’s Codex MCP documentation.~/.codex/config.toml entry:
Authorization: Bearer .... Routeur offers no OAuth (an unauthenticated request gets 401 with WWW-Authenticate: Bearer realm="routeur" and no authorization-server metadata), so the bearer token is the only method that applies.
ChatGPT
ChatGPT adds remote MCP servers through Developer mode (Settings > Security and login > Developer mode, available to Pro, Plus, Business, Enterprise and Education accounts on the web). When you add a server, the authentication choices are OAuth, No Authentication or a mix of the two; there is no field for an API key or a custom header (ChatGPT Developer mode, checked on 2026-09-17). Routeur authenticates with an API key only, so it cannot be added to ChatGPT as a custom connector today. Use the Responses API or the Agents SDK above, which do send headers, or Codex. If Routeur adds OAuth it will be announced in the changelog and on this page.Cost control
find_opportunities reads up to four endpoints and market_snapshot five, so each such call spends that many requests from your key’s quota. Give an agent a budget in its instructions (“at most four Routeur calls per answer”), prefer search_markets then one market_snapshot over sweeping categories, and restrict allowed_tools so the model does not reach for list_markets with a large limit when a composed tool would do.
Related
- Any MCP client: the protocol over curl, required headers,
mcp-remote. - Agent workflows: the sequences to expect from the agent, with observed output.
- Reading order for LLMs: the ten facts to put in your agent’s instructions.