MCP doesn't work for out internal MCP server

Resolved 💬 5 comments Opened Oct 10, 2025 by mgryning Closed Nov 15, 2025

What version of Codex is running?

codex-cli 0.46.0

Which model were you using?

GPT-5-Codex

What platform is your computer?

Linux 5.15.167.4-microsoft-standard-WSL2 x86_64 x86_64

What steps can reproduce the bug?

I cannot get our internal mcp server to properly connect in Codex. I works fine in Claude Code.

This is the output after a longer debugging session with Codex:

  • Every Codex launch logged MCP client for 'sql' failed to start: handshaking with MCP server failed: Send message error Transport

[rmcp::transport::worker::WorkerTransport<rmcp::transport::streamable_http_client::Client>> error: Transport channel closed, when send
initialized notification in ~/.codex/log/codex-tui.log.

  • The MCP SQL server showed back-to-back Session created immediately followed by Session deleted, indicating the client dropped the

connection right after the notification step.

  • Direct curl tests confirmed the server initially required a JSON payload and echoed Mcp-Session-Id; when those were missing the server

returned 400 Method not found: undefined, which likely triggered the transport close.

  • Even after the server began returning 200 OK (i changed this on the server to ignore with header was missing) for the empty notifications/initialized request, Codex’s experimental RMCP transport

continued to abort the handshake with the same “transport channel closed” message.

  • Using the npx mcp-remote@latest … --log bridge succeeds end-to-end; the handshake problem only occurs with the built-in RMCP client

in Codex.

No matter what I do, the MCP just doesn't seem to work properly using HTTPS protocol

What is the expected behavior?

That the MCP works like in Claude Code

What do you see instead?

Failed to connect

Additional information

_No response_

View original on GitHub ↗

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