codex icon indicating copy to clipboard operation
codex copied to clipboard

support for streamable HTTP MCP servers not working properly

Open realyn opened this issue 1 year ago • 37 comments

What version of Codex is running?

0.44.0

Which model were you using?

gpt-5-codex

What platform is your computer?

MacOS

What steps can reproduce the bug?

Both notion and amap MCP servers should load correctly and display their available tools, instead of showing Tools: (none).

Configuration (config.toml): [mcp_servers.notion] url = "https://mcp.notion.com/mcp"

[mcp_servers.amap] url = "https://mcp.amap.com/mcp?key=<my_key>"

Steps to Reproduce: Start Codex. Run /mcp. Observe the loaded MCP servers. Actual Output:

• Server: notion • URL: https://mcp.notion.com/mcp • Tools: (none)

• Server: amap • URL: https://mcp.amap.com/mcp?key=<my_key> • Tools: (none)

realyn avatar Oct 04 '25 02:10 realyn

Same here, github MCP also does not work

if I enable experimental_use_rmcp_client = true, I get error

■ MCP client for `github` failed to start: handshaking with MCP server failed: Send message error Transport
[rmcp::transport::worker::WorkerTransport<rmcp::transport::streamable_http_client::StreamableHttpClientWorker<r
eqwest::async_impl::client::Client>>] error: Client error: HTTP status client error (400 Bad Request) for url
(https://api.githubcopilot.com/mcp/), when send initialize request

if I disable experimental_use_rmcp_client = true, no error but the mcp shows tools

version 0.44.0

Meowzz95 avatar Oct 04 '25 02:10 Meowzz95

Same here, Rube MCP also does not work version 0.44.0

wo0d avatar Oct 04 '25 02:10 wo0d

same here, nuxt ui MCP does not work version: 0.44.0

https://ui.nuxt.com/mcp, shows no tools available even with web search

Suryapratap-R avatar Oct 04 '25 04:10 Suryapratap-R

I’m experiencing the same problem — I’m also unable to use the Figma MCP.

ginishuh avatar Oct 04 '25 05:10 ginishuh

Same problem. With the Exa MCP

ray-amjad avatar Oct 04 '25 08:10 ray-amjad

Same issue with custom-written http MCP, showing "Tools: (none)" despite the MCP working fine with other tools

alan-vaultn avatar Oct 04 '25 12:10 alan-vaultn

same issue on Windows 10 using codex 0.44.0 with:

[mcp_servers.context7]
url = "https://mcp.context7.com/mcp"

[mcp_servers.gitmcp]
url = "https://gitmcp.io/docs"

[mcp_servers.ref]
url = "https://api.ref.tools/mcp?apiKey=ref-<REMOVED>"

Using the mcp-remote wrapper as workaround all tools are available, so it is a bug in the codex MCP implementation and not in the streamable MCP servers.

sebthom avatar Oct 04 '25 19:10 sebthom

MacOS 0.44.0

same issue:

experimental_use_rmcp_client = true

[mcp_servers.svelte]
url = "https://mcp.svelte.dev/mcp"

kirso avatar Oct 05 '25 05:10 kirso

Seeing the exact same issue with GitHub MCP. Tried with experimental_use_rmcp_client = true.

Do any real humans at OpenAI test the code that ships anymore? 😉

codylund avatar Oct 05 '25 16:10 codylund

My full config.toml:

model = "gpt-5-codex"
model_reasoning_effort = "high"

[projects.'\\?\C:\Work\ICS']
trust_level = "trusted"

experimental_use_rmcp_client = true
[mcp_servers.figma]
url = "http://127.0.0.1:3845/mcp"

http://127.0.0.1:3845/mcp works in browser.

c:\Work\ICS>codex
╭────────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.44.0)                      │
│                                                │
│ model:     gpt-5-codex high   /model to change │
│ directory: c:\Work\ICS                         │
╰────────────────────────────────────────────────╯

  To get started, describe a task or try one of these commands:

  /init - create an AGENTS.md file with instructions for Codex
  /status - show current session configuration
  /approvals - choose what Codex can do without approval
  /model - choose what model and reasoning effort to use
  /review - review any changes and find issues

