claude-code - 💡(How to fix) Fix MCP server "ide" connection fails immediately on startup - IntelliJ IDEA plugin 0.1.14-beta [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56872Fetched 2026-05-07 03:43:10
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×6

Error Message

Error Messages/Logs

  1. Observe "Failed to connect to IntelliJ IDEA." error

Code Example

MCP server "ide": Starting connection with timeout of 30000ms
MCP server "ide": Connection failed after 49ms: [object ErrorEvent]
MCP server "ide" Connection failed: [object ErrorEvent]

---



---

{"workspaceFolders":["/Users/rimichoi/REPO/BIZ/bizweb"],"pid":1525,"ideName":"IntelliJ IDEA","transport":"ws","runningInWindows":false,"authToken":"[REDACTED]"}

---

COMMAND  PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
idea    1525 rimichoi  332u  IPv6 ...      0t0  TCP localhost:49948 (LISTEN)
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The ide MCP server fails to connect on Claude Code startup when using the IntelliJ IDEA plugin. The /ide command returns "Failed to connect to IntelliJ IDEA." even though IntelliJ is running and the WebSocket server is listening on the correct port.

Debug log shows the connection fails after only 49ms with [object ErrorEvent]:

MCP server "ide": Starting connection with timeout of 30000ms
MCP server "ide": Connection failed after 49ms: [object ErrorEvent]
MCP server "ide" Connection failed: [object ErrorEvent]

All prerequisites are confirmed to be in place:

  • Lock file exists at ~/.claude/ide/49948.lock with correct workspaceFolders, pid, transport: ws
  • IntelliJ IDEA process is running (verified via ps aux)
  • WebSocket server is listening on port 49948 (verified via lsof -i :49948)
  • curl to ws://localhost:49948/ returns HTTP 400 (server responds but rejects connection)

What Should Happen?

Claude Code should successfully connect to IntelliJ IDEA via the ide MCP server on startup, enabling IDE integration features such as opening files, viewing diffs, and the /ide command working correctly.

Error Messages/Logs

Steps to Reproduce

  1. Install Claude Code plugin 0.1.14-beta in IntelliJ IDEA
  2. Open IntelliJ IDEA with any project
  3. Launch Claude Code by clicking the plugin button inside IntelliJ IDEA (uses IntelliJ's built-in terminal)
  4. Run the /ide command
  5. Observe "Failed to connect to IntelliJ IDEA." error

Additional verification steps:

  • ls ~/.claude/ide/ → shows lock file (e.g. 49948.lock)
  • cat ~/.claude/ide/49948.lock → shows valid JSON with correct workspaceFolders and transport: ws
  • lsof -i :49948 → confirms IntelliJ is listening on that port
  • claude --debug → shows MCP server "ide": Connection failed after 49ms: [object ErrorEvent] on startup

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.132

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

IntelliJ IDEA terminal

Additional Information

IntelliJ IDEA plugin version: 0.1.14-beta

Lock file content (~/.claude/ide/49948.lock):

{"workspaceFolders":["/Users/rimichoi/REPO/BIZ/bizweb"],"pid":1525,"ideName":"IntelliJ IDEA","transport":"ws","runningInWindows":false,"authToken":"[REDACTED]"}

lsof -i :49948 output:

COMMAND  PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
idea    1525 rimichoi  332u  IPv6 ...      0t0  TCP localhost:49948 (LISTEN)

curl test result:

  • curl ... ws://localhost:49948/ → HTTP 400 (even with Authorization Bearer token)
  • curl ... ws://localhost:49948/ide → HTTP 404

The WebSocket server is running and responding, but the connection handshake fails. This appears to be a protocol or authentication mismatch between CLI 2.1.132 and plugin 0.1.14-beta.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix MCP server "ide" connection fails immediately on startup - IntelliJ IDEA plugin 0.1.14-beta [1 participants]