The short version
codex mcp add benchlm --url https://data.benchlm.ai/mcpThen sign in with a free Data account. It takes an email and a one-time code.
Set up Codex MCP in three steps
1.Add the server
Run this in a terminal. It writes a benchlm entry to ~/.codex/config.toml, sees that the server uses sign-in, and starts it straight away. The server is remote, so there is nothing to install or keep running.
Add BenchLM to Codexcodex mcp add benchlm --url https://data.benchlm.ai/mcp2.Sign in
Codex prints a link and opens a BenchLM page in your browser. Enter your email, type the one-time code we send, and allow the connection. A new email starts a free Data account, with no card. Codex then prints “Successfully logged in.” You only need the login command below to sign in again later.
Working over SSH or in a container with no browser? Use an API key instead: create one in your Data account, export it as BENCHLM_DATA_KEY, and add the server with the second command.
Sign in again latercodex mcp login benchlmOr add the server with an API keyexport BENCHLM_DATA_KEY=your_data_key codex mcp add benchlm --url https://data.benchlm.ai/mcp \ --bearer-token-env-var BENCHLM_DATA_KEY3.Check that Codex sees it
Run codex mcp list. The benchlm row should read enabled, with OAuth under Auth. Inside Codex, /mcp shows the same servers. Then ask a question that needs today’s data, such as the first prompt below.
What the Codex MCP config looks like
The CLI, the IDE extension and the ChatGPT desktop app read the same file, so adding the server once covers all three. This is the entry the commands write. You can also paste it in by hand.
[mcp_servers.benchlm]
url = "https://data.benchlm.ai/mcp"[mcp_servers.benchlm]
url = "https://data.benchlm.ai/mcp"
bearer_token_env_var = "BENCHLM_DATA_KEY"- In the desktop app, the same setting is under Settings, then MCP servers, then Add server. Save it and restart the app. A server that uses sign-in shows an Authenticate button.
- A project can carry its own .codex/config.toml. Codex reads it only in projects you have marked as trusted.
- Never put the key itself in config.toml. bearer_token_env_var names the variable, and Codex reads BENCHLM_DATA_KEY from your environment when it starts.
Three prompts that work right away
Each one is a question a coding agent gets wrong from memory, because rankings and prices have changed since it was trained. Codex picks the tool by itself. You don’t name it.
“Which model has the best coding score at $3 or less per million output tokens? Show the top five with prices.”
Calls
benchlm_recommend. Five models in ranking order, each with its coding score, rank, evidence label, list price and context window.“Compare Claude Sonnet 5.5 and GPT-6.1 Terra for the agent in this repo: coding and agentic rank, price, and context window.”
Calls
benchlm_compare_models. Both models side by side on every ranking, with list prices and release dates, and a link to the comparison page.“This service sends about 40 million input and 8 million output tokens a month. What would the top three coding models cost?”
Calls
benchlm_recommend. The same shortlist with dollars a month for each model at your volume.
Keep the tool list small
The server lists 28 tools. Their definitions come to 6,562 tokens (o200k_base tokenizer, measured November 25, 2026), and a model reads tool definitions before it can use them. If you only want model picks and prices, allow four tools. Their definitions total 1,198 tokens.
[mcp_servers.benchlm]
url = "https://data.benchlm.ai/mcp"
enabled_tools = [
"benchlm_recommend",
"benchlm_compare_models",
"benchlm_get_model",
"benchlm_list_model_pricing",
]enabled_tools is Codex’s allow list for one server. Remove the line to get every tool back, including history on Data Pro. We measured the full cost of a tool list, and when a plain REST call is the better choice, in MCP vs API.
If it doesn’t connect
Codex says the server needs authentication, or a call returns 401
You haven’t signed in yet, or the key isn’t in the environment Codex started from. Run codex mcp login benchlm again, or check that BENCHLM_DATA_KEY is exported in the same shell.
The sign-in page never comes back to Codex
Sign-in finishes on a local callback address (127.0.0.1, on a port Codex picks) on the machine running Codex. On a remote machine the browser can’t reach it, so use an API key there.
BenchLM is missing in the IDE extension or the desktop app
They read config.toml when they start. Restart the app, or reload the editor window, after you add the server.
A call returns monthly_limit or data_pro_required
Free covers 1,000 reads a month of current data. History (rank, price and benchmark changes over time) needs Data Pro, which has a 7-day free trial with no card.
A large answer times out
Codex waits 60 seconds for a tool by default. Ask for fewer rows, or raise tool_timeout_sec for this server in config.toml.
Questions
Does Codex support remote MCP servers?
Yes. Codex connects to local servers that run as a process and to remote servers over Streamable HTTP. BenchLM’s is remote: you give Codex the URL, sign in once, and there is nothing to install or keep running on your machine.
Is BenchLM’s MCP server free to use in Codex?
Yes, on the free Data plan: 1,000 reads a month and 30 requests a minute of current rankings, prices and benchmark results, with no card. One tool call is one read. Checking your usage or data coverage doesn’t use a read.
Does the same setup work in the Codex IDE extension and the ChatGPT desktop app?
Yes. OpenAI’s documentation says the ChatGPT desktop app, the Codex CLI and the IDE extension share one configuration, kept in ~/.codex/config.toml. Add the server once, from whichever of the three you prefer, then restart the other two so they read the new entry. The desktop app also has its own screen for it under Settings.
Where does Codex store MCP servers?
In ~/.codex/config.toml, under a table named mcp_servers followed by the server’s name. A trusted project can also have its own .codex/config.toml. Each entry holds the server’s URL or command, plus optional settings such as enabled_tools and tool_timeout_sec. The codex mcp add command writes the entry for you.
How this page was checked
The add command and the browser sign-in were run end to end against BenchLM’s production server with Codex CLI 0.172.0 on November 25, 2026: Codex signed in, listed 28 tools and completed a tool call. The API key variant was last run on October 10, 2026. Config keys, the shared configuration, the desktop app steps and the default timeout come from OpenAI’s Codex MCP documentation, read November 25, 2026. Codex changes often, so if a step here no longer matches your version, OpenAI’s page wins.
Using another app? The steps for Claude, ChatGPT, Cursor and VS Code are on the Data page. For what a Codex plan includes, see Codex usage limits and AI coding plans compared. The current coding ranking is on the coding leaderboard.