This guide walks through installing and configuring the Claude Code extension for Visual Studio Code, routing all queries through Harvard's HUIT Bedrock proxy. This gives you an AI coding assistant directly inside your editor.
If you don't already have Visual Studio Code, download it from code.visualstudio.com. It's free and available for Mac, Windows, and Linux.
ms-toolsai (Microsoft's Jupyter extension). This is not needed
for Claude Code — you can safely skip or dismiss that prompt.
This is the critical step. The Claude Code extension needs your HUIT API credentials.
The most reliable way to provide them is through the shared Claude settings file at
~/.claude/settings.json, which is used by both the CLI and the VS Code extension.
~/.zshrc, so the extension won't
see those environment variables. Putting them in ~/.claude/settings.json ensures
they work regardless of how you launch VS Code.
Open a terminal and edit the settings file:
nano ~/.claude/settings.json
Add an "env" block to your settings file. If your file already has
other settings, keep those and add the env block alongside them.
For example:
{
"env": {
"ANTHROPIC_BEDROCK_BASE_URL": "https://apis.huit.harvard.edu/ais-bedrock-llm/v2",
"ANTHROPIC_API_KEY": "YourKeyHere",
"CLAUDE_CODE_SKIP_BEDROCK_AUTH": "1",
"CLAUDE_CODE_USE_BEDROCK": "1",
"ANTHROPIC_SMALL_FAST_MODEL": "us.anthropic.claude-opus-4-5-20251101-v1:0"
}
}
Replace YourKeyHere with your actual HUIT API key.
Save with Ctrl+O, press Enter, then exit with Ctrl+X.
JSON is very picky about commas. A misplaced or missing comma will cause a "malformed JSON" error. The rules are:
}{ must have a matching closing }For example, note the comma after false on line 3 below — it's required
because "env" follows it. But there is no comma after the
closing } of the env block because it's the last item:
{
"spinnerTipsEnabled": false, ← comma here (more items follow)
"env": {
"ANTHROPIC_API_KEY": "YourKey",
"CLAUDE_CODE_USE_BEDROCK": "1" ← no comma (last item)
} ← no comma (last item)
}
What these variables do:
ANTHROPIC_BEDROCK_BASE_URL — Points to Harvard's secure Bedrock proxy endpointANTHROPIC_API_KEY — Your personal HUIT API keyCLAUDE_CODE_SKIP_BEDROCK_AUTH — Skips AWS SigV4 authentication (Harvard's proxy handles auth)CLAUDE_CODE_USE_BEDROCK — Enables Bedrock modeANTHROPIC_SMALL_FAST_MODEL — Model used for quick background operationsenv block must be strings
(e.g., "1" not 1). You do not need to specify a model —
Claude Code will automatically use the best available model.
Since you're using Harvard's HUIT proxy rather than Anthropic's direct authentication, you need to disable the default login prompt in VS Code:
You can open Claude Code in VS Code several ways:
claude directly in VS Code's built-in terminal (check the box for "Terminal" in the View menu if it's not visible)Send a simple test message in the Claude Code chat panel:
Hello, what model are you?
You should receive a response from Claude through the HUIT proxy. If it works, you're all set.
Auth conflict: Using ANTHROPIC_API_KEY
instead of Anthropic Console key. Either
unset ANTHROPIC_API_KEY, or run `claude
/logout`.
This just means Claude Code is using your HUIT API key (from
ANTHROPIC_API_KEY) instead of a personal Anthropic account.
That's exactly what we want — no action needed.
You haven't disabled the login prompt. Go to VS Code Settings (Command-comma), search "Claude Code login", and check Disable Login Prompt.
Check that ~/.claude/settings.json is valid JSON and contains the correct
API key. You can verify by running in Terminal:
cat ~/.claude/settings.json
Also verify your API key works from the command line:
curl --location 'https://go.apis.huit.harvard.edu/ais-bedrock-llm/apigee/quota' \
--header "Authorization: Bearer $ANTHROPIC_API_KEY"
These are unrelated to Claude Code. You can safely dismiss or skip them.
After editing ~/.claude/settings.json, close and reopen VS Code
to ensure the extension picks up the new configuration.
Once configured, Claude Code in VS Code can:
@-mentions to reference specific files, functions, or symbolsThe extension provides the same capabilities as the CLI, with the added convenience of inline diffs, file navigation, and visual integration with your editor.