Back to Home

Claude Code on Windows: setup for developers

Detailed guide to installing and configuring Claude Code on Windows. Features of working with PowerShell, AWS, and MCP servers. Solutions to typical problems for IT specialists.

Professional installation of Claude Code on Windows: guide 2026
Advertisement 728x90

# Professional Claude Code Setup on Windows: Key Tips for IT Pros

Setting up Claude Code on Windows requires accounting for OS specifics and integration with development tools. This article shares proven configurations for working with AWS, PowerShell, and Git Bash without errors.

Environment Preparation

For Claude Code to work correctly, properly configure the basic components. Start by installing Git Bash—a critical component, as the Claude Code installer uses it to execute commands:

winget install Git.Git

During Git installation, keep all default settings, including Explorer integration and adding to PATH. Pay special attention to PowerShell: Windows has an outdated version 5.1 on .NET Framework by default. Modern projects require PowerShell 7+:

Google AdInline article slot
winget install Microsoft.PowerShell

After installation, launch pwsh, not powershell.exe. Check the version:

pwsh --version

Important: All subsequent commands must be run in PowerShell 7+. For convenience, use Windows Terminal, which supports parallel work with different shells.

Installation and Authentication

Key installation features:

Google AdInline article slot
  • Use the official script:
irm https://claude.ai/install.ps1 | iex
  • The WinGet alternative requires manual updates:
winget install Anthropic.ClaudeCode
  • For a specific version:
& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) 2.1.105

After installation, verify it's working:

claude --version
claude doctor

If you get a command not found error, add the path manually:

$userPath = [Environment]::GetEnvironmentVariable("PATH", "User")
[Environment]::SetEnvironmentVariable("PATH", 
  "$userPath;$env:USERPROFILE\.local\bin", 
  "User")

For authentication:

Google AdInline article slot
  • For most users, just run claude and log in via browser
  • For API billing, set the key:
[Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "sk-ant-api03-...", "User")

Windows-Specific Configuration

Fixing PowerShell Issues

By default, Claude Code uses Git Bash, causing conflicts with PowerShell syntax. For proper operation, add to %USERPROFILE%\.claude\settings.json:

{
  "env": {
    "CLAUDE_CODE_USE_POWERSHELL_TOOL": "1",
    "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
  },
  "defaultShell": "powershell"
}

This activates:

  • Automatic pwsh.exe detection
  • Redirecting interactive commands through PowerShell
  • Retaining Git Bash for internal operations

Working with Paths and File System

NTFS has fundamental differences from Linux file systems:

  • Case-insensitivity for file names
  • Permissions requirements for symbolic links
  • Line ending handling quirks (CRLF vs LF)

Critical settings:

  • Always use Windows paths with backslashes
  • For scripts, add line ending conversion:
(Get-Content script.sh) -replace "`r`n", "`n" | Set-Content -NoNewline script.sh
  • In global instructions (%USERPROFILE%\.claude\CLAUDE.md), specify:
# File paths
- Use Windows paths: C:\\Users\\<user>\\projects\\...
- Do NOT use Unix paths

Integration with Cloud Services

AWS and PowerShell

For AWS work via PowerShell:

  • Install AWS Tools for PowerShell
  • Configure profiles in %USERPROFILE%\.aws\credentials
  • In CLAUDE.md, add:
# Available tools
- Use aws-powershell for AWS operations
- Use SSM documents with PowerShell

Fixing MCP Server Issues

MCP uses Unix domain sockets, unavailable on Windows. Workaround:

{
  "mcpServers": {
    "filesystem": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "@modelcontextprotocol/server-filesystem", "C:/Projects"]
    }
  }
}

Important:

  • Use forward slashes in JSON paths
  • Avoid hard-coded Unix paths in server code
  • For temp files, explicitly specify Windows-specific paths

Key Points

  • PowerShell 7+ is mandatory — version 5.1 doesn't support modern scenarios
  • Git Bash is critical — even with PowerShell, it's needed for internal operations
  • Windows-style paths — Claude Code doesn't recognize Unix paths or ~-shortcuts
  • MCP issues — require manual setup via cmd /c on Windows
  • Line endings — automatic CRLF→LF conversion is essential for scripts

Tips for Russian Developers

Starting in 2026, official access to Claude Code in Russia will be restricted. Recommended solutions:

  • Corporate accounts via cloud providers (AWS Bedrock)
  • Proxy servers with authentication
  • API billing with prepayment
  • Alternative MCP servers with localized paths

Important: With an API key, ensure it's active and tied to a working account. Check status via claude /status.

Conclusion

Claude Code setup on Windows hinges on three key aspects: proper PowerShell configuration, NTFS adaptations, and MCP server fixes. For AWS devs, correctly specifying paths in config files and handling line endings is crucial. Follow these, and you'll match Linux-level performance.

— Editorial Team

Advertisement 728x90

Read Next