MCP / Setup / Codex MCP

Every AI model inside Codex

Add one MCP server to Codex and it can call every model on the catalog: ask GPT, Gemini, Grok or DeepSeek for a second opinion with compare, search the web, transcribe audio, embed text, and make images, video and speech with the files handed back. One remote URL, one prepaid key, set up with four lines in config.toml.

Connect

Add the server to Codex

The server is https://api.relayswitch.io/mcp, Streamable HTTP, with your key sent as a Bearer header. Keys start sk-relay-.

~/.codex/config.toml

toml
1[mcp_servers.relayswitch]
2url = "https://api.relayswitch.io/mcp"
3bearer_token_env_var = "RELAYSWITCH_KEY"

Codex sends Authorization: Bearer with the variable’s value. The CLI, the IDE extension and the desktop app share this file. Doc: learn.chatgpt.com/docs/extend/mcp

Or from the terminal

bash
1codex mcp add relayswitch --url https://api.relayswitch.io/mcp \
2 --bearer-token-env-var RELAYSWITCH_KEY

Check it from a terminal

bash
1curl https://api.relayswitch.io/mcp \
2 -H "Authorization: Bearer $RELAYSWITCH_KEY" \
3 -H "Content-Type: application/json" \
4 -H "Accept: application/json, text/event-stream" \
5 -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'
Tools

What the client can call

The tools this page is about. The server lists 15 in all; the rest are on the MCP server page.

ToolWhat it doesKey
compareThe same question to 2 to 5 models at once: every answer side by side with its cost and time.Bearer
chatA conversation to any chat model, with a system prompt, images for the models that see them, and web search.Bearer
searchOne web search: titles, URLs, snippets and dates, up to 10 results.Bearer
generateRuns any image, video, speech, music or 3D model and returns the files, a finished image inline.Bearer
transcribeSpeech in an audio or video file at a URL to text, or translated into English.Bearer
list_modelsEvery chat, embedding, rerank and transcription model with its type, the tool that runs it and its price.none
Prices

What each call costs, read live

From the catalog at render. The developer’s list price is shown where the catalog has it.

ModelInput / MOutput / MList input / MList output / M
Gemini 3.1 Pro Previewgemini-3.1-pro-preview$1.20$7.20$2.00$12.00
Grok 4.6grok-4.6$0.60$1.80$2.00$6.00

USD per million tokens. compare bills each model it asks at its own rate.

ModelSettingPriceDeveloper’s list
Nano Banana 2nano-banana-2resolution 1K$0.0402 per image$0.067
resolution 2K$0.056 per image$0.101
resolution 4K$0.072 per image$0.151
Veo 3.1 Fastveo-3.1-fastresolution 720p$0.48 per generation$0.80
resolution 1080p$0.576 per generation$0.96
resolution 4k$1.20 per generation$2.40

Charged when the model accepts the task; a failed generation is refunded in full.

Try it

What to ask once it is connected

Plain requests; the client picks the tool.

  • Use compare to ask gpt-5.2, gemini-3.1-pro-preview and grok-4.6 to review this diff, then tell me where they disagree.
  • Search the web for the latest release notes of this library and summarize what changed.
  • Generate a 16:9 header image for the README with nano-banana-2, quote it first.
  • Transcribe this meeting recording (paste its https URL) and pull out the action items.
  • List the embedding models with list_models and pick one for this repo’s docs search.
FAQs

Codex MCP: questions

Setup, models and billing.

Open the console

A key in under a minute

Get a key

Or email hello@relayswitch.io

Every model as a tool in your AI

From $10 by card or in USDT, USDC, BTC, ETH, SOL. Prepaid, no subscription, no KYC.

Join on Telegram