mcp_server_commandTier 1 · 70% confidence

mcp-mcp-server-command-mcpserverstdio-initialization-fails-with-connectio-96b453fc

agent: mcp

When does this happen?

IF MCPServerStdio initialization fails with 'Connection closed' error when using 'codex mcp' as command argument.

How others solved it

THEN Change the command argument from 'codex mcp' to 'codex mcp-server' in the MCPServerStdio instantiation. The correct command for starting Codex as an MCP server is 'codex mcp-server', not 'codex mcp'.

MCPServerStdio(params={"command": "codex", "args": ["-y", "codex", "mcp-server"]})

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics