Claude
Claude Code extension (VS Code / Cursor)
Get the command-line Claude Code working first, then install the extension. If the extension shows a login page, add two settings in the editor.
-
First set up Claude Code as described in Claude Code. Check that running
claudein a terminal gives you a normal conversation. -
Search for Claude Code in the VS Code or Cursor extension marketplace and install the official extension whose publisher is Anthropic (ID
anthropic.claude-code). -
Fully quit the editor and open it again. Press
Ctrl+Shift+P(Cmd+Shift+Pon macOS), search for Claude Code and open the panel.
The extension keeps asking you to sign in
Section titled “The extension keeps asking you to sign in”The extension’s own login check doesn’t read ~/.claude/settings.json. An editor opened from the Dock or the Start menu also can’t see variables you export in a terminal. Add these two settings to the editor’s user settings, then fully quit the editor and open it again.
To open the user settings, press Ctrl+Shift+P (Cmd+Shift+P on macOS), type Preferences: Open User Settings (JSON) and press Enter:
{ "claudeCode.environmentVariables": [ { "name": "ANTHROPIC_BASE_URL", "value": "https://2api.dev" }, { "name": "ANTHROPIC_AUTH_TOKEN", "value": "sk-your-key" } ], "claudeCode.disableLoginPrompt": true}If the file already has settings in it, don’t paste the outer { }. Paste only the lines in between, after the last existing item, and add a comma to the end of that item.