JetBrains IDEs
Install and configure the Claude Code plugin for IntelliJ IDEA, PyCharm, WebStorm and other JetBrains IDEs, including WSL, remote development and the built-in IDE MCP server.
The Claude Code plugin for JetBrains IDEs connects the CLI to your editor. You still talk to Claude in a terminal, but diffs open in the IDE's own diff viewer, your current selection is shared automatically, and Claude can read the IDE's inspection results. I use it on Kotlin and Python client projects where I would rather review changes in IntelliJ's diff view than in a terminal.
Supported IDEs
Most JetBrains IDEs work, including IntelliJ IDEA, PyCharm, Android Studio, WebStorm, PhpStorm and GoLand.
What the plugin adds
| Feature | Detail |
|---|---|
| Quick launch | Cmd+Esc (macOS) or Ctrl+Esc (Windows and Linux) opens Claude Code, as does the Claude Code button |
| Diff viewing | Proposed changes open in the IDE diff viewer rather than the terminal (controlled by Diff tool in /config) |
| Selection context | Your current selection or active tab is shared with Claude automatically. Read deny rules stop this for matching files |
| File references | Cmd+Option+K (macOS) or Alt+Ctrl+K (Linux and Windows) inserts a reference such as @src/billing/Invoice.kt#L40-88 |
| Diagnostics | Claude can read lint and syntax errors from the IDE's inspections by calling getDiagnostics. Claude Code does not fetch them automatically after edits |
Installing
The plugin does not ship its own copy of Claude Code. It runs the claude command in the IDE's integrated terminal and connects to it, so you need both:
- Install the CLI by following the quickstart. If
claudeis not on yourPATH, the plugin shows a "Cannot launch Claude Code" notification. - Install the plugin (listed as Claude Code [Beta]) from the JetBrains Marketplace and restart the IDE.
If claude lives somewhere the IDE cannot see, put its full path in the plugin's Claude command setting (below).
Any paid Claude plan (Pro, Max, Team or Enterprise) or a Claude Console account works; no API key is required. You will be asked to log in the first time you run claude. See authentication.
Using it
From the IDE terminal
Run claude in the integrated terminal and everything is connected.
From an external terminal
Start Claude Code anywhere and connect it:
/ide
On success you see something like Connected to IntelliJ IDEA. If Claude Code finds a running IDE without the plugin, /ide installs it and asks you to restart the IDE.
Start Claude Code from the same folder as the IDE's project root so both see the same files.
Configuration
In Claude Code
Run /config and set Diff tool to auto (diffs in the IDE) or terminal (diffs in the terminal). The option only appears while connected to an IDE, so launch from the JetBrains terminal or run /ide first. The underlying setting is diffTool (settings reference).
In the plugin
Open Settings → Tools → Claude Code [Beta].
| Setting | Purpose |
|---|---|
| Claude command | The command to launch Claude, such as claude, /usr/local/bin/claude or npx @anthropic-ai/claude-code |
| Suppress notification for when Claude Command is not found | Hides the missing-command notification |
| Enable using Option+Enter for multi-line prompts | macOS only. Option+Enter inserts a newline. Turn off if Option is being captured unexpectedly. Needs a terminal restart |
| Enable automatic updates | Checks for and installs plugin updates, applied on restart |
Tip: On WSL, set the Claude command to
wsl -d Ubuntu -- bash -lic "claude", replacingUbuntuwith your distribution's name.
Making Esc work
If Esc does not interrupt Claude in the JetBrains terminal, go to Settings → Tools → Terminal and either untick "Move focus to the editor with Escape", or choose "Configure terminal keybindings" and delete the "Switch focus to Editor" shortcut. Apply, and Esc will reach Claude Code.
Special set-ups
Remote development
Warning: With JetBrains Remote Development, install the plugin on the remote host via Settings → Plugin (Host), not on your local client.
WSL2
"No available IDEs detected" on WSL2 is usually WSL2's NAT networking or Windows Firewall blocking traffic between the Linux VM and the IDE on Windows. WSL1 shares the host network and is not affected. Two fixes:
Allow WSL2 traffic through the firewall (recommended, keeps your networking mode):
-
In WSL, run
hostname -I. Take the first two parts of the address and add.0.0/16; for172.24.88.10the subnet is172.24.0.0/16. -
In an Administrator PowerShell, create a rule for that subnet:
New-NetFirewallRule -DisplayName "WSL2 to JetBrains" -Direction Inbound -Protocol TCP -Action Allow -RemoteAddress 172.24.0.0/16 -LocalAddress 172.24.0.0/16 -
Restart the IDE and Claude Code.
Switch to mirrored networking (Windows 11 22H2 or later only). Add to .wslconfig in your Windows user folder:
[wsl2]
networkingMode=mirrored
Then run wsl --shutdown in PowerShell.
Troubleshooting
Plugin installed but nothing happens. Run Claude Code from the project root, check the plugin is enabled, and fully restart the IDE (sometimes more than once). For Remote Development, make sure the plugin is on the remote host.
/ide says "No available IDEs detected". Check the plugin is installed and enabled and restart the IDE. If you expected an automatic connection, make sure you launched claude from the IDE's own terminal. On WSL, see above.
"command not found" when clicking the Claude icon. Confirm the CLI works with claude --version, then set the full path in the Claude command setting (or the WSL form on Windows).
Problems with installing or logging in outside the IDE are covered in troubleshoot installation.
Security notes
In acceptEdits mode, Claude Code could edit IDE configuration files that the IDE executes automatically, which could be used to sidestep the permission prompts for shell commands. In JetBrains IDEs:
- Prefer Manual mode for edits. Both
acceptEditsand auto mode approve edits inside your working directory without asking, outside of protected paths. See permission modes. - Only use Claude with prompts and content you trust.
- Be aware of which files Claude can modify.
The built-in IDE MCP server
When the plugin is running it hosts a local MCP server, named ide, that the CLI connects to automatically. It is what lets the CLI open diffs in the IDE, read your selection for @ mentions and fetch diagnostics. It is hidden from /mcp because there is nothing to configure, but you need to know about it if your organisation uses a PreToolUse hook to allowlist MCP tools.
Selection and active file. While connected, each prompt includes your current selection and the active file's path. The transcript shows a line like ⧉ Selected N lines from <file>. A message you queue while Claude is working keeps the selection you had when you pressed Enter. To keep a file such as .env out entirely, add a Read deny rule for it; that blocks both the selection and the open-file notice. See permissions.
Transport and authentication. The server listens on an OS-assigned ephemeral port (not configurable) over unencrypted ws://. On loopback, TLS would add nothing, because any local process able to sniff the traffic could also read the token file. Each IDE start writes a fresh random token to ~/.claude/ide/<port>.lock (or $CLAUDE_CONFIG_DIR/ide/ if set), and the CLI must send it in the X-Claude-Code-Ide-Authorization header.
Tools Claude can see. The server hosts several tools, but all except one are internal plumbing for the CLI's UI and are filtered out before Claude sees the list.
| Tool (as named in hooks) | Purpose | Read-only |
|---|---|---|
mcp__ide__getDiagnostics | Returns the IDE's errors and warnings for one file: the one Claude names, or your active editor's file if it names none | Yes |
The JetBrains plugin exposes no code execution tool to the model.
Network interface. Settings → Tools → Claude Code [Beta] → Networking (Advanced) has Accept connections from all network interfaces. Off (the default), the server binds to 127.0.0.1 only. On, the port is reachable from your local network, intended only for cases where loopback cannot work, such as WSL2 with NAT networking or some remote IDE set-ups.
Warning: Turning on Accept connections from all network interfaces sends session traffic and the auth token across your network in cleartext, because the transport is plain
ws://. Use it only when loopback is impossible. For WSL2, mirrored networking is the better fix because the socket can stay on loopback.