To use Claude Code in VS Code, install the official “Claude Code” extension from Anthropic (VS Code 1.94.0 or later), click the Spark icon in the editor toolbar, and sign in with a paid Claude plan or a Claude Console account. You then chat in a side panel, review edits as native diffs, and can switch to a terminal-style session whenever you want the full CLI.
What is the Claude Code VS Code extension?
The Claude Code VS Code extension is Anthropic’s official editor integration for Claude Code. It adds a graphical chat panel, inline diffs you accept or reject per change, @-mentions for files and selections, and plan review, all inside VS Code. It bundles its own copy of the Claude Code CLI, so the panel works without a separate install.
Three pieces work together when you run it:
- The chat panel runs the bundled CLI and talks to Claude.
- A local IDE server that the extension starts on
127.0.0.1. It lets Claude open diffs in VS Code’s diff viewer, read your current selection, and read the errors in the Problems panel. - Shared config in
~/.claude/settings.json, which the extension and the standalone CLI both read: permissions, hooks, environment variables and MCP servers.

The official VS Code guide documents every setting below; for JetBrains, see our Claude Code IDE integrations post.
How to install Claude Code in VS Code
You need VS Code 1.94.0 or later and an Anthropic account. Any paid Claude subscription (Pro, Max, Ultra, Team or Enterprise) works, and so does a Claude Console account. You don’t need an API key to sign in.
- Press
Cmd+Shift+Xon Mac orCtrl+Shift+Xon Windows and Linux to open the Extensions view. - Search for “Claude Code” and install the extension published by Anthropic. You can also install it from the Visual Studio Marketplace.
- Open any file and click the Spark icon in the editor toolbar (top right). The Activity Bar icon, the Command Palette (“Claude Code: Open in New Tab”) and the Claude Code item in the status bar open it too.
- Click Sign in and finish authorization in your browser.
- Send a first prompt, such as “Explain what this file does”.
If the extension doesn’t appear, run Developer: Reload Window. If you set ANTHROPIC_API_KEY in your shell and still see the sign-in screen, VS Code didn’t inherit your shell environment: launch it from a terminal with code ..
The same extension installs in Cursor and other VS Code forks, or from the Open VSX Registry.
Install the standalone CLI too
The extension does not put claude on your PATH. Its CLI copy is private to the chat panel. If you want to type claude in VS Code’s integrated terminal, install the standalone CLI once:
# macOS, Linux, WSL
curl -fsSL https://claude.ai/install.sh | bash
# Windows PowerShell
irm https://claude.ai/install.ps1 | iex
Homebrew and WinGet installs work too but don’t auto-update; the setup page lists every option.
Claude Code in VS Code: panel vs terminal
You can run Claude Code in VS Code two ways. The panel is the graphical chat. Terminal mode is the classic CLI interface, either through the extension’s Use Terminal setting or by running claude in the integrated terminal (press Cmd+` or Ctrl+`).
| Chat panel | Terminal (claude in VS Code) |
|
|---|---|---|
| Install | Extension only | Extension plus standalone CLI |
| Reviewing edits | Side-by-side diff, accept or reject each change | Diffs still open in VS Code when connected to the extension |
| Commands and skills | A subset (type / to see them) |
All of them |
! bash shortcut |
No | Yes |
| MCP setup | /mcp dialog |
claude mcp add or /mcp |
| Checkpoints and rewind | Yes | Yes |
| Several sessions | Tabs and windows, with status dots | One per terminal |
Pick the panel to read diffs carefully next to your code. Pick the terminal for CLI-only commands, the ! shortcut, or if you already live there.
You don’t lose anything by switching. Both share the same conversation history, so claude --resume in the terminal opens a picker with your panel conversations. A claude session started in the integrated terminal connects to the extension on its own once the extension is installed. From an external terminal, run /ide inside Claude Code to connect it to VS Code.
Claude Code VS Code settings and shortcuts worth knowing
Open settings with Cmd+, or Ctrl+,, then go to Extensions > Claude Code. These are the ones most people change first:
| Setting or shortcut | Default | What it does |
|---|---|---|
Cmd+Esc / Ctrl+Esc |
Toggle focus between the editor and Claude | |
Cmd+Shift+Esc / Ctrl+Shift+Esc |
Open a new conversation in an editor tab | |
Option+K / Alt+K |
Insert an @-mention for the current file and selection, like @app.ts#5-10 |
|
useTerminal |
false |
Start Claude in terminal mode instead of the panel |
preferredLocation |
panel |
Open Claude in the sidebar or as a new tab |
initialPermissionMode |
unset | Start new chats in default, plan, acceptEdits or bypassPermissions |
useCtrlEnterToSend |
false |
Send with Ctrl/Cmd+Enter so Enter adds a new line |
Permission modes matter more than any other setting. Click the mode label under the prompt box to switch:
- Manual asks before file edits and most shell commands.
- Plan writes a plan as a Markdown document you can comment on before Claude touches code. You can also type
/plan fix the auth bug. - Edit automatically applies edits without asking.
- Auto lets a classifier review most actions instead of prompting you.
Start in Manual or Plan on a repo you care about.
Need parallel tasks? Open more tabs with Open in New Tab: a blue dot on a tab’s Spark icon means Claude is waiting for a permission.
Connect MCP servers in VS Code
MCP servers give Claude tools beyond your files: GitHub, databases, docs search, your own APIs. Type /mcp in the chat panel to add, remove, enable or reconnect servers and manage OAuth, without leaving the editor.
The terminal route writes to the same config, so a server you add in one shows up in the other:
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ \
--header "Authorization: Bearer YOUR_GITHUB_PAT"
Start a new conversation and check that /mcp shows the server as Connected: claude mcp add doesn’t validate the token.
You don’t need MCP to drive a CLI tool, though: Claude runs shell commands directly.
Let Claude Code test your API with Apidog CLI
When Claude Code changes an endpoint, have it test that endpoint before you review the diff. Apidog CLI gives the agent commands to read your API spec, write test scenarios and run them, all as JSON it can parse. You write one prompt, and Claude Code runs the commands in the VS Code terminal.
Set it up once in the integrated terminal:
npm install -g apidog-cli@latest
apidog login --with-token <YOUR_TOKEN>
npx -y skills add https://apidog.com # pick Claude Code when prompted
Or let Claude do it: the Apidog CLI install guide is written for agents.
Then give Claude Code one prompt in the panel:
List the endpoints in Apidog project <projectId>. Write a test scenario that
creates an object with POST /objects, reads it back with GET /objects/{id}
and deletes it, asserting the status codes, the returned id and the saved
price. Check the payload with the CLI schema before you create it, then run
it against environment <envId> and summarize any failures.
Claude reads the spec, validates its payload and only then writes and runs the scenario:
apidog endpoint list --project <projectId>
apidog cli-schema get test-scenario-create
apidog cli-schema validate test-scenario-create --file scenario.json
apidog test-scenario create --project <projectId> --file scenario.json
apidog run -t <scenarioId> --project <projectId> -e <envId> -r cli
Here is the list and the run on a sandbox project, against a public objects API: 3 requests, 7 assertions, 0 failures.

