
How to install and use the Claude Code extension in VS Code and Cursor
Install Anthropic's Claude Code extension in VS Code or Cursor and use Claude Code in a side panel with inline diffs.
- Local servers
- Yes
- runs stdio servers
- Hosted servers
- Yes
- connects by URL
- Config
- CLI + JSON
- how servers are added
- Plugins
- Yes
- plugin marketplaces
Search for Claude Code in the VS Code Extensions view and click Install, or open cursor:extension/anthropic.claude-code in Cursor. You need VS Code 1.94.0 or later and a paid Claude plan or a Console account. The extension carries its own copy of Claude Code, but it does not add the claude command to your terminal.
Good for
- Developers who want Claude Code inside VS Code instead of a terminal
- Cursor and other VS Code fork users
- Anyone whose Spark icon is missing or whose sign-in keeps failing
Install and use the Claude Code extension in VS Code or Cursor
Claude
- 1
Check your editor version
You need VS Code 1.94.0 or later. Check under Help > About.
- 2
Install the extension
Open the Extensions view with
Cmd+Shift+X(Mac) orCtrl+Shift+X(Windows, Linux), search Claude Code and click Install. Or paste this link in your browser:vscode:extension/anthropic.claude-codeThe extension ID is
anthropic.claude-code. - 3
In Cursor or another fork
In Cursor, open this link:
cursor:extension/anthropic.claude-codeOther VS Code forks can install it from the Open VSX Registry.
Tip: Check the installed version in the Extensions view. Cursor says versions 2.1.312 and 2.1.313 served from its marketplace on October 29, 2026 were tampered copies not built by Anthropic, and it removed them.
- 4
Open the panel and sign in
Open any file and click the Spark icon at the top right of the editor, or click ✻ Claude Code in the Status Bar. Sign in with your Claude account the first time. If the extension does not appear, run Developer: Reload Window from the Command Palette.
- 5
Ask about your code with @-mentions
Type
@to point at a file or folder, or select lines and pressOption+K(Mac) orAlt+K(Windows, Linux) to insert a reference. UseShift+Enterfor a new line.PromptLook at @src/auth/login.ts and explain why the session expires early, then propose a fix. - 6
Review the diff before it lands
In Manual mode, Claude shows each change side by side and asks before applying it. Switch modes (Manual, Edit automatically, Plan, Auto) from the indicator under the prompt box. Type
/planto get a plan first. - 7
Add an MCP server
Type
/mcpin the panel to add, enable or sign in to servers. Or runclaude mcp addin a terminal; a new conversation then shows the server as Connected or Failed.Uses GitHub MCP Server
- 8
Use the terminal too (optional)
The extension does not put
claudeon your PATH. Install the standalone Claude Code CLI if you want it in a terminal; the two share history, soclaude --resumepicks up an extension conversation.
Code
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ \
--header "Authorization: Bearer YOUR_GITHUB_PAT"{
"claudeCode.preferredLocation": "sidebar",
"claudeCode.initialPermissionMode": "plan",
"claudeCode.useCtrlEnterToSend": true
}Common errors and fixes
The Spark icon is missing
Cause: No file is open, VS Code is older than 1.94.0, or the folder is in Restricted Mode.
Fix: Open a file, update VS Code, trust the folder, then run Developer: Reload Window; or use the Status Bar item.
vs-code Source
claude: command not found in the integrated terminal
Cause: The extension bundles its own CLI and does not add it to PATH.
Fix: Install the standalone Claude Code CLI.
vs-code Source
Cmd+Esc does nothing on macOS Tahoe
Cause: The Game Overlay shortcut takes the key.
Fix: Clear Game Overlay under System Settings > Keyboard > Keyboard Shortcuts > Game Controllers, or rebind Claude Code: Focus input.
vs-code Source
It asks you to sign in even though ANTHROPIC_API_KEY is set
Cause: VS Code was not started from a shell, so it did not get your environment.
Fix: Start VS Code from a terminal with code . or sign in with your Claude account.
vs-code Source
The Claude panel is blank
Cause: An older extension version.
Fix: Update to 2.1.309 or later, reload the window, then run Claude Code: Show Logs.
vs-code Source
An MCP server shows Failed after claude mcp add
Cause: The add command does not check credentials.
Fix: Fix the token or URL, then start a new conversation and check /mcp again.
vs-code Source
Verdict
Use the extension if you work in VS Code or Cursor and want to review each change as a diff. Install the CLI as well if you also want `claude` in a terminal, since the extension does not add it.
Use the extension if you work in VS Code or Cursor and want to review each change as a diff. Install the CLI as well if you also want claude in a terminal, since the extension does not add it.
Best for
- Reviewing changes inline
- Cursor and VS Code fork users
Skip it if
- You have no paid Claude plan or Console account
- Your VS Code is older than 1.94.0
Questions
How do I install the Claude Code extension in VS Code?
Open the Extensions view (Cmd+Shift+X or Ctrl+Shift+X), search Claude Code and click Install. It needs VS Code 1.94.0 or later.
Does the Claude Code extension work in Cursor?
Yes. Open cursor:extension/anthropic.claude-code to install it in Cursor. Other VS Code forks can get it from the Open VSX Registry.
Was the Claude Code extension on the Cursor Marketplace compromised?
Two versions were. Cursor says copies of versions 2.1.312 and 2.1.313 for Windows and macOS, served from the Cursor Marketplace between about 2:27am and 1:35pm PT on October 29, 2026, tried to install a persistent SSH backdoor. Anthropic did not build them, and Cursor removed them. If you installed either, uninstalling may not be enough: follow the remediation steps in Cursor's security notice and rotate credentials reachable from that machine, from a trusted system.
What plan does the Claude Code extension need?
Any paid Claude plan (Pro, Max, Ultra, Team or Enterprise) or a Claude Console account. No API key is needed; you sign in the first time you open the panel.
Why can I not see the Claude Code icon in VS Code?
The Spark icon only shows when a file is open. Otherwise check you have VS Code 1.94.0 or later, the folder is trusted, and run Developer: Reload Window. The ✻ Claude Code item in the Status Bar works without an open file.
Is the extension the same as the Claude Code CLI?
It runs the same Claude Code, with its own private copy, and shares your conversation history. It does not add claude to your terminal, and it lacks a few CLI features such as ! shell shortcuts.
Why does claude say command not found in the VS Code terminal?
The extension does not install the CLI on your PATH. Install the standalone Claude Code CLI if you want to run claude in a terminal.
What is the keyboard shortcut to open Claude Code?
Cmd+Esc on Mac or Ctrl+Esc on Windows and Linux moves focus between the editor and Claude. Cmd+Shift+Esc or Ctrl+Shift+Esc opens a new Claude tab.
Can I use MCP servers in the VS Code extension?
Yes. Type /mcp in the panel to add, turn on or sign in to servers, or add them with claude mcp add in a terminal. Servers are shared with the CLI.
How do I uninstall the Claude Code extension?
Uninstall Claude Code in the Extensions view. Running claude in a VS Code terminal installs it again unless you set autoInstallIdeExtension to false.
Information
updated Nov 1, 2026
- Transports
- stdio, SSE, Streamable HTTP
- Config file (all)
.mcp.json (project) or ~/.claude.json (user)- MCP docs
- code.claude.com
Sources
Docs, issue trackers and discussions this page is built from.