Skip to content

Cannot initialize Streamable HTTP MCP servers #11284

Open

Description

@yangfeng20

What version of Codex CLI is running?

codex-cli 0.98.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.3-codex (current)

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What terminal emulator and version are you using (if applicable)?

PowerShell

What issue are you seeing?

English

When adding certain third-party MCP servers that use Streamable HTTP / HTTP streaming transport,
Codex CLI fails to initialize or use them.

Typical symptoms include:

  • MCP server appears but shows no tools available
  • Initialization or handshake fails
  • MCP cannot be used in Codex CLI at all

The same MCP servers work correctly in other MCP clients (e.g. Cursor, Claude Desktop, or other MCP-compatible tools).

This suggests a Codex CLI–specific compatibility issue with some Streamable HTTP MCP implementations.


中文

当在 Codex CLI 中添加 使用 Streamable HTTP / HTTP 流式传输的第三方 MCP Server 时,
Codex CLI 无法正常初始化或使用这些 MCP。

常见表现包括:

  • MCP Server 能显示,但 Tools 为空
  • 初始化 / 握手失败
  • 在 Codex CLI 中完全无法调用 MCP

但 同样的 MCP Server 在其他 MCP 客户端中可以正常使用,
说明这更像是 Codex CLI 对部分 Streamable HTTP MCP 的兼容性问题。

What steps can reproduce the bug?

English

  1. Configure a third-party MCP server that uses Streamable HTTP in ~/.codex/config.toml
  2. Start Codex CLI
  3. Run /mcp or attempt to use the MCP
  4. Observe that the MCP fails to initialize or exposes no tools

Example config (redacted):

[mcp_servers.example_http_mcp]
url = "https://example.com/mcp"
transport = "streamable_http"

This MCP works correctly in other MCP clients using the same endpoint.

中文

  1. 在 ~/.codex/config.toml 中配置一个 使用 Streamable HTTP 的第三方 MCP Server
  2. 启动 Codex CLI
  3. 执行 /mcp 或尝试使用该 MCP
  4. 发现 MCP 初始化失败,或工具列表为空
[mcp_servers.example_http_mcp]
url = "https://example.com/mcp"
transport = "streamable_http"

该 MCP 在其他 MCP 客户端中可正常工作。

What is the expected behavior?

English

Codex CLI should be able to:

  • Successfully initialize Streamable HTTP MCP servers that follow the MCP specification, or
  • Provide clear and actionable error messages explaining why initialization fails

Behavior should be consistent with other MCP clients when connecting to the same MCP server.


中文

Codex CLI 应当:

  • 能够成功初始化符合 MCP 规范的 Streamable HTTP MCP,或
  • 给出清晰、可操作的错误提示,说明初始化失败的原因

在连接同一个 MCP Server 时,其行为应与其他 MCP 客户端保持一致。

Additional information

English

As a workaround, this issue can be mitigated by using a local transport bridge
(e.g. running supergateway to convert Streamable HTTP MCP → local STDIO MCP),
and then connecting Codex CLI to the local STDIO MCP instead.

This suggests the issue is related to Codex CLI’s handling of
Streamable HTTP / SSE-style MCP transports rather than the MCP servers themselves.


中文

作为临时解决方案,可以通过在本地使用 transport bridge
(例如使用 supergateway 将 Streamable HTTP MCP 转换为本地 STDIO MCP),
再让 Codex CLI 连接本地 STDIO MCP,从而绕过该问题。

这进一步表明问题更可能出在 Codex CLI 对 Streamable HTTP / SSE 类 MCP 的处理方式,
而不是 MCP Server 本身。

解决方案示例 Solution example

Image

Activity

  1. added
    bug
    on Feb 10, 2026
  2. added
    CLI
    mcp
    windows-os
    on Feb 10, 2026
  3. removed
    CLI
    on Feb 10, 2026
  4. changed the title [-]Codex CLI cannot initialize some Streamable HTTP MCP servers that work in other MCP clients Codex CLI 无法初始化部分 Streamable HTTP MCP(其他客户端可正常使用)[/-] [+]Cannot initialize Streamable HTTP MCP servers[/+] on Feb 14, 2026
  5. grytrn commented on Feb 26, 2026

    @grytrn

    I have this issue as well. I can add MCP but not see any tool.
    It shows as failed at start: MCP startup incomplete (failed: github
    But in /mcp listing it shows like this:
    • github
    • Status: enabled
    • Auth: Bearer token
    • URL: https://api.githubcopilot.com/mcp/
    • Tools: (none)
    • Resources: (none)
    • Resource templates: (none)

    same url and auth token is working with Claude code

  6. yangfeng20 commented on Feb 27, 2026

    @yangfeng20
    Author

    @grytrn Let's try it with my makeshift method above.

  7. jalapeno0516 commented on Oct 31, 2026

    @jalapeno0516

    I can reproduce a similar Streamable HTTP MCP initialization failure on a newer version of Codex Desktop for Windows.

    Environment

    • Windows 11 x64
    • Codex Desktop: 26.1027.3384.0
    • Bundled Codex engine: 0.166.0-alpha.5.1
    • MCP server: Obsidian MCP Connector 3.3.0
    • Local Streamable HTTP endpoint (127.0.0.1) with Bearer authentication

    Observed behavior

    Both Codex Desktop and its bundled CLI engine (launched with --no-daemon) fail during MCP initialization:

    MCP startup failed: handshaking with MCP server failed
    Client error: HTTP request failed: error decoding response body,
    when send initialize request
    

    No tools from the HTTP MCP server become available.

    Control tests

    • The failure occurs with both the broker and direct HTTP endpoints of the Obsidian MCP Connector.
    • An authenticated PowerShell initialize request returns HTTP 200 with a valid JSON-RPC/MCP response.
    • Claude Code on the same Windows machine successfully connects to the direct endpoint and performs file listing, reading, and creation.
    • A separate STDIO MCP test server works correctly in Codex Desktop.
    • The same HTTP decoding error also appears in logs for the bundled codex_apps MCP service.

    Diagnostics

    Additional Rust logging shows:

    HttpRequest(HttpRequest("error decoding response body"))
    

    The underlying response-decoding cause is not exposed in the logs examined.

    No proxy configuration was detected, and no security software blocking event was identified. However, network/security software interaction has not been conclusively ruled out.

    Questions

    1. Is this a known limitation or bug in the Windows Streamable HTTP MCP client?
    2. Is there a supported way to obtain more detailed decoding diagnostics?
    3. Is there a supported configuration-only workaround that does not require replacing the bundled engine or adding a transport bridge?

    I would be happy to provide additional sanitized diagnostics if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmcpwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions