Skip to content

docs: improve Claude installation guide with Windows PowerShell support#2312

Open
vincent067 wants to merge 1 commit intogithub:mainfrom
vincent067:main
Open

docs: improve Claude installation guide with Windows PowerShell support#2312
vincent067 wants to merge 1 commit intogithub:mainfrom
vincent067:main

Conversation

@vincent067
Copy link
Copy Markdown

Summary

This PR improves the Claude installation guide by:

  1. 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).

  2. 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

  • docs/installation-guides/README.md: Removed 'Claude Web' from the Claude Applications description
  • docs/installation-guides/install-claude.md: Added Windows PowerShell environment variable example

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.

- 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.
@vincent067 vincent067 requested a review from a team as a code owner April 10, 2026 10:09
Copilot AI review requested due to automatic review settings April 10, 2026 10:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_PAT from a .env file and using it in the claude mcp add-json command.

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)"'"}}'
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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"'"}}'

Copilot uses AI. Check for mistakes.

With an environment variable (Windows PowerShell):
```powershell
$env:GITHUB_PAT = (Get-Content .env | Select-String "^GITHUB_PAT=").ToString().Split("=")[1]
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
$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("'")

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants