Skip to content

Streamable http MCP server handshaking failed #5208

Closed

Description

@ouyangjunfei

What version of Codex is running?

codex-cli 0.46.0

Which model were you using?

qwen3-coder-plus

What platform is your computer?

Darwin 23.5.0 arm64 arm

What steps can reproduce the bug?

  1. Add a custom mcp server config(url just for example cause it's deployed in our net)
[mcp_servers.custom]
url = "https://xxx.yyy.com/mcp"

2 Open codex

codex
  1. Wait
    CLI shows error :

MCP client for custom failed to start: handshaking with MCP server failed: Send message error Transport
[rmcp::transport::worker::WorkerTransport<rmcp::transport::streamable_http_client::StreamableHttpClientWorker<reqwest::a
sync_impl::client::Client>>] error: Transport channel closed, when send initialized notification

And no tools:

Image

What is the expected behavior?

No errors for mcp servers, and I can see tools.

Same MCP Server URL for claude code works fine

Image

What do you see instead?

No response

Additional information

No response

Activity

  1. added
    mcpIssues related to the use of model context protocol (MCP) servers
    on Oct 15, 2025
  2. moxi000 commented on Oct 17, 2025

    @moxi000

    same problem, however correctly work in cursor and claudecode

  3. gpeal commented on Oct 17, 2025

    @gpeal
    Contributor

    Can you reproduce this issue with any other MCP servers? Does your MCP server support dynamic client registration? Does it require anything else like custom headers?

  4. self-assigned this
    on Oct 17, 2025
  5. moxi000 commented on Oct 18, 2025

    @moxi000

    Can you reproduce this issue with any other MCP servers? Does your MCP server support dynamic client registration? Does it require anything else like custom headers?

    @gpeal Yes, I found that others have similar feedback. We use different MCP servers. To make it easier for you to test, I provide you with an MCP link with an authorization code. In cursor or claudecode, you can directly add the URL to obtain the tool list and call it. It will only report an error in codex.

    https://mcp.allflow.cn/message?token=uwP1eH5SoKaA2kRGGKjk9GCbbkvtk06RUVUtNbZH

  6. hwait commented on Oct 18, 2025

    @hwait

    I can confirm the issue with Linear:

    model = "gpt-5-codex"
    experimental_use_rmcp_client = true
    
    [mcp_servers]
    [mcp_servers.linear]
    url = "https://mcp.linear.app/mcp"
    

    It worked well couple of days ago.

  7. moxi000 commented on Oct 18, 2025

    @moxi000

    I can confirm the issue with Linear:

    model = "gpt-5-codex"
    experimental_use_rmcp_client = true
    
    [mcp_servers]
    [mcp_servers.linear]
    url = "https://mcp.linear.app/mcp"
    

    It worked well couple of days ago.
    @hwait Can you test with this link? https://mcp.allflow.cn/message?token=uwP1eH5SoKaA2kRGGKjk9GCbbkvtk06RUVUtNbZH

    I still can’t use it normally.

  8. hwait commented on Oct 18, 2025

    @hwait

    I updated codex to v0.47.0 but unfortunately it did not help.
    @moxi000 your server gives me

    MCP client for `allflow` failed to start: handshaking with MCP server failed: Send message error Transport
    [rmcp::transport::worker::WorkerTransport<rmcp::transport::streamable_http_client::StreamableHttpClientWorker<reqwest::async
    _impl::client::Client>>] error: Transport channel closed, when send initialized notification
    
  9. dominicdill commented on Oct 22, 2025

    @dominicdill
    Image

    MCP client for langchain failed to start: handshaking with MCP server failed: Send message error Transport
    [rmcp::transport::worker::WorkerTransport<rmcp::transport::streamable_http_client::StreamableHttpClientWorkerreqwest::async_impl::client::Client>] error: Client error: HTTP status server error (500 Internal
    Server Error) for url (https://docs.langchain.com/mcp), when send initialize request

    config.toml:

    Image

    Is this a related issue? Have I done something wrong?

  10. gpeal commented on Oct 22, 2025

    @gpeal
    Contributor
    Image MCP client for `langchain` failed to start: handshaking with MCP server failed: Send message error Transport [rmcp::transport::worker::WorkerTransport] error: Client error: HTTP status server error (500 Internal Server Error) for url (https://docs.langchain.com/mcp), when send initialize request

    config.toml:

    Image Is this a related issue? Have I done something wrong?

    Sounds like there was an issue on their end, I just tried and it worked

    Image
  11. moxi000 commented on Oct 22, 2025

    @moxi000
  12. rafaelquintanilha commented on Oct 22, 2025

    @rafaelquintanilha

    I had the same issue. Fixed by doing the following:

    codex mcp remove linear
    codex mcp add --url https://mcp.linear.app/mcp linear
    codex mcp login linear -c experimental_use_rmcp_client=true
    
    # Confirm it's working
    codex mcp get linear
    
  13. gpeal commented on Oct 22, 2025

    @gpeal
    Contributor

    @gpeal Can you try with my link?https://mcp.allflow.cn/message?token=uwP1eH5SoKaA2kRGGKjk9GCbbkvtk06RUVUtNbZH

    I do see the issue with that mcp server. I'll investigate separately. Feel free to take a look as well. It's all open source.

  14. gpeal commented on Oct 22, 2025

    @gpeal
    Contributor

    @moxi000 your issue will be resolved by modelcontextprotocol/rust-sdk#497

  15. moxi000 commented on Oct 23, 2025

    @moxi000

    @moxi000 your issue will be resolved by modelcontextprotocol/rust-sdk#497

    Thanks

  16. hwait commented on Oct 23, 2025

    @hwait

    I had the same issue. Fixed by doing the following:

    codex mcp remove linear
    codex mcp add --url https://mcp.linear.app/mcp linear
    codex mcp login linear -c experimental_use_rmcp_client=true
    
    # Confirm it's working
    codex mcp get linear
    

    Thank you, Rafael, worked well!

  17. gpeal commented on Oct 23, 2025

    @gpeal
    Contributor

    I'm going to close this out now because the allflow issue was fixed by #5542

    Please open new issues for anything that happens in 0.48 or later

  18. added a commit that references this issue on Oct 24, 2025
    abccd3e
  19. added a commit that references this issue on Oct 28, 2025
    7e76388
  20. added a commit that references this issue on Nov 10, 2025
    3e7cea7
  21. added a commit that references this issue on Nov 14, 2025
    37278b6
  22. added a commit that references this issue on Dec 2, 2025
    621c054
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) servers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions