Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/VineeTagarwal-code/claude-code/llms.txt

Use this file to discover all available pages before exploring further.

Claude Code integrates with popular editors through a lightweight extension or plugin. Once connected, Claude can read your open file, see your current selection, display diffs directly in the editor, and close diff tabs automatically when you start a new prompt.

Supported editors

Claude Code supports two families of IDEs:
  • VS Code family — VS Code, Cursor, Windsurf
  • JetBrains family — IntelliJ IDEA, PyCharm, WebStorm, PhpStorm, RubyMine, CLion, GoLand, Rider, DataGrip, DataSpell, AppCode, Aqua, Gateway, Fleet, Android Studio

Installing the extension

When you run Claude Code from the integrated terminal of a supported VS Code-based editor, the extension is installed automatically on first launch (if autoInstallIdeExtension is enabled in your config, which is the default).To install or update it manually, run:
/ide
Claude Code detects the running editor process, installs the anthropic.claude-code extension via the editor’s CLI, and connects over a local server on the port advertised in the IDE lockfile (~/.claude/ide/<port>.lock).
On Linux, Claude Code clears the DISPLAY environment variable before invoking the code (or cursor / windsurf) CLI to prevent the command from accidentally opening a new editor window instead of running the CLI installer.

The /ide command

Use /ide at any time to manage the IDE connection interactively.
/ide
The command:
  1. Scans ~/.claude/ide/*.lock files to discover running IDE instances.
  2. Shows a picker listing available IDEs (with workspace folders when multiple windows of the same editor are open).
  3. Connects to the selected IDE via MCP over SSE or WebSocket.
/ide open
Opens the current working directory (or active worktree path) in the connected IDE using the editor’s CLI.

Checking connection status

When Claude Code is connected to an IDE, the IDE name appears in the status bar. From within a session you can verify the connection by opening /ide — the currently connected editor is pre-selected in the picker.
You can enable auto-connect so Claude Code always attaches to the IDE that launched its terminal: run /config and set autoConnectIde, or pass --ide when starting Claude Code from the command line.

What IDE integration enables

Once connected, Claude Code gains access to IDE-specific capabilities via the mcp__ide__* tool set exposed by the extension.

File and selection context

The extension tells Claude which file is currently open and which text is selected. Claude can include this context automatically when answering questions about your code — without you having to paste it in manually.

Diff viewing

When Claude edits files, it can open the changes as a diff directly in the editor’s diff pane instead of (or in addition to) printing the patch to the terminal. The diffTool config option controls this behavior (auto, ide, or terminal). When you submit a new prompt, Claude Code calls closeAllDiffTabs on the IDE extension to clean up open diff tabs automatically.

Opening files

Claude can instruct the editor to open a specific file at a given line and column, useful for navigating to a definition or error location produced by a tool call.

LSP integration

Claude Code ships an LSP (Language Server Protocol) client that plugins can configure through their manifest. This enables language-server-powered features such as diagnostics, hover information, and go-to-definition when a plugin declares an lspServers block. The LSP server manager (createLSPServerManager) routes requests to the correct language server based on file extension. It handles the full lifecycle:
  • Starts the server process on demand when a file of the matching type is first opened.
  • Sends textDocument/didOpen, textDocument/didChange, textDocument/didSave, and textDocument/didClose notifications to keep the server in sync.
  • Restarts a crashed server if restartOnCrash is set in the plugin manifest.
A plugin LSP server configuration looks like:
{
  "lspServers": {
    "my-ts-server": {
      "command": "typescript-language-server",
      "args": ["--stdio"],
      "extensionToLanguage": {
        ".ts": "typescript",
        ".tsx": "typescriptreact"
      },
      "transport": "stdio"
    }
  }
}
See the Plugins guide for details on declaring LSP servers in a plugin manifest.

WSL considerations

When the IDE runs in Windows and Claude Code runs inside WSL, the lockfile path and IP address are resolved automatically:
  • Claude Code looks for lockfiles in both ~/.claude/ide/ (WSL home) and the Windows user profile path (/mnt/c/Users/<user>/.claude/ide/).
  • The connection uses the WSL gateway IP (from ip route show) rather than 127.0.0.1 when the IDE process is on the Windows side.
No manual configuration is required for the standard WSL + Windows IDE setup.

Build docs developers (and LLMs) love