MCP server works well with Claude Code CLI but fails with Codex when using the same configuration

Resolved 💬 4 comments Opened Sep 8, 2025 by fullofcaffeine Closed Oct 3, 2025
💡 Likely answer: A maintainer (gpeal, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.30.0

Which model were you using?

gpt-5

What platform is your computer?

Darwin 24.4.0 arm64 arm

What steps can reproduce the bug?

Hi!

I'm trying to setup https://github.com/cjo4m06/mcp-shrimp-task-manager as a MCP using the same configuration that already works well for the Claude Code CLI. Here's the one for Claude (from ~/.claude.json):

  "mcpServers": {
    "shrimp-task-manager-global": {
      "type": "stdio",
      "command": "node",
      "args": [
        "/Users/foobar/workspace/code/mcp-shrimp-task-manager/dist/index.js"
      ],
      "env": {
        "DATA_DIR": "/Users/foobar/workspace/shrimp-mcp-data",
        "TEMPLATES_USE": "en",
        "ENABLE_GUI": "true"
      }
    },

This works well for the CC CLI. However, I tried setting up the same server as MCP for Codex but it can't setup the connection for some reason. Here's my full ~/.codex/config.toml just in case:

[projects."/Users/foobar/workspace/code/test"]
trust_level = "trusted"

[projects."/Users/foobar/worksapce/code/mcp-shrimp-task-manager"]
trust_level = "trusted"
approval_policy = "never"
sandbox_mode = "danger-full-access"

[tui.theme]
name = "dark-shinobi-dusk"

[mcp_servers_disabled]

[mcp_servers]

[mcp_servers."shrimp-task-manager-global"]
	name = "shrimp-task-manager-global"
	# Prefer absolute node path
	command = "/Users/foobar/.nvm/versions/node/v20.19.3/bin/node"
	args = ["/Users/foobar/workspace/code/mcp-shrimp-task-manager/dist/index.js"]
	transport = "stdio"

[mcp_servers."shrimp-task-manager-global".env]
	DATA_DIR = "/Users/foobar/workspace/shrimp-mcp-data"
	TEMPLATES_USE = "en"
	ENABLE_GUI = "false"

What is the expected behavior?

I expect that the shrimp MCP server to connect/work well just like it does with the Claude Code CLI.

What do you see instead?

I get a 🖐  Failed to create MCP connection manager: request timed out error message without further debugging info a a while after I start codex :(

Additional information

_No response_

View original on GitHub ↗

4 Comments

neurostream · 11 months ago

I wasn't aware of this [__.env] way of setting env vars, so my response might not be very useful...

but in my codex configs, i don't specifiy STDIO since that is the default ( and i'm not even sure if codex supports other JSON-RPC-2 transports ) and set my env in the same block as the MCP server, like:


[mcp_servers.shrimp-task-manager-global]
name    = "shrimp-task-manager-global"
command = "/Users/foobar/.nvm/versions/node/v20.19.3/bin/node"
args    = ["/Users/foobar/workspace/code/mcp-shrimp-task-manager/dist/index.js"]
env = {
  DATA_DIR        = "/Users/foobar/workspace/shrimp-mcp-data",
  TEMPLATES_USE   = "en",
  ENABLE_GUI      = "false"
}

I also don't use these empty blocks, probalby just because I'm unaware of them:

[mcp_servers_disabled]

[mcp_servers]

can this app be configured to write to a log to give some insight about where its startup is hanging?

neurostream · 11 months ago

@fullofcaffeine : curious if you were able to get that mcp server loaded! good luck!

gpeal contributor · 10 months ago

This works on the latest alpha release with experimental_use_rmcp_client = true in config.toml.

Enjoy!

fullofcaffeine · 10 months ago

Oh, it's working! What was the fix? What is the experimental rmcp client and how it differs from the builtin one?