gpt-5-codex unable to use MCP servers

Resolved 💬 3 comments Opened Sep 24, 2025 by AdiRishi Closed Sep 24, 2025

What version of Codex is running?

codex-cli 0.40.0

Which model were you using?

gpt-5-codex

What platform is your computer?

Darwin 24.6.0 arm64 arm

What steps can reproduce the bug?

Use the following config in ~/.codex/config.toml

model = "gpt-5-codex"
model_provider = "litellm"
model_reasoning_effort = "low"
sandbox_mode = "danger-full-access"

# MCP Servers
# ===========

[mcp_servers.context7]
command = "npx"
args = ["-y", "@upstash/context7-mcp", "--api-key", "API_KEY"]

When using gpt-5-codex, the model fails to output anything and seems to silently fail.
We can test this by using a simple prompt - Can you use context7 to get me react docs

What is the expected behavior?

If we switch our config back to gpt-5, we can see that the older model is able to successfully use MCP servers.
See the video below.

https://github.com/user-attachments/assets/83f22c11-92eb-4135-ad72-3314dc388bcc

What do you see instead?

Instead of any actual output, the prompt fails silently, and outputs nothing. See the video below

https://github.com/user-attachments/assets/a1266284-790a-45f7-ba3a-1a2213c43ad1

Additional information

I opened the codex-tui.log file to see if there was anything there, but the only log I could see on a fresh session was

^[[2m2025-09-24T02:27:44.253080Z^[[0m ^[[32m INFO^[[0m aggregated 3 tools from 2 servers

Also this is not just an issue with context7 MCP server, I tried to use sequential-thinking but that didn't work either with gpt-5-codex, same silent output

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