Based on Anthropic’s official docs, checked
Claude Code in VS Code: install, shortcuts and CLI differences
Anthropic ships Claude Code as a VS Code extension with a graphical chat panel, inline diffs and @-mentions, alongside the command-line tool. This guide covers installing it, the shortcuts worth learning, and where the extension and the CLI differ, all from Anthropic's VS Code docs. It also works in Cursor and other VS Code forks.
1. Check the requirements
You need VS Code 1.94.0 or later and an Anthropic account: any paid Claude plan (Pro, Max, Team or Enterprise) or a Claude Console account. No API key is required.
2. Install the extension
Press Cmd+Shift+X (Mac) or Ctrl+Shift+X (Windows/Linux), search for "Claude Code" and click Install. In forks such as Kiro, install from the Extensions view or the Open VSX registry. If it does not appear, run Developer: Reload Window.
3. Open the panel and sign in
Click the Spark icon in the editor toolbar (it shows when a file is open), the Activity Bar, or ✻ Claude Code in the status bar. The first time, click Sign in and finish authorization in your browser.
4. Install the CLI too if you want claude in the terminal
The extension bundles a private copy of the CLI for its panel but does not put claude on your PATH. Install the standalone CLI to run claude, claude mcp add or claude --resume in the integrated terminal.
claude --resume5. Pick the starting permission mode
The extension reads claudeCode.initialPermissionMode for the mode new sessions start in. Set it in VS Code settings if you want Manual instead of the default.
Shortcuts worth learning
Cmd+Esc / Ctrl+Esc toggles focus between the editor and Claude. Cmd+Shift+Esc / Ctrl+Shift+Esc opens a new conversation in an editor tab. Option+K / Alt+K inserts an @-mention of the current file and selection, such as @file.ts#5-10. Cmd+Shift+T / Ctrl+Shift+T reopens the last closed Claude session tab.
Claude sees your selected text automatically, and the prompt box footer shows how many lines are selected.
Extension vs CLI
The extension supports MCP server config through /mcp in the chat panel, checkpoints, and plugins through /plugins. The docs list a subset of commands and skills in the extension (type / to see them), and no ! Bash shortcut or tab completion, which stay CLI-only.
Both share conversation history, so claude --resume in a terminal can pick up a panel conversation. If you prefer the CLI look inside VS Code, turn on the claudeCode.useTerminal setting.
The built-in ide MCP server
When the extension is active it runs a local MCP server named ide that the CLI connects to. It opens diffs in VS Code's diff viewer, reads your selection for @-mentions and runs Jupyter cells. It is hidden from /mcp, but if your organization allowlists MCP tools with a PreToolUse hook you need to account for it.
The CLI sends your current selection and active file path with each prompt. To keep a file such as .env out, add a Read deny rule for its path.
Plugins in the extension
Type /plugins to open Manage plugins, with Plugins and Marketplaces tabs. Installs can be for you (user scope), for the project (shared) or local to this repository. You can share a vscode://anthropic.claude-code/install-plugin link that opens the install dialog for a specific plugin.
Tips
- Drag the Claude panel anywhere in the window, or open several conversations as tabs.
- If Cmd+Esc does nothing on macOS, check the extension docs' troubleshooting section for shortcut conflicts.
- Use Accept Change at Cursor and Reject Change at Cursor from the Command Palette to review a proposed edit one change at a time.
Next steps
Verified MCP servers for Claude
Generate an MCP config for Claude
Claude Code hub
Claude Code vs OpenAI Codex: documented features compared
Cursor vs Claude Code: documented features compared
Claude Code vs GitHub Copilot: documented features compared
Google Antigravity vs Claude Code: documented features compared
How to add an MCP server to Codex
How to add an MCP server to Cursor
How to add an MCP server to GitHub Copilot in VS Code
How to add an MCP server to Google Antigravity
How to migrate from Gemini CLI to Antigravity CLI
Portable agent skills: one SKILL.md for every coding agent
Safe “always allow” rules for Claude Code and Codex CLI
GitHub Copilot CLI yolo mode: --allow-all and safer tool rules
Codex sandbox modes and approval policies explained
How to install Claude Code on macOS, Linux and Windows
How to install the OpenAI Codex CLI
Claude Code auto mode: what runs, what gets blocked, how to turn it off
Agent Skills moves to the Agentic AI Foundation: what changes
MCP security: the risks in MCP servers and how to lock them down
What is AGENTS.md? The open instruction file for coding agents
Claude Code on Windows: native, WSL and common errors
Codex skills: create, install and use SKILL.md skills in Codex
GitHub Copilot CLI: install, sign in and start using it
Cursor Agent SDK: build, test and deploy agents as code
GPT-6.1 Terra in Codex and the API: setup, pricing and limits
MCP OAuth: connect a remote MCP server in Claude Code, Codex and Cursor
Codex config.toml: location, precedence and the settings to change
Codex on Windows: native sandbox setup, WSL and fixes
Antigravity CLI (agy): install, sign in, modes and commands
Google Antigravity on Windows: install, WSL, sandbox and fixes
GitHub Copilot coding agent (now cloud agent): how to use it
GitHub Copilot agent mode: how to use it in your IDE
How to install Claude Code
Claude Code auto mode
Claude Code MCP setup
Cursor vs Claude Code
Claude Code pricing
Frequently asked questions
Yes. Anthropic publishes an official Claude Code extension for VS Code 1.94.0 or later, with a chat panel, inline diffs and @-mentions. It also installs in Cursor and other VS Code forks.
Sources
- https://code.claude.com/docs/en/vs-code · checked 2026-10-24