VS Code and JetBrains
This page is the VS Code extension and the JetBrains plugin. The desktop app is Claude Code desktop. The command line is Claude Code CLI.
Both run Claude Code. They are not the normal chat box on claude.ai.
| Client | What it is | Where it reads the gateway |
|---|---|---|
| VS Code extension | The Claude Code panel in the editor. The extension ships its own CLI | Shares the env block in ~/.claude/settings.json with the CLI. The extension's own login check also needs the variables in VS Code user settings |
| JetBrains plugin | Claude Code inside IntelliJ, PyCharm, WebStorm, and the other JetBrains IDEs | The plugin does not ship a CLI. It launches the claude binary in the IDE terminal, so it reads the same ~/.claude/settings.json |
The normal chat UI on claude.ai and in the mobile app cannot take a third-party key. The desktop app does not read the file below either. Configure it in the app. See Claude Code desktop.
Where the file is
User settings file:
- Mac:
~/.claude/settings.json - Windows:
%USERPROFILE%\.claude\settings.json, which isC:\Users\<your user name>\.claude\settings.json
An app opened from the Dock, the Start menu, or a desktop icon does not see variables you export in a terminal. VS Code and JetBrains both need those variables in the file above. For JetBrains, that file is enough. VS Code's login check needs a second copy. See below.
Install
These links were checked against Anthropic's pages on 2026-11-02: VS Code and JetBrains.
VS Code extension
- VS Code 1.94.0 or later.
- In VS Code, press
Cmd+Shift+X(Mac) orCtrl+Shift+X(Windows), search for Claude Code, and click Install. - Marketplace page: Claude Code on Visual Studio Marketplace.
- Official one-click links:
vscode:extension/anthropic.claude-code, andcursor:extension/anthropic.claude-codefor Cursor. - Editors that cannot use the Visual Studio Marketplace can install from Open VSX. Anthropic says the marketplaces are third-party software it does not endorse.
The extension bundles its own CLI, so the chat panel does not need a separate install. To run the claude command in VS Code's integrated terminal, also install the standalone CLI from the integration guide.
JetBrains plugin
The plugin does not bundle a CLI. Do both steps:
- Install
claudefrom the integration guide and make sure the IDE can find it onPATH. If it cannot, the plugin shows "Cannot launch Claude Code". Set the full path under Settings → Tools → Claude Code [Beta] → Claude command. - Install the plugin from the JetBrains Marketplace and fully restart the IDE. Plugin page: Claude Code. You can also open Settings → Plugins inside the IDE, search for Claude Code, and install it.
Anthropic lists IntelliJ IDEA, PyCharm, Android Studio, WebStorm, PhpStorm, and GoLand. For remote development, install the plugin on the remote host (Settings → Plugin (Host)), not only on your local machine.
Write the env block in settings.json
Open Console → API Keys and create a key that starts with mf-. Everywhere below, paste the raw key. Do not add Bearer .
On Mac, edit ~/.claude/settings.json. On Windows, edit %USERPROFILE%\.claude\settings.json. Create the file if it does not exist. If it already has other settings, merge the env object. Do not delete the other keys.
{
"env": {
"ANTHROPIC_BASE_URL": "https://modelfold.ai/anthropic",
"ANTHROPIC_AUTH_TOKEN": "your mf- key",
"ANTHROPIC_MODEL": "claude-sonnet-5"
}
}ANTHROPIC_BASE_URLstops at/anthropic. The client appends/v1/messagesitself.https://modelfold.ai/anthropic/v1/messagesis the wrong value.ANTHROPIC_AUTH_TOKENis the raw key. The client sends it asAuthorization: Bearer. A value that already starts withBearerbecomesBearer Bearer …and the API returns 401.ANTHROPIC_MODELis anidfrom the list below.claude-sonnet-5was one id when this page was written. If the list changes, use the new id. Do not assume a built-in alias exists on ModelFold.- Do not put the key in a project's
.claude/settings.json. That file is committed. Use the user file, or an uncommitted.claude/settings.local.json. - If the same variable is also
exported in the shell, the settings file wins. - Do not also set
ANTHROPIC_API_KEY. That variable is sent asX-Api-Key. Anthropic warns when two credential sources are active.
The JetBrains plugin launches the local claude binary, which reads this file. An export in some other terminal window does not reach the IDE.
Anthropic's gateway connect page says values in ~/.claude/settings.json reach the process the VS Code extension spawns, but not the extension's own login check. With only that file, the VS Code panel still asks you to sign in to Claude. JetBrains does not have that extra check. After you save the file, fully restart the IDE.
VS Code also needs its own user settings
VS Code opened from the Dock also does not inherit a terminal export. Run Preferences: Open User Settings (JSON) from the Command Palette and merge this in. Do not replace the whole file:
{
"claudeCode.environmentVariables": [
{ "name": "ANTHROPIC_BASE_URL", "value": "https://modelfold.ai/anthropic" },
{ "name": "ANTHROPIC_AUTH_TOKEN", "value": "your mf- key" },
{ "name": "ANTHROPIC_MODEL", "value": "claude-sonnet-5" }
]
}Then run Developer: Reload Window. Closing the chat panel is not enough.
If the Claude sign-in screen is still there after the reload, turn on Disable Login Prompt (claudeCode.disableLoginPrompt). Anthropic documents that switch for third-party setups that should skip the Anthropic sign-in prompt. Keep the key in user settings, not in a workspace .vscode/settings.json that gets committed.
Models you can use
This table is from GET https://modelfold.ai/anthropic/v1/models. When this page was written, has_more was false and the list had 13 models. The list changes. Run the command yourself. Do not keep using an old table.
curl -s -H "Authorization: Bearer $MODELFOLD_API_KEY" \
https://modelfold.ai/anthropic/v1/modelsOn PowerShell, use curl.exe and $env:MODELFOLD_API_KEY. The header must be Authorization: Bearer. A header literally named apikey is rejected with 401. Listing models does not create a generation charge.
| id (set this as ANTHROPIC_MODEL) | Display name | Max input | Max output |
|---|---|---|---|
claude-fable-5 | Claude Fable 5 | 1000000 | 128000 |
claude-opus-5-5 | Claude Opus 5.5 | 1000000 | 128000 |
claude-opus-5 | Claude Opus 5 | 1000000 | 128000 |
claude-sonnet-5-5 | Claude Sonnet 5.5 | 1000000 | 128000 |
claude-haiku-5-5 | Claude Haiku 5.5 | 1000000 | 128000 |
claude-sonnet-5 | Claude Sonnet 5 | 1000000 | 128000 |
claude-opus-4-8 | Claude Opus 4.8 | 1000000 | 128000 |
claude-opus-4-7 | Claude Opus 4.7 | 1000000 | 128000 |
claude-opus-4-6 | Claude Opus 4.6 | 1000000 | 128000 |
claude-sonnet-4-6 | Claude Sonnet 4.6 | 1000000 | 128000 |
claude-opus-4-5 | Claude Opus 4.5 | not returned | not returned |
claude-sonnet-4-5 | Claude Sonnet 4.5 | not returned | not returned |
claude-haiku-4-5 | Claude Haiku 4.5 | 200000 | 64000 |
Check that it works
A 200 from the model list only shows that the key and the URL are accepted. It does not prove generation works. A real message does, and that message spends ModelFold credits.
After you edit the file or the editor settings, quit the whole app and open it again. Reload the VS Code window or quit VS Code, and fully restart the JetBrains IDE. Opening a new chat is not enough.
claudein the JetBrains terminal: run/status. The Status tab should show Anthropic base URLhttps://modelfold.ai/anthropicand an auth line that namesANTHROPIC_AUTH_TOKEN. Then send a short message.- VS Code: after Reload Window, open the Claude Code panel and send a short message. A Claude sign-in screen means
claudeCode.environmentVariableswas not picked up. - On the console usage page, confirm the request is logged against your key.
Common problems
| What you see | Why |
|---|---|
401, or a header that says Bearer Bearer | The key is wrong or revoked, or ANTHROPIC_AUTH_TOKEN includes a Bearer prefix. Paste only the raw mf- key. A header named apikey is also a 401. |
404, or a URL that contains /v1/v1/messages | ANTHROPIC_BASE_URL includes /v1 or /v1/messages. Use only https://modelfold.ai/anthropic. |
| VS Code still asks you to sign in to a Claude account | settings.json alone does not reach the login check. Also set claudeCode.environmentVariables in user settings, then Reload Window. If the sign-in screen remains, turn on Disable Login Prompt. VS Code opened from the Dock does not see a terminal export. |
| JetBrains says "Cannot launch Claude Code" | claude is not on the IDE's PATH. Install it from the CLI guide, or set the full path under Settings → Tools → Claude Code [Beta], then fully restart the IDE. |
| JetBrains still uses the Claude account | The user settings.json was not read, or the variables were only exported in another terminal. Save the file and fully restart the IDE. |
402, billing_error, insufficient credits | The ModelFold balance is too low (under 1 credit, or less than the pre-charge for this call). Add credits in the console. This is not a key-format error. |
| Model is not available | ANTHROPIC_MODEL is not an id from the model list. Fetch the list again and use one of those ids. |
| claude.ai chat on the web or phone rejects the key | The normal chat UI does not accept a third-party key. Use an editor on this page, the desktop app, or the CLI. |
Other CLI pitfalls are on Claude Code CLI.
