Claude Code
Claude Code can be used with the GWDG commercial model offering via Microsoft Foundry.
What You Need
- a commercial endpoint or resource name and API key from support@gwdg.de
- the Claude deployment name that should be used by default
- Visual Studio Code
1.98or newer - the Claude Code extension from the VS Code Marketplace
Claude For Visual Studio Code
1. Install the VS Code extension
- In the VS Code Marketplace, install Claude Code by Anthropic.
- Requirement: VS Code
1.98or newer. - Extension docs: Claude Code in VS Code
2. Configure Foundry access in Claude Code
During onboarding, you may receive a prepared settings.json from GWDG.
If not, create the file manually with the same structure shown below.
Save it to:
- Windows:
%USERPROFILE%\.claude\settings.json - macOS:
~/.claude/settings.json - Linux:
~/.claude/settings.json
The file is stored in your home profile so the CLI and the VS Code extension use the same Claude configuration.
The file configures the required Foundry variables:
CLAUDE_CODE_USE_FOUNDRYANTHROPIC_FOUNDRY_RESOURCEANTHROPIC_FOUNDRY_API_KEYANTHROPIC_MODEL
If deployments are available, the file can also pin the Opus, Sonnet, and Haiku aliases through:
ANTHROPIC_DEFAULT_SONNET_MODELANTHROPIC_DEFAULT_HAIKU_MODELANTHROPIC_DEFAULT_OPUS_MODEL
Use the exact values that you received from GWDG.
If you received a resource name, use ANTHROPIC_FOUNDRY_RESOURCE.
If you received a full base URL instead, use ANTHROPIC_FOUNDRY_BASE_URL.
- Microsoft reference: Configure Claude Code for Microsoft Foundry
- Claude configuration: Claude configuration directory
- Model configuration: Claude model configuration
3. Prepare VS Code for third-party provider mode
To avoid the Anthropic login prompt, enable the user setting Claude Code: Disable Login Prompt.
You can also edit the VS Code user settings file directly:
- Windows:
%APPDATA%\Code\User\settings.json - macOS:
~/Library/Application Support/Code/User/settings.json - Linux:
~/.config/Code/User/settings.json
Add:
{
"claudeCode.disableLoginPrompt": true
}On Windows:
- use Git Bash or WSL2; PowerShell and
cmd.exeare not the recommended default runtime for Claude Code - in VS Code, set
Terminal > Integrated > Default Profile: WindowstoGit Bashwhen possible - or run VS Code directly inside a WSL session
4. Start Claude Code in VS Code
- Fully close all VS Code windows and then reopen VS Code.
- Open a project folder.
- Open the Claude sidebar and start a session.
- If Claude still asks for an Anthropic login, first verify
claudeCode.disableLoginPromptand the location of~/.claude/settings.json. - If needed, enable
Claude Code: Use Terminaland start Claude from the integrated terminal. - Setup: Claude Code in VS Code
5. Example settings.json
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"env": {
"CLAUDE_CODE_USE_FOUNDRY": "1",
"ANTHROPIC_FOUNDRY_RESOURCE": "<your-resource-name>",
"ANTHROPIC_FOUNDRY_API_KEY": "<your-api-key>",
"ANTHROPIC_MODEL": "<your-default-deployment-name>"
}
}If your setup includes separate aliases for Sonnet and Opus, you can additionally define the following variables in the same file:
ANTHROPIC_DEFAULT_SONNET_MODELANTHROPIC_DEFAULT_HAIKU_MODELANTHROPIC_DEFAULT_OPUS_MODEL
6. Permissions and security
Claude Code prompts for approvals depending on your permission mode. Grant only the permissions needed for the current task.
Security and permissions:
Note
AI models can hallucinate and generate incorrect information. Always verify generated results critically before using or processing them.
Troubleshooting
If Claude Code still does not start correctly with Microsoft Foundry, check the following first:
claudeCode.disableLoginPromptis enabled in VS Code~/.claude/settings.jsonis stored in the correct user directory- the Foundry resource name, API key, and deployment names are correct
- on Windows, VS Code is using Git Bash or WSL instead of PowerShell or
cmd.exe
Documentation
What You Need
- a commercial endpoint or resource name and API key from support@gwdg.de
- the Claude deployment name that should be used by default
- a local terminal
Claude Code CLI
1. Install the CLI
Install Claude Code on macOS, Linux, Git Bash, or WSL:
curl -fsSL https://claude.ai/install.sh | bash
claude --versionOn macOS, Homebrew is also supported:
brew install --cask claude-code
claude --versionOfficial documentation:
2. Configure Foundry access for the CLI
Claude Code CLI uses settings.json in the .claude directory in your home folder:
- Windows:
%USERPROFILE%\.claude\settings.json - macOS:
~/.claude/settings.json - Linux:
~/.claude/settings.json
For Microsoft Foundry, make sure the file includes the required variables:
CLAUDE_CODE_USE_FOUNDRYANTHROPIC_FOUNDRY_RESOURCEorANTHROPIC_FOUNDRY_BASE_URLANTHROPIC_FOUNDRY_API_KEYANTHROPIC_MODEL
Optional deployment aliases can also be defined:
ANTHROPIC_DEFAULT_SONNET_MODELANTHROPIC_DEFAULT_HAIKU_MODELANTHROPIC_DEFAULT_OPUS_MODEL
3. Example settings.json
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"env": {
"CLAUDE_CODE_USE_FOUNDRY": "1",
"ANTHROPIC_FOUNDRY_RESOURCE": "<your-resource-name>",
"ANTHROPIC_FOUNDRY_API_KEY": "<your-api-key>",
"ANTHROPIC_MODEL": "<your-default-deployment-name>"
}
}4. Start the CLI
Open a terminal in your project directory and run:
claudeClaude Code then starts an interactive terminal session with access to your configured Foundry deployment.
Useful commands:
claude
claude "explain this repository"
claude -c5. Windows notes
On Windows, Git Bash or WSL2 is the recommended runtime for Claude Code.
PowerShell and cmd.exe are not the preferred default environments for day-to-day Claude Code usage.
6. Permissions and security
Claude Code CLI prompts for approvals depending on the selected permission mode. Grant only the permissions required for the current task.
Note
AI models can hallucinate and generate incorrect information. Always verify generated results critically before using or processing them.
Troubleshooting
If the CLI does not use Microsoft Foundry as expected, check the following first:
CLAUDE_CODE_USE_FOUNDRYis set to1- the resource name or base URL is correct
- the API key is valid
- the deployment name in
ANTHROPIC_MODELexists in your Foundry resource - on Windows, you are running the CLI from Git Bash or WSL
Documentation
More AI Services
In addition to Azure OpenAI, we offer other AI services. An overview of all available AI services can be found here: