Fix Codex MCP problems when connecting to Metorial
Fix a Metorial MCP server in Codex that lists no tools, times out at startup, or fails to sign in, with codex mcp login, /mcp verbose, and config.toml.
If Codex lists Metorial with no tools, run codex mcp login metorial. Codex can connect to an MCP server without credentials, and Metorial serves tools only after you sign in. Type /mcp verbose in Codex to see the server's status. The CLI, the IDE extension, and the ChatGPT desktop app share one config.toml, so each fix below applies to all three.
What you'll learn
- How to fix sign-in, startup, and timeout problems
- Which
config.tomlsettings hide tools or disable the server - Where Codex writes its logs
Before you start
- Metorial added to Codex (Connect Codex)
- Access to
~/.codex/config.toml - For the Metorial checks, the CLI:
npm install -g @metorial/cli, thenmetorial login
Sign-in
Metorial is listed but has no tools
Codex connected without a sign-in.
Inside a session, /mcp login metorial does the same. On Metorial's consent screen, select the integrations Codex may use.
The browser does not open
Print the URL, open it on any machine, and sign in:
Paste the full redirect URL back into the terminal, even if the browser could not load the callback page.
redirect_uri is not allowed for this portal
Codex returns from the sign-in to a local address such as http://127.0.0.1:<port>/callback/<callback_id>, and the portal does not allow it. Metorial treats 127.0.0.1 as localhost. A portal admin opens Settings, Client Settings, and enables Localhost apps (http://localhost:*/*) under Allowed OAuth Redirects. From the CLI:
The command replaces the portal's whole list. Run portals get first and add the patterns your other clients still need. Then run codex mcp login metorial again.
The callback port is blocked or taken
Codex picks a local port for the callback. Set a fixed one in ~/.codex/config.toml. The portal's Localhost apps pattern accepts any port.
Codex asks you to sign in again
A Metorial sign-in lasts 30 days from the last refresh, and it ends when the token is revoked. Run codex mcp login metorial.
Server and tools
Metorial is missing when Codex starts
Codex gives a server 10 seconds to start, and it waits only 1,000 milliseconds for optional servers before it builds the first tool list. Raise the startup limit and make Codex wait for it:
A project .codex/config.toml is ignored
Codex reads a project-scoped .codex/config.toml only in trusted projects. Trust the project in Codex, or add the server to ~/.codex/config.toml.
The server is disabled or blocked
enabled = false under [mcp_servers.metorial] disables the server. Remove the line.
An admin's managed requirements can also hold an approved list of MCP servers. A server that does not match cannot be enabled, and an empty list disables every MCP server. The admin adds an entry whose identity matches your Magic MCP URL:
Some tools are missing
Look for enabled_tools and disabled_tools under [mcp_servers.metorial] in config.toml. enabled_tools is an allow list, and disabled_tools is applied after it. If neither is set, compare with what Metorial serves:
If metorial tools prints the tool and Codex does not, the tool was left out when you connected Codex. Run codex mcp login metorial again and allow it on the consent screen. If metorial tools does not print it either, an admin's tool filter removes it.
Tool calls fail after a minute
Codex stops a tool call after 60 seconds by default. Raise the limit for the server:
If the error text is The request exceeded the configured tenant timeout of <N>ms., the limit is Metorial's. An admin raises Message processing timeout in the project's Tool Calling settings.
Tool output is cut off
Codex truncates tool output to the model's default budget. Set a budget for one tool:
See the MCP logs
/mcp verbosein a session prints server diagnostics and the tool list.codex mcp listin a shell prints every configured server.- Log files are in
~/.codex/log. Setlog_dirinconfig.tomlto also get the plaintextcodex-tui.log.
Start over
Start a new Codex session and type /mcp. Metorial appears with its tools.
To connect one integration without the browser sign-in, install it with the Metorial CLI. It creates a long-lived MCP token for that integration:
Next steps
- Sign-in and OAuth errors: Metorial's side of the sign-in
- Tools are missing: why Codex sees fewer tools than you expect
- Tool calls fail: what each tool call error means