Configure the Claude Code Plugin in VS Code
Posted September 29, 2025 by XSI Tech Teamย โย 2ย min read
You can use Claude Code in the terminal or install its Visual Studio Code plugin to work directly in the editor.
Step A: Install Claude Code Plugin
Install the official Claude Code Plugin.
Step B: Configure Plugin to Use XSI
Configure the VS Code plugin to use XSI's service address and your XSI API Key.


1. Configure Service Address (API Base URL)
- Open VS Code settings (shortcut
Ctrl+,orCmd+,). - Type
claude-code.environmentVariablesin the search box. - Under the matching setting, click "Edit in settings.json".
- Add the following JSON block to your
settings.jsonfile. If this setting already exists, make sure the content is merged correctly.
"claude-code.environmentVariables": [
{
"name": "ANTHROPIC_BASE_URL",
"value": "https://api.xsirouter.com"
}
]2. Configure Authentication Key (API Key)
- Create a
.claudefolder in your home directory and configure the key in itsconfig.jsonfile.
The following commands overwrite an existing config.json. If the file already exists, back it up and merge the configuration manually.
For macOS/Linux, open terminal and execute:
mkdir -p ~/.claude
echo '{"primaryApiKey": "Your XSI API Key"}' > ~/.claude/config.jsonFor Windows, open PowerShell and execute:
New-Item -ItemType Directory -Force -Path "$HOME\.claude"
Set-Content -Path "$HOME\.claude\config.json" -Value '{"primaryApiKey": "Your XSI API Key"}'- Make sure to replace
Your XSI API Keywith your actual key from m.xsirouter.com.
Step C: Restart and Start Using
- Completely exit and restart VS Code to ensure all configurations take effect.
- Click the Claude icon in the VS Code activity bar to open the chat window and start a conversation.
- You can now interact with Claude in VS Code. Requests sent through XSI are billed and recorded there.