Claude Code in JetBrains IDEs

Use Claude Code in IntelliJ IDEA, PyCharm, WebStorm, GoLand, PhpStorm, or Android Studio with one AI in IDE API key.

This is a different integration from VS Code and Cursor: JetBrains has no self-contained chat extension. The plugin drives the claude command in the IDE's integrated terminal over a local socket, so you install a CLI, install a plugin, and configure the CLI's environment. Nothing here is a single-click install, and any guide that promises one is wrong.

How the JetBrains integration differs

VS Code / CursorJetBrains
What you installone extension that bundles the CLIthe CLI plus a plugin
Where the chat livesa native panel inside the editorthe IDE terminal, with diffs rendered in the IDE
How it finds Claudebundled binaryclaude on PATH, or a path you set in plugin settings
How it connectsextension processplugin runs a local MCP server; the CLI connects over ws:// on a random loopback port

Because the CLI is the thing talking to the network, all AI in IDE settings belong to the CLI, not to a plugin GUI. That is good news: one ~/.claude/settings.json configures the CLI, the plugin, and any terminal session.

Versions and prerequisites

ComponentRequirement
JetBrains IDEany current build of IntelliJ IDEA, PyCharm, WebStorm, PhpStorm, GoLand, or Android Studio
Node.js22 or later for npm installation. The native CLI runs without Node.js.
Claude Code CLIcurrent build, installed globally
Claude Code pluginfrom JetBrains Marketplace, beta channel
AI in IDE keyAWSQ or CCMAX channel, from API Keys
Anthropic accountnot required when an API key and base URL are set

The plugin is published as Claude Code [Beta]. Features and settings menus move between releases, so check the plugin page for the build you install rather than assuming an option exists.

Install

1. The CLI

1
npm install -g @anthropic-ai/claude-code
2
claude --version

Confirm that claude resolves from a plain terminal. If it does not, the plugin cannot launch it and shows Cannot launch Claude Code. Node version managers (nvm, fnm, asdf) are the usual cause: the shell resolves claude through an initialization script that the IDE never runs. Install with a system-wide Node, or set the absolute path in the next step.

2. The plugin

Open Settings → Plugins → Marketplace, search for Claude Code, install, and restart the IDE completely — not just a project reopen. In Remote Development, install the plugin on the host through Settings → Plugin (Host), not on your local client; a locally installed plugin will not connect to a remote project.

3. Point the plugin at the CLI

Settings → Tools → Claude Code [Beta] → Claude command takes a command string, not just a path:

  • claude when it is on PATH
  • /usr/local/bin/claude or another absolute path
  • npx @anthropic-ai/claude-code to always run the latest published CLI
  • wsl -d Ubuntu -- bash -lic "claude" on Windows with WSL, replacing Ubuntu with your distribution

That setting is the reliable fix for command not found notifications.

Create and copy the API key

  1. Choose a plan on pricing. One account can hold separate Claude, GPT, and Gemini keys; each key is tied to its vendor channel.
  2. Open API Keys and create a key.
  3. Select AWSQ or CCMAX. These are the Claude Code channels; Codex and Gemini keys use different endpoints and fail here.
  4. You can view or copy the full key again from the API Keys list.

Configuration

The CLI reads ~/.claude/settings.json (macOS/Linux) or C:/Users/<UserName>/.claude/settings.json (Windows). Create it with:

1
{
2
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
3
  "env": {
4
    "ANTHROPIC_BASE_URL": "https://api.aiinide.com",
5
    "ANTHROPIC_AUTH_TOKEN": "YOUR_DASHBOARD_API_KEY",
6
    "API_TIMEOUT_MS": "600000",
7
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
8
  }
9
}

Keep ANTHROPIC_BASE_URL at the host: the CLI appends /v1/messages. A base URL with /v1 produces /v1/v1/messages and a 404. If you already have a settings.json with permissions or hooks, add the env object to it rather than replacing the file.

Why the file instead of a shell export? Because a JetBrains IDE launched from the dock or Start menu does not run your shell profile, and the plugin inherits the IDE's environment. A file is read by the CLI itself and works no matter how the terminal was started. If you do want environment variables, put them in the shell profile and make sure the IDE was started from a shell, or set them in the plugin's command line.

If you also want the CLI to skip its first-run login prompt, the presence of ANTHROPIC_AUTH_TOKEN is enough — Claude Code uses the token when no claude.ai session exists.

Verify

First check your key and Claude channel by listing models. This request does not consume quota.

1
curl --globoff -i 'https://api.aiinide.com/v1/models' \
2
  -H "x-api-key: YOUR_DASHBOARD_API_KEY" \
3
  -H "anthropic-version: 2023-06-01"