In Manual mode you see each apidog command before it runs. Add Bash(apidog *) to the allow list in ~/.claude/settings.json and Claude runs those commands without asking, while everything else still prompts you.

The same apidog run command with -r junit drops into CI unchanged; the CI/CD pipeline guide has a copy-paste workflow. For more prompts, see how to use the Apidog CLI in Claude Code.
Once a whole team works this way, Sharkly is the next step: you assign tasks like “test the new orders endpoint” to coding agents that run on your team’s own computers with your own Claude Code plans, and review what they ship before it merges. It’s free to start.
Fix common Claude Code VS Code issues
claudenot found in the integrated terminal. The extension doesn’t add it to PATH. Install the standalone CLI.- No Spark icon. It only shows in the editor toolbar with a file open. Use the Activity Bar icon or the status bar item instead.
/idesays “No available IDEs detected”. Install the extension first; recent CLI versions no longer install it for you from the integrated terminal.- Asked to sign in again after signing in. Reload the window. If it persists, follow the troubleshooting page.
FAQ
Is the Claude Code VS Code extension free? The extension is free to install, but it needs a paid Claude subscription (Pro, Max, Ultra, Team or Enterprise) or a Claude Console account to sign in.
Do I need an API key to use Claude Code in VS Code? No. You sign in with your Claude account in the browser. A Claude Console account or a third-party provider such as Amazon Bedrock also works.
What is the difference between the extension and running claude in the VS Code terminal? The extension gives you a graphical panel with inline diffs. The terminal gives you every CLI command and the ! shortcut. Both share history, settings and MCP servers.
Can Claude Code run my API tests from VS Code? Yes. Install Apidog CLI, give Claude Code one prompt, and it lists your endpoints, writes a test scenario and runs it with apidog run in the terminal.
Wrapping up
Claude Code in VS Code takes minutes to set up: install the extension, sign in, and pick the panel or the terminal per job. Add the standalone CLI for the full command set, and give the agent Apidog CLI so every API change it makes comes back tested. Apidog Free covers up to 4 users, so you can try it on your own project today.



