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.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.
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
- VS Code / Cursor / Windsurf
- JetBrains IDEs
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 Claude Code detects the running editor process, installs the
autoInstallIdeExtension is enabled in your config, which is the default).To install or update it manually, run: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.
- Scans
~/.claude/ide/*.lockfiles to discover running IDE instances. - Shows a picker listing available IDEs (with workspace folders when multiple windows of the same editor are open).
- Connects to the selected IDE via MCP over SSE or WebSocket.
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.
What IDE integration enables
Once connected, Claude Code gains access to IDE-specific capabilities via themcp__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. ThediffTool 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 anlspServers 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, andtextDocument/didClosenotifications to keep the server in sync. - Restarts a crashed server if
restartOnCrashis set in the 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 than127.0.0.1when the IDE process is on the Windows side.