Tutorials · Beginner
How to connect Claude to Visual Studio Code
Beginner step-by-step guide: install Node.js, VS Code and Claude Code, sign in and run your first test. Includes the fastest shortcut and current pricing.
- Claude Code
- VS Code
- Node.js
In this guide you’ll learn to use Claude Code inside Visual Studio Code (VS Code): an assistant that lives in your editor and helps you write and understand code, create files and build projects.
Pick your system (Windows or Mac) with the buttons above and tap each step to open and follow it.
Before you start: Claude Code needs a paid Claude account (Pro or Max), there’s no 100% free version. See pricing in the right column.
1 Install Node.js
Node.js is the engine Claude Code needs to run.
- Go to https://nodejs.org
- Download the version marked “LTS” (the most stable).
- Open the
.msifile and click “Next” until “Finish”.
- Open the
.pkgfile and follow the steps.
To check it worked: open PowerShellthe Terminal, type this and press Enter:
node --version
If a dotted number like v22.11.0 appears, you’re set!
2 Install Visual Studio Code
- Go to https://code.visualstudio.com
- Click the blue download button (it detects your system).
- Open the installer, accept the terms and click “Next”.
- Unzip the file and drag VS Code into your Applications folder.
- Open VS Code to confirm it works.
3 Install the Claude Code extension
- Open VS Code.
- Open the Extensions panel (4 squares in the left bar) or use
Ctrl + Shift + XCmd + Shift + X. - Search for Claude Code and pick the one by Anthropic (the official one). Click Install.
- The first time it may ask to install the Claude Code engine. Accept. (If it asks in the terminal, run
npm install -g @anthropic-ai/claude-code.) - When it’s done, you’ll see the Claude (✳) icon in the side bar.
Icon not showing? Close and reopen VS Code.
4 Sign in
- Open Claude Code with its (✳) icon (or type
claudein VS Code’s terminal). - It will ask you to sign in; your browser opens.
- Sign in with your Claude account (the one with the paid plan).
- Done! You can now ask Claude for help.
You don’t need an “API key”. Just sign in with your account.
Shortcut: install in 3 commands
If you’re comfortable with the terminal, this is the fastest way (it also installs the VS Code integration for you):
- Install Node.js (Step 1).
- In VS Code’s terminal (Terminal → New Terminal) run:
npm install -g @anthropic-ai/claude-code
- In your project folder, run:
claude
The first time it will offer to install the VS Code extension (accept) and ask you to sign in.
Test that it works
- In VS Code open a folder with File → Open Folder.
- Open Claude Code with its (✳) icon.
- Ask it: “Create a file that says Hello World in Python”.
- Claude shows you what it’ll do and you accept or reject with a click.
If something goes wrong
| Problem | Fix |
|---|---|
| The Claude icon ✳ doesn’t appear | Close and reopen VS Code |
| It says it can’t find “node” | Go back to Step 1 and install Node.js |
| It won’t let me use Claude | Check your account has a paid plan (Pro or Max) |
| I installed the wrong extension | Make sure the publisher is Anthropic |
Frequently asked questions
Is Claude Code free?
The extension is free to install, but to use it you need a paid Claude plan (Pro from $20/mo). There's no 100% free version.
Do I need to know how to code to use Claude Code?
No. You describe what you want in words and Claude writes the code for you; you review and approve. It's ideal for beginners.
Does it work on Windows and Mac?
Yes, it works the same on both. This guide marks the steps that differ between Windows and Mac with the switch at the top.
Do I need an API key?
No. You just sign in with your Claude account; no API key setup needed.