docs: improve Claude installation guide with Windows PowerShell support#2312
docs: improve Claude installation guide with Windows PowerShell support#2312vincent067 wants to merge 1 commit intogithub:mainfrom
Conversation
- Fix README.md: Remove non-existent 'Claude Web' from description - Add Windows PowerShell environment variable example for loading PAT from .env file The previous documentation only showed bash syntax for loading environment variables from .env files, which doesn't work on Windows PowerShell. This adds a PowerShell equivalent to help Windows users set up the GitHub MCP Server correctly.
There was a problem hiding this comment.
Pull request overview
Updates the Claude installation documentation to more accurately reflect supported Claude clients and to add a Windows PowerShell example for configuring the GitHub PAT when using Claude Code’s claude mcp add-json command.
Changes:
- Remove the inaccurate “Claude Web” mention from the installation-guides index.
- Add a Windows PowerShell example for loading
GITHUB_PATfrom a.envfile and using it in theclaude mcp add-jsoncommand.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/installation-guides/README.md | Updates the Claude Applications description to remove “Claude Web”. |
| docs/installation-guides/install-claude.md | Adds a PowerShell snippet for reading GITHUB_PAT from .env and using it in a claude mcp add-json call. |
| With an environment variable: | ||
| With an environment variable (Linux/macOS): | ||
| ```bash | ||
| claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer '"$(grep GITHUB_PAT .env | cut -d '=' -f2)"'"}}' |
There was a problem hiding this comment.
The Linux/macOS example is labeled as using an environment variable, but it actually reads the token directly from .env via grep/cut and inlines it into the JSON. Either rename this section to indicate it reads from .env, or set GITHUB_PAT as an env var first and then reference it so the heading matches the command.
| claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer '"$(grep GITHUB_PAT .env | cut -d '=' -f2)"'"}}' | |
| export GITHUB_PAT="$(grep '^GITHUB_PAT=' .env | cut -d '=' -f2-)" | |
| claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer '"$GITHUB_PAT"'"}}' |
|
|
||
| With an environment variable (Windows PowerShell): | ||
| ```powershell | ||
| $env:GITHUB_PAT = (Get-Content .env | Select-String "^GITHUB_PAT=").ToString().Split("=")[1] |
There was a problem hiding this comment.
The PowerShell .env parsing is brittle: (Get-Content .env | Select-String ...).ToString().Split('=')[1] will break if multiple matches are returned, and Split('=') truncates values that contain =. Prefer selecting the first match explicitly and splitting with a max of 2 parts (or using a regex capture), and consider trimming surrounding quotes/whitespace so common .env formats like GITHUB_PAT="..." work.
| $env:GITHUB_PAT = (Get-Content .env | Select-String "^GITHUB_PAT=").ToString().Split("=")[1] | |
| $githubPatLine = Get-Content .env | Select-String "^\s*GITHUB_PAT\s*=" | Select-Object -First 1 | |
| $env:GITHUB_PAT = ($githubPatLine.Line -split "=", 2)[1].Trim().Trim('"').Trim("'") |
Summary
This PR improves the Claude installation guide by:
Fixing inaccurate description: Removes 'Claude Web' from the README.md description since the install-claude.md document only covers Claude Desktop and Claude Code CLI (Claude Web doesn't have MCP server support).
Adding Windows PowerShell support: The previous documentation only showed bash syntax for loading environment variables from .env files. This adds a PowerShell equivalent to help Windows users correctly configure their GitHub PAT when setting up the GitHub MCP Server.
Changes
Why This Matters
Windows users previously had to translate bash commands to PowerShell syntax themselves, which could lead to configuration errors. The new PowerShell example uses proper escaping and follows PowerShell best practices for reading .env files.