Claude Code in JetBrains IDEs: Setup, Diffs and Limits
In IntelliJ IDEA, PyCharm, WebStorm and the rest, Claude Code is the CLI in the IDE’s terminal plus a plugin that connects the two. How to install both, how diffs and selections reach the IDE, the settings that matter, the usual failures, and how it differs from the VS Code extension.
7 min read
Claude Code in a JetBrains IDE is two pieces: the ordinary claude CLI, running in the IDE’s terminal, and the Claude Code plugin, which connects that CLI to the IDE. The plugin does not bundle Claude itself, so you install both. Once connected, Claude’s proposed edits open in the IDE’s own diff viewer, your current selection and open file travel with each prompt, and Claude can read the IDE’s inspection results. It works in IntelliJ IDEA, PyCharm, Android Studio, WebStorm, PhpStorm, GoLand and most other JetBrains IDEs. Everything else, commands, permissions, MCP servers, is the CLI you already know.
Install the two pieces
- Install the CLI and check it with
claude --versionin a terminal. The first steps are in Claude Code for beginners; Windows and WSL specifics are in Claude Code on Windows. - Install the Claude Code plugin (opens in a new tab) from the JetBrains Marketplace, under Settings → Plugins, and restart the IDE. It is listed as Claude Code [Beta].
- Open the project, open the IDE’s terminal and run
claude. The first run opens a browser to sign in, with a Pro, Max, Team or Enterprise subscription or a Claude Console account.
According to Anthropic’s JetBrains documentation (opens in a new tab), the plugin shows a “Cannot launch Claude Code” notification when claude is not on your PATH. That is the most common first-day problem, and the fix is the Claude command setting described below, not a reinstall.
Starting it and connecting
Press Ctrl+Esc (Cmd+Esc on a Mac) or click the Claude Code button to open it from the editor. Run from the IDE’s own terminal, the connection is automatic. From any other terminal, start claude in the project root and run /ide; it confirms with a line such as “Connected to IntelliJ IDEA.” If it finds a running IDE without the plugin, /ide installs the plugin and asks you to restart.
cd ~/code/my-app # the same folder as the IDE project root claude /ide # connect to the running JetBrains IDE
Start from the project root, not a subfolder, so Claude and the IDE see the same files. The documentation’s advice is simply to launch Claude Code from the same directory as the IDE project.
Reviewing diffs in the IDE
With the plugin connected, Claude’s file changes open in the IDE diff viewer rather than as text in the terminal. The Diff tool entry in /config controls this: auto shows diffs in the IDE, terminal keeps them in the terminal. The entry only appears while Claude Code is connected to the IDE, so run /ide first if you cannot find it.
What you actually review depends on the permission mode. In Manual mode each edit waits for you in the diff viewer. In Accept edits or auto mode, edits inside the working directory go through without asking, and you review afterwards. The modes, and which rules to add, are in Claude Code auto-approve. JetBrains adds one reason to stay in Manual mode: the documentation warns that in Accept edits mode Claude may be able to modify IDE configuration files that the IDE runs automatically, which could get round the permission prompts for shell commands. On a repository you do not fully trust, keep edits on Manual.
Selections, file references and diagnostics
- Your current selection, or the active tab if nothing is selected, goes with each prompt. The transcript shows a line such as “⧉ Selected 12 lines from src/auth.ts” when it does.
Cmd+Option+Kon a Mac,Alt+Ctrl+Kon Windows and Linux, inserts a reference like@src/auth.ts#L1-99, so a question is pinned to exact lines.- Claude can read the IDE’s inspection results, the same errors and warnings you see in the editor, by calling a
getDiagnosticstool. It calls it when it decides to; it does not check diagnostics on its own after every edit, so ask it to when it matters.
The plumbing is a small MCP server named ide that the plugin runs on a local port and the CLI connects to automatically. It is hidden from /mcp because there is nothing to configure, and the only tool it shows the model is mcp__ide__getDiagnostics; it exposes no code-execution tool. If your team allowlists MCP tools with a hook, include it. To keep a file such as .env from reaching Claude through a selection, add a Read deny rule, which blocks both the selected text and the open-file notice for matching files.
{
"permissions": {
"deny": ["Read(.env)", "Read(.env.*)", "Read(secrets/**)"]
}
}Plugin settings worth knowing
The plugin’s own settings are under Settings → Tools → Claude Code [Beta]:
- Claude command: the command the plugin runs. Set a full path such as
/usr/local/bin/claudewhen the IDE cannot find the CLI. On Windows with Claude in WSL, the documented value iswsl -d Ubuntu -- bash -lic "claude", with your distribution name in place of Ubuntu. - Suppress notification for when Claude Command is not found, if you only use the CLI from outside the IDE.
- Enable using Option+Enter for multi-line prompts, on macOS only. Turn it off if the Option key is being captured unexpectedly.
- Enable automatic updates, which installs plugin updates on restart.
One IDE setting matters too. If Esc does not interrupt Claude in the JetBrains terminal, go to Settings → Tools → Terminal and untick “Move focus to the editor with Escape”, or delete the “Switch focus to Editor” shortcut under the terminal keybindings. Otherwise the IDE takes the key before Claude sees it; how to stop a Claude Code task covers what Esc does once it arrives.
Common failures
- “Cannot launch Claude Code” or “command not found” when you click the icon: check
claude --versionin a terminal, then set the Claude command to the full path, or to the WSL form above. - “No available IDEs detected” from
/ide: the plugin is not enabled, the IDE needs a full restart (sometimes more than one), or you startedclaudeoutside the IDE when you expected an automatic connection. - The same message on WSL2 usually means WSL’s NAT networking or Windows Firewall is blocking the connection. The documented fixes are a firewall rule for the WSL subnet or switching WSL2 to mirrored networking (
networkingMode=mirroredin.wslconfig, Windows 11 22H2 or later). - Plugin installed but features missing: run Claude from the project root, confirm the plugin is enabled, restart.
- JetBrains Remote Development: the plugin must be installed on the remote host, under Settings → Plugin (Host), not on your local client.
There is a setting called Accept connections from all network interfaces, under the plugin’s Networking (Advanced) section, meant for cases where loopback cannot work. The documentation warns that the traffic and its auth token then cross your network unencrypted. For WSL2, mirrored networking is the safer fix.
JetBrains or VS Code: what differs
The two integrations are built differently. The VS Code extension bundles its own copy of Claude Code and gives you a graphical panel, with inline diffs, checkpoints to rewind edits and a plan you can comment on, plus a subset of the commands; the CLI in its terminal is separate. The JetBrains plugin is the CLI, in the terminal, with the IDE bridge added, so you get every command and flag but no graphical chat panel and no checkpoint buttons. How the VS Code side works is in Claude Code in VS Code, and all the surfaces are compared in Claude Code desktop vs CLI vs VS Code.
Do not confuse the plugin with JetBrains’ own Claude Agent. JetBrains’ Claude Agent documentation (opens in a new tab) describes it as a separate agent inside JetBrains AI Assistant’s chat, built on Anthropic’s Claude Agent SDK and unrelated to the Claude Code [Beta] plugin. It signs in through a JetBrains AI subscription or your own Anthropic credentials, and it also reads CLAUDE.md. If a colleague says “Claude in PyCharm”, ask which one.
Keeping track of the work
Because the plugin runs the normal CLI, everything configured for Claude Code applies in the IDE too, including MCP servers. Connect a fenbs board once, from the IDE’s terminal, and each session can read the task it is working on and comment on it when it stops.
claude mcp add --transport http fenbs https://fenbs.ai/api/mcp # then, inside Claude Code: /mcp
Sign in through the browser, tick what it may do, and every change it makes is recorded in the board’s History as Claude acting for you. A session history lives on one machine; the task, with its comments, is what a colleague can read. The CLAUDE.md wording that makes this a habit is in a task-tracking workflow for Claude Code.
Related
Connect a board: the Claude Code integration and the MCP docs. What goes in the repository’s .claude/ folder: Claude Code project structure. Steering the same session from your phone: Claude Code remote control.