-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Description
Summary
When Codex (OpenAI's CLI client) launches @sylphx/pdf-reader-mcp over stdio, the handshake fails immediately with connection closed: initialize response. Running the same command manually works fine.
Reproduction
- Add this entry to
~/.codex/config.toml:[mcp_servers.pdf_reader_mcp] command = "bunx" args = ["-y", "@sylphx/pdf-reader-mcp"] startup_timeout_sec = 30
- Start Codex CLI and run
/mcp(orcodex mcp list). - Codex logs show
WARN MCP client for 'pdf_reader_mcp' failed to start: handshaking with MCP server failed: connection closed: initialize response.
Additional Context
- Running
bunx -y @sylphx/pdf-reader-mcpmanually and piping JSON-RPC (e.g.,tools/list) succeeds and returns the tool definition. - Codex newest MCP client is enabled via
[features].rmcp_client = true. ~/.codex/log/codex-tui.logonly logs the generic warning; no extra stack trace appears.codex mcp listwithCODex_MCP_LOG=tracecurrently panics in the Rustsystem-configurationcrate, so it’s hard to collect more traces.
Is there anything we should tweak on the server side (e.g., flush stderr, disable some capability), or is this a known incompatibility with Codex’s stdio startup? Any guidance would be appreciated.
Metadata
Metadata
Assignees
Labels
No labels