/mcp

🔌  MCP Tools

  • No MCP tools available.

IvanSadovskyi avatar Oct 05 '25 20:10 IvanSadovskyi

Can confirm that mcp-remote works fine, guess we'll just settle for this until the issue is fixed. This is with Codex running inside WSL.

williamjshipman avatar Oct 06 '25 15:10 williamjshipman

https://github.com/openai/codex/issues/4707#issuecomment-3367779411

just to report v0.45.0 still the same


adding error detail

■ MCP client for `github` failed to start: handshaking
with MCP server failed: Send message error Transport
[rmcp::transport::worker::WorkerTransport<rmcp::transport::streamable_http_client::StreamableHttpCl
ientWorker<reqwest::async_impl::client::Client>>] error: Client error: HTTP status client error
(400 Bad Request) for url (https://api.githubcopilot.com/mcp), when send initialize request

config

experimental_use_rmcp_client = true

[mcp_servers.github]
url = "https://api.githubcopilot.com/mcp"
bearer_token = "xxx"

Meowzz95 avatar Oct 07 '25 07:10 Meowzz95

After upgrading to 0.45, my problem has been solved

realyn avatar Oct 07 '25 09:10 realyn

Yes, when support for Stremeable Http mcp's with custom headers?

Please I need something like this

experimental_use_rmcp_client = true
[mcp_servers.dataflow]
url = "https://dataflow-mcp.figma.com/mcp"
[mcp_servers.dataflow.http_headers]
x-internal-token = "Bearer : {{token}}"

But is currently not supported, Help!! :sad: :panic-up:

jdsalasca avatar Oct 08 '25 00:10 jdsalasca

Same here, Rube MCP also does not work version 0.44.0

After upgrading to 0.45, problem has been solved

wo0d avatar Oct 08 '25 03:10 wo0d

The problem with the custom header is still not solved, the backend is waiting for a header called x-internal-token which I cannot sent

jdsalasca avatar Oct 08 '25 04:10 jdsalasca

Hey folks, it seems it's due to an error in the way the Authorization header is formed. A fix has been merged and will probably packaged into a release soon: #4846

I can confirm that after building from source, the Github remote MCP server now works. If you want to do so, please note that another PR #4904 changes the Authorization config for remote MCP servers.

buzzb0x avatar Oct 08 '25 11:10 buzzb0x

Hey folks, it seems it's due to an error in the way the Authorization header is formed. A fix has been merged and will probably packaged into a release soon: #4846

I can confirm that after building from source, the Github remote MCP server now works. If you want to do so, please note that another PR #4904 changes the Authorization config for remote MCP servers.

Having seen that even OpenAI engineers made the "Bearer Bearer token" mistake and managed to ship the production code is such a relief. We’re all humans, I guess.

Meowzz95 avatar Oct 08 '25 15:10 Meowzz95

With 0.46 I see some remote servers showing tools, while others not. Invthe log I see

2025-10-09T04:41:07.928066Z  WARN Failed to list tools for MCP server 'myRemoteServer': Err( "tools/list failed: Transport closed", ) 2025-10-09T04:41:08.045592Z  INFO aggregated 25 tools from 4 servers

Anyone know why (could it be timeout, no sse fallback or something else)?

rwjdk avatar Oct 09 '25 04:10 rwjdk

I got same error.

0.46, I can invoke codex codex mcp login atlassian and get successful oauth callback.

This is my ~/.codex/config.toml

experimental_use_rmcp_client = true

[mcp_servers.atlassian]
url = "https://mcp.atlassian.com/v1/sse

When I start the codex cli will show these error.

MCP client for `atlassian` failed to start: handshaking with MCP server failed: Send message error Transport [rmcp::transport::worker::WorkerTransport<rmcp::transport::streamable_http_client::StreamableHttpClientWorker<rmcp::transport::auth::AuthClient<reqwest::async_impl::client::Client>>>] error:
Client error: HTTP status client error (404 Not Found) for url (https://mcp.atlassian.com/v1/sse), when send initialize request

Jian-Min-Huang avatar Oct 09 '25 10:10 Jian-Min-Huang