MCP server "ide" connection fails immediately on startup - IntelliJ IDEA plugin 0.1.14-beta
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] 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.lockwith 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
- Install Claude Code plugin 0.1.14-beta in IntelliJ IDEA
- Open IntelliJ IDEA with any project
- Launch Claude Code by clicking the plugin button inside IntelliJ IDEA (uses IntelliJ's built-in terminal)
- Run the
/idecommand - 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: wslsof -i :49948→ confirms IntelliJ is listening on that portclaude --debug→ showsMCP 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.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