Cursor
Cursor setup guide for connecting Cursor to Routescope through the Claude Code for VS Code extension
Keep these values handy
The recommended Cursor path is to use the Claude Code for VS Code extension. It follows Claude Code's Anthropic-style setup:
ANTHROPIC_AUTH_TOKEN: the fullsk-...secret copied from the consoleANTHROPIC_BASE_URL:https://api.routescope.ai- Model: an account-enabled model that supports Claude Code calls
Step 1: Create a Key in Routescope
Follow Get Base URL and API Key to create a token and copy the full sk-... secret.
Step 2: Install Claude Code Locally
npm install -g @anthropic-ai/claude-codeAfter installation, verify the CLI:
claude --versionStep 3: Configure Claude Code
For Windows users, writing to settings.json is usually more stable when later used inside Cursor.
| Field | Value | Notes |
|---|---|---|
ANTHROPIC_AUTH_TOKEN | sk-... | Full secret copied from Routescope token management |
ANTHROPIC_BASE_URL | https://api.routescope.ai | Anthropic-style setup, no /v1 |
ANTHROPIC_MODEL | For example claude-sonnet-4-6 | Replace with an available model |
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS | 1 | Avoids validation errors caused by context_management |
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "sk-your-token",
"ANTHROPIC_BASE_URL": "https://api.routescope.ai",
"ANTHROPIC_MODEL": "claude-sonnet-4-6",
"ANTHROPIC_REASONING_MODEL": "claude-sonnet-4-6",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-4-6",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-sonnet-4-6",
"CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"
},
"includeCoAuthoredBy": false
}Do not add /v1 to Claude Code
ANTHROPIC_BASE_URL should be https://api.routescope.ai.
Step 4: Test in the Terminal First
Close the current terminal, reopen it, then run:
claudeSend a simple prompt:
Reply with "Claude Code is connected to Routescope", then list the top-level files in the current directory.Step 5: Install the Claude Code Extension in Cursor
Open Cursor's extension marketplace, search for Claude Code for VS Code, and install the official extension published by Anthropic.
Step 6: Open the Claude Code Panel
After installation, click the Claude Code icon in Cursor's activity bar and open the Claude Code panel.
Step 7: Test in Cursor
Hello. Reply with "Cursor is connected to Routescope".FAQ
Why not configure OpenAI Base URL directly in Cursor Models?
Cursor's built-in model settings can vary by version and may not fully support every third-party OpenAI-compatible gateway. When using the Claude Code extension, follow Claude Code's Anthropic-style setup.
Why does ANTHROPIC_BASE_URL not include /v1?
Claude Code builds the Anthropic API path itself. Use the root API address.
What should I do for 401 / 403?
Check whether the key is complete, whether the token is disabled, expired, or out of quota, whether the model is allowed, and whether IP restrictions are blocking the request.
What should I do for context_management: Extra inputs are not permitted?
Confirm the configuration includes:
{
"env": {
"CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"
}
}Save, close Cursor and terminals, then reopen and test again.
How is this guide?
Last updated on