MCP handshake fails with JetBrains idea server: Unexpected content type "missing-content-type"

Resolved 💬 13 comments Opened Mar 16, 2026 by small-thanks Closed Mar 27, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

0.114.0

What subscription do you have?

pro

Which model were you using?

gpt-5.3-codex

What platform is your computer?

Darwin 25.3.0 arm64 arm

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

Warp

What issue are you seeing?

Description

When attempting to connect to a JetBrains IDE MCP server (IntelliJ IDEA) via Streamable HTTP transport, the MCP client fails during the initialization handshake with a content type error.

Error Message

<img width="991" height="394" alt="Image" src="https://github.com/user-attachments/assets/dc5c29db-4621-47ff-b324-9bb9cfc57462" />

What steps can reproduce the bug?

Steps to Reproduce
Start JetBrains IDE MCP server enabled
Configure Codex CLI to connect to http://localhost:64342/sse
Run codex and observe the handshake failure

modify config is ~/.codex/config.toml

[mcp_servers.idea]
enabled = true
url = "http://127.0.0.1:64342/sse"

What is the expected behavior?

Expected Behavior
Successful MCP handshake and initialization with the JetBrains idea server.

Actual Behavior
Handshake fails because the server responds with Content-Type: missing-content-type (or empty/malformed content type) to the initialize request.

Additional information

_No response_

View original on GitHub ↗

13 Comments

github-actions[bot] contributor · 4 months ago

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

  • #13920

Powered by Codex Action

AlchemyDing · 3 months ago

@small-thanks Has this issue been resolved? I'm encountering the same problem when using IDEA MCP.

small-thanks · 2 months ago
@small-thanks这个问题解决了吗?我使用IDEA MCP时也遇到了同样的问题。

@AlchemyDing
you need update JetBrains idea 2026.1+ and use
[mcp_servers.idea]
url = "http://127.0.0.1:64342/stream"

AlchemyDing · 2 months ago
> @small-thanks这个问题解决了吗?我使用IDEA MCP时也遇到了同样的问题。 > @AlchemyDing > you need update JetBrains idea 2026.1+ and use > [mcp_servers.idea] > url = "http://127.0.0.1:64342/stream"

我是这么使用的,但是我用了clashx 并且开启了tun模式(否则使用不了codex)。我的codex根本识别不到idea的mcp

small-thanks · 2 months ago
> > @small-thanks这个问题解决了吗?我使用IDEA MCP时也遇到了同样的问题。 > > @AlchemyDing > > you need update JetBrains idea 2026.1+ and use > > [mcp_servers.idea] > > url = "http://127.0.0.1:64342/stream" 我是这么使用的,但是我用了clashx 并且开启了tun模式(否则使用不了codex)。我的codex根本识别不到idea的mcp

你用的官方还是中转?我的就是这样配置一下,tun模式开不开都行,你的报错是什么?可以贴出来吗?

AlchemyDing · 2 months ago
> > > @small-thanks这个问题解决了吗?我使用IDEA MCP时也遇到了同样的问题。 > > > @AlchemyDing > > > you need update JetBrains idea 2026.1+ and use > > > [mcp_servers.idea] > > > url = "http://127.0.0.1:64342/stream" > > > 我是这么使用的,但是我用了clashx 并且开启了tun模式(否则使用不了codex)。我的codex根本识别不到idea的mcp 你用的官方还是中转?我的就是这样配置一下,tun模式开不开都行,你的报错是什么?可以贴出来吗?

<img width="1644" height="1362" alt="Image" src="https://github.com/user-attachments/assets/796a94b0-cf17-445d-9741-5a87db2e305d" />

<img width="3330" height="848" alt="Image" src="https://github.com/user-attachments/assets/848d42b8-69fc-42be-b3a7-226a2c43de0c" />

AlchemyDing · 2 months ago

<img width="1528" height="1228" alt="Image" src="https://github.com/user-attachments/assets/2ccdaa98-d3a6-4b31-8d1c-328cd55391ac" />

small-thanks · 2 months ago
<img alt="Image" width="1528" height="1228" src="https://private-user-images.githubusercontent.com/88769332/582749006-2ccdaa98-d3a6-4b31-8d1c-328cd55391ac.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzY5NTg0MDIsIm5iZiI6MTc3Njk1ODEwMiwicGF0aCI6Ii84ODc2OTMzMi81ODI3NDkwMDYtMmNjZGFhOTgtZDNhNi00YjMxLThkMWMtMzI4Y2Q1NTM5MWFjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDIzVDE1MjgyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRkYmM5OTFmMWRkYmI1ZTJmNGNmMjJiMTJlOTdhNDJjYTA2OGVmY2Q4ZmQwNmI1ZTBkNTIwY2E4OGQzYTBmZTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.d7sfbByKd0IE_C-5L0V5CmlwZ2KtwWLGQKmHxTh92Oo">

试试这样呢

<img width="1007" height="563" alt="Image" src="https://github.com/user-attachments/assets/e5412ffd-6c08-4663-81aa-3577a5378915" />

small-thanks · 2 months ago

我的就是直接配置的config.toml

JetBrains idea 2026+版本好像才支持的这个版本,你看一下你的idea版本

https://youtrack.jetbrains.com/issue/LLM-26126/I-encountered-a-problem-where-MCP-was-not-working.

AlchemyDing · 2 months ago

<img width="2652" height="1006" alt="Image" src="https://github.com/user-attachments/assets/757d8257-dbcb-4fc0-a1e3-1b2a003d1c43" />

<img width="880" height="1400" alt="Image" src="https://github.com/user-attachments/assets/41954e55-d050-4e5f-abc9-d2c82d76da2c" />

small-thanks · 2 months ago

你在看一下toml配置文件的下方有没有 /sse协议的配置,我之前用cc switch 的时候,cc switch老默认给我添加sse的,

如果下面没有被默认添加,确认一下端口,

如果端口也确认,那你看一下是否有其他的配置文件覆盖了

如果以上方案都没有问题,我目前对问题爱莫能助了

AlchemyDing · 2 months ago

我怀疑是我clashx的问题,虽然我已经关掉了tun模式。太麻烦你了,谢谢

small-thanks · 2 months ago

不客气,希望你在别人遇到困的时候也能保持赤子之心 [笑脸][笑脸]