Streamable http MCP server handshaking failed

Resolved 💬 16 comments Opened Oct 15, 2025 by ouyangjunfei Closed Oct 23, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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:

<img width="1908" height="970" alt="Image" src="https://github.com/user-attachments/assets/4fbb87c2-cbfe-4ebc-9f97-9030b8f210f7" />

What is the expected behavior?

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

Same MCP Server URL for claude code works fine

<img width="2096" height="598" alt="Image" src="https://github.com/user-attachments/assets/562364a5-48b2-4662-87fe-aee0f513bbbb" />

What do you see instead?

_No response_

Additional information

_No response_

View original on GitHub ↗

16 Comments

github-actions[bot] contributor · 9 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #5044
  • #3196
  • #4400

Powered by Codex Action

moxi000 · 9 months ago

same problem, however correctly work in cursor and claudecode

gpeal contributor · 9 months ago

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?

moxi000 · 9 months ago
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

hwait · 9 months ago

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.

moxi000 · 9 months ago
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.

hwait · 9 months ago

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
dominicdill · 9 months ago

<img width="1892" height="291" alt="Image" src="https://github.com/user-attachments/assets/b0e3cca5-c57f-4448-9e33-1e29b9347447" />

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::StreamableHttpClientWorker<reqwest::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:

<img width="308" height="37" alt="Image" src="https://github.com/user-attachments/assets/ce386285-70e9-41ad-afb2-e9b25b5345f2" />

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

gpeal contributor · 9 months ago
<img alt="Image" width="1892" height="291" src="https://private-user-images.githubusercontent.com/97637822/504291227-b0e3cca5-c57f-4448-9e33-1e29b9347447.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjExNTE5NDcsIm5iZiI6MTc2MTE1MTY0NywicGF0aCI6Ii85NzYzNzgyMi81MDQyOTEyMjctYjBlM2NjYTUtYzU3Zi00NDQ4LTllMzMtMWUyOWI5MzQ3NDQ3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTEwMjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMDIyVDE2NDcyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNkNTRlMDFjNmVmMmRiNzQ2YzFhY2QyNzY0ZGFiNDFmMzNiMDRkMzAwMjJmZDk2MTliMGE1YmVlMDNmNjU4ZTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Hu25jpKNAzVfMzACO1J8JCvj3ugyzADMOIhhirsPcz8"> 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: <img alt="Image" width="308" height="37" src="https://private-user-images.githubusercontent.com/97637822/504291533-ce386285-70e9-41ad-afb2-e9b25b5345f2.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjExNTE5NDcsIm5iZiI6MTc2MTE1MTY0NywicGF0aCI6Ii85NzYzNzgyMi81MDQyOTE1MzMtY2UzODYyODUtNzBlOS00MWFkLWFmYjItZTliMjViNTM0NWYyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTEwMjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUxMDIyVDE2NDcyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUxYjIwNzgzOTBlNGNlMTcyZmFjMmNjYWNmNjdiYjU5OTJhNzEyNWIzNTYyOWRhYmMwNGQzMGMzYWVjNjhhOGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.uWAImo_rsY6GLpi2iEAtZFAuB8oiB2WDgeAxHWMGNRg"> 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

<img width="618" height="254" alt="Image" src="https://github.com/user-attachments/assets/d92e3829-b139-4fb8-9887-cae20f7a4e38" />

moxi000 · 9 months ago

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

rafaelquintanilha · 9 months ago

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
gpeal contributor · 9 months ago
@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.

gpeal contributor · 9 months ago

@moxi000 your issue will be resolved by https://github.com/modelcontextprotocol/rust-sdk/pull/497

moxi000 · 9 months ago
@moxi000 your issue will be resolved by modelcontextprotocol/rust-sdk#497

Thanks

hwait · 9 months ago
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!

gpeal contributor · 9 months ago

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