codex CLI issue
Have this in codex CLI (when running both claude code ...)
[mcp_servers.code-context-engine]
command = "cce"
args = ["mcp"]
enabled = true
⚠ MCP client for `code-context-engine` failed to start: MCP startup failed: handshaking with MCP
server failed: connection closed: initialize response
⚠ MCP startup incomplete (failed: code-context-engine)
● mcp running managed by Claude Code
Thanks for the report — this is a config issue, not a server crash.
cce does not have an mcp subcommand. The MCP server is started via cce serve. Calling cce mcp exits immediately with Error: No such command 'mcp' (exit 2), which Codex then surfaces as connection closed: initialize response because the process died before responding to the MCP initialize handshake.
Your config also needs --project-dir so the server knows which project's index to expose.
Fix
Replace your ~/.codex/config.toml block with:
[mcp_servers.context-engine]
command = "cce"
args = ["serve", "--project-dir", "/absolute/path/to/your/project"]
(Use the absolute path to the project you want indexed.)
Easier: let cce init write it for you
From inside your project directory:
cce init
This auto-detects Codex (when .codex/ exists) and writes the correct TOML block, plus indexes the project. No hand-editing.
To verify the server actually starts
cce serve --project-dir /absolute/path/to/your/project
It should sit waiting on stdio (no output, no exit). Ctrl-C to stop. If that runs cleanly, Codex will be able to connect.
Let us know if cce init doesn't pick up your Codex setup and we'll dig in.
@fazleelahhee Thanks it works. Please add those config in the readme.
What happen if I use Claude Code and Codex at same time ? ---> 2 MCP server running ?