HTTP 200 returns the model list. HTTP 401 means the key is missing, invalid, or expired. HTTP 400 means this key belongs to a different channel. Use an ID from the list in the Messages example below.

  1. Terminal first. Open the IDE's integrated terminal in your project root and run claude. You should get a prompt with no login screen. If this fails, the plugin cannot work either; fix the CLI and environment before touching the plugin.
  2. Connect from the IDE. With the project open, run claude from the IDE terminal or press Cmd+Esc / Ctrl+Esc. The plugin launches the CLI and connects.
  3. Confirm the connection. Ask /status; it reports the version, model, and account state. A connected IDE session also renders file edits as diffs in the IDE rather than in the terminal.
  4. Connect an external terminal if you started claude outside the IDE: type /ide inside Claude Code. Success prints Connected to IntelliJ IDEA. (with your IDE's name). Start the CLI from the same directory as the project root or the file set will not match.
  5. Test model inference directly with the verified key.
1
curl --globoff 'https://api.aiinide.com/v1/messages' \
2
  -H "x-api-key: YOUR_DASHBOARD_API_KEY" \
3
  -H "anthropic-version: 2023-06-01" \
4
  -H "Content-Type: application/json" \
5
  -d '{"model":"MODEL_ID_FROM_LIST","messages":[{"role":"user","content":"ping"}],"max_tokens":16}'
  1. Usage. Usage shows tokens billed to the key after the first successful prompt.

Troubleshooting

Use an exact ID from GET /v1/models. A mistyped claude-* name can resolve to the configured default Claude model and incur charges at that model’s rate.

API Error: 404

Set ANTHROPIC_BASE_URL to https://api.aiinide.com. Adding /v1 sends the request to /v1/v1/messages, which returns 404.

API Error: 400

  • Wrong channel. A Codex or Gemini key authenticates against /responses or /v1beta/models/...; on this endpoint it returns 400. Create an AWSQ or CCMAX key.
  • Broken settings.json. The CLI silently falls back when the JSON does not parse, so the request goes to the real Anthropic endpoint with your proxy token and fails. Validate the file — the $schema line gives inline errors in the IDE.

Authentication checks

Use the status from GET /v1/models to diagnose the key. Native POST /v1/messages can return HTTP 200 with an authentication message in content even when the key is missing or invalid.

  • Settings in the wrong place. In Remote Development or a container, ~/.claude/settings.json must exist on the host or container running the CLI, not on your laptop.
  • A stale ANTHROPIC_API_KEY. If your environment also exports an Anthropic key, it can take precedence over ANTHROPIC_AUTH_TOKEN. Unset it and restart the IDE.
  • Expired key. Check the key's expiration in the dashboard; rotate rather than extend.

JetBrains-specific integration failures

What you seeCauseFix
Cannot launch Claude Codeclaude not on the IDE's PATHset Claude command to an absolute path or npx @anthropic-ai/claude-code
No available IDEs detected from /ideplugin disabled, IDE not restarted, or CLI started from a different user sessionenable the plugin, restart the IDE fully, start claude from the IDE terminal
No available IDEs detected on WSL2NAT networking or Windows Firewall blocking loopback between WSL and the IDEallow the WSL subnet through the firewall, or switch .wslconfig to networkingMode=mirrored
Plugin installed but no diffs appearDiff tool set to terminalrun /config and set Diff tool to auto — the entry only appears while connected to an IDE
Esc does not interrupt ClaudeIDE steals the keySettings → Tools → Terminal, uncheck Move focus to the editor with Escape
Features missing in a Remote Development projectplugin installed on the clientinstall it via Settings → Plugin (Host)
Diffs open in a new window instead of the projectproject root mismatchstart claude from the project root directory

Timeouts and proxying

The CLI's API_TIMEOUT_MS covers long agent turns; a corporate proxy adds latency on every request. If requests fail at a fixed interval, the timeout is not being read — confirm it is inside env in settings.json and restart the IDE. Behind a TLS-inspecting proxy, set NODE_EXTRA_CA_CERTS to the proxy root CA path in the same env block.

A note on permission modes

In JetBrains, the plugin can modify IDE configuration files that the IDE may execute. Keep edits in Manual mode with acceptEdits off for untrusted repositories, and be deliberate about which project directories you open in a session that can write.

Models and pricing

ModelChannelUse it for
claude-opus-5-5 / claude-opus-5.5AWSQ, CCMAXmulti-file refactors, long autonomous tasks
claude-sonnet-5-5 / claude-sonnet-5.5AWSQ, CCMAXdefault for everyday work
claude-haiku-4-5-20251001AWSQ, CCMAXfast, cheap edits and checks

Opus 5.5 base rates: $4 per 1M input tokens, $0.20 per 1M cache reads, $20 per 1M output tokens. Quota consumption is 0.8× on AWSQ and 2× on CCMAX. Fast mode doubles base and cache rates when the upstream serves it.

FAQ

Why is there no one-click setup? Because the plugin deliberately does not bundle the CLI — it launches your installed claude so the terminal and the IDE share one configuration. That means a CLI install plus a plugin install, in that order.

Can I reuse my VS Code extension? No. The VS Code and Cursor extension is a separate product; here the interface is the CLI in the IDE terminal. What you can reuse is ~/.claude/settings.json, which both read.

Does the plugin need an Anthropic login? No. With ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL set, the CLI skips the login prompt and sends requests to AI in IDE.

Which IDEs are supported? IntelliJ IDEA, PyCharm, WebStorm, PhpStorm, GoLand, and Android Studio are the documented ones. Others built on the same platform often work; the plugin is beta, so verify diffs and /ide before relying on it.

Claude Code in JetBrains IDEs - AI in IDE Documentation | AI in IDE