Skip to content

Commit 96a705c

Browse files
D1M1TR10SCopilotLuluBeatsonmattdhollowaytommaso-moro
authored
Update Claude MCP install guide after testing (#706)
* Revise Claude installation guide - Verified Claude Code installation steps - Identified and documented issues with Claude Desktop setup - Updated installation documentation based on testing * Revise instructions for opening Claude Code Updated recommendations for opening Claude Code. * Update docs/installation-guides/install-claude.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update docs/installation-guides/install-claude.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update installation guide for Claude setup Added installation option for using Claude Code using a release binary. * Change section title for Go Binary installation Updated section title for clarity regarding installation without Docker. * Close double quote in bash command --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: LuluBeatson <lulubeatson@github.com> Co-authored-by: Matt Holloway <mattdholloway@github.com> Co-authored-by: Tommaso Moro <37270480+tommaso-moro@users.noreply.github.com>
1 parent 8bfe0c3 commit 96a705c

File tree

1 file changed

+95
-132
lines changed

1 file changed

+95
-132
lines changed
Lines changed: 95 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,98 @@
11
# Install GitHub MCP Server in Claude Applications
22

3-
This guide covers installation of the GitHub MCP server for Claude Code CLI, Claude Desktop, and Claude Web applications.
4-
5-
## Claude Web (claude.ai)
6-
7-
Claude Web supports remote MCP servers through the Integrations built-in feature.
3+
## Claude Code CLI
84

95
### Prerequisites
6+
- Claude Code CLI installed
7+
- [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new)
8+
- For local setup: [Docker](https://www.docker.com/) installed and running
9+
- Open Claude Code inside the directory for your project (recommended for best experience and clear scope of configuration)
1010

11-
1. Claude Pro, Team, or Enterprise account (Integrations not available on free plan)
12-
2. [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new)
13-
14-
### Installation
15-
16-
**Note**: As of July 2025, the remote GitHub MCP Server has known compatibility issues with Claude Web. While Claude Web supports remote MCP servers from other providers (like Atlassian, Zapier, Notion), the GitHub MCP Server integration may not work reliably.
17-
18-
For other remote MCP servers that do work with Claude Web:
19-
20-
1. Go to [claude.ai](https://claude.ai) and log in
21-
2. Click your profile icon → **Settings**
22-
3. Navigate to **Integrations** section
23-
4. Click **+ Add integration** or **Add More**
24-
5. Enter the remote server URL
25-
6. Follow the OAuth authentication flow when prompted
11+
<details>
12+
<summary><b>Storing Your PAT Securely</b></summary>
13+
<br>
2614

27-
**Alternative**: Use Claude Desktop or Claude Code CLI for reliable GitHub MCP Server integration.
15+
For security, avoid hardcoding your token. One common approach:
2816

29-
---
30-
31-
## Claude Code CLI
32-
33-
Claude Code CLI provides command-line access to Claude with MCP server integration.
34-
35-
### Prerequisites
17+
1. Store your token in `.env` file
18+
```
19+
GITHUB_PAT=your_token_here
20+
```
3621

37-
1. Claude Code CLI installed
38-
2. [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new)
39-
3. [Docker](https://www.docker.com/) installed and running
22+
2. Add to .gitignore
23+
```bash
24+
echo -e ".env\n.mcp.json" >> .gitignore
25+
```
4026

41-
### Installation
27+
</details>
4228

43-
Run the following command to add the GitHub MCP server using Docker:
29+
### Remote Server Setup (Streamable HTTP)
4430

31+
1. Run the following command in the Claude Code CLI
4532
```bash
46-
claude mcp add github -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
33+
claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer YOUR_GITHUB_PAT"
4734
```
4835

49-
Then set the environment variable:
36+
With an environment variable:
5037
```bash
51-
claude mcp update github -e GITHUB_PERSONAL_ACCESS_TOKEN=your_github_pat
38+
claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer $(grep GITHUB_PAT .env | cut -d '=' -f2)"
5239
```
40+
2. Restart Claude Code
41+
3. Run `claude mcp list` to see if the GitHub server is configured
42+
43+
### Local Server Setup (Docker required)
5344

54-
Or as a single command with the token inline:
45+
### With Docker
46+
1. Run the following command in the Claude Code CLI:
5547
```bash
56-
claude mcp add-json github '{"command": "docker", "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"], "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "your_github_pat"}}'
48+
claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=YOUR_GITHUB_PAT -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
5749
```
5850

59-
**Important**: The npm package `@modelcontextprotocol/server-github` is no longer supported as of April 2025. Use the official Docker image `ghcr.io/github/github-mcp-server` instead.
51+
With an environment variable:
52+
```bash
53+
claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=$(grep GITHUB_PAT .env | cut -d '=' -f2) -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
54+
```
55+
2. Restart Claude Code
56+
3. Run `claude mcp list` to see if the GitHub server is configured
6057

61-
### Configuration Options
58+
### With a Binary (no Docker)
6259

63-
- Use `-s user` to add the server to your user configuration (available across all projects)
64-
- Use `-s project` to add the server to project-specific configuration (shared via `.mcp.json`)
65-
- Default scope is `local` (available only to you in the current project)
60+
1. Download [release binary](https://github.com/github/github-mcp-server/releases)
61+
2. Add to your `PATH`
62+
3. Run:
63+
```bash
64+
claude mcp add-json github '{"command": "github-mcp-server", "args": ["stdio"], "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"}}'
65+
```
66+
2. Restart Claude Code
67+
3. Run `claude mcp list` to see if the GitHub server is configured
6668

6769
### Verification
68-
69-
Run the following command to verify the installation:
7070
```bash
7171
claude mcp list
72+
claude mcp get github
7273
```
7374

7475
---
7576

7677
## Claude Desktop
7778

78-
Claude Desktop provides a graphical interface for interacting with the GitHub MCP Server.
79+
> ⚠️ **Note**: Some users have reported compatibility issues with Claude Desktop and Docker-based MCP servers. We're investigating. If you experience issues, try using another MCP host, while we look into it!
7980
8081
### Prerequisites
82+
- Claude Desktop installed (latest version)
83+
- [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new)
84+
- [Docker](https://www.docker.com/) installed and running
8185

82-
1. Claude Desktop installed
83-
2. [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new)
84-
3. [Docker](https://www.docker.com/) installed and running
86+
> **Note**: Claude Desktop supports MCP servers that are both local (stdio) and remote ("connectors"). Remote servers can generally be added via Settings → Connectors → "Add custom connector". However, the GitHub remote MCP server requires OAuth authentication through a registered GitHub App (or OAuth App), which is not currently supported. Use the local Docker setup instead.
8587
8688
### Configuration File Location
87-
8889
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
8990
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
90-
- **Linux**: `~/.config/Claude/claude_desktop_config.json` (unofficial support)
91-
92-
### Installation
93-
94-
Add the following to your `claude_desktop_config.json`:
95-
96-
```json
97-
{
98-
"mcpServers": {
99-
"github": {
100-
"command": "docker",
101-
"args": [
102-
"run",
103-
"-i",
104-
"--rm",
105-
"-e",
106-
"GITHUB_PERSONAL_ACCESS_TOKEN",
107-
"ghcr.io/github/github-mcp-server"
108-
],
109-
"env": {
110-
"GITHUB_PERSONAL_ACCESS_TOKEN": "your_github_pat"
111-
}
112-
}
113-
}
114-
}
115-
```
91+
- **Linux**: `~/.config/Claude/claude_desktop_config.json`
11692

117-
**Important**: The npm package `@modelcontextprotocol/server-github` is no longer supported as of April 2025. Use the official Docker image `ghcr.io/github/github-mcp-server` instead.
93+
### Local Server Setup (Docker)
11894

119-
### Using Environment Variables
120-
121-
Claude Desktop supports environment variable references. You can use:
95+
Add this codeblock to your `claude_desktop_config.json`:
12296

12397
```json
12498
{
@@ -134,71 +108,60 @@ Claude Desktop supports environment variable references. You can use:
134108
"ghcr.io/github/github-mcp-server"
135109
],
136110
"env": {
137-
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT"
111+
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"
138112
}
139113
}
140114
}
141115
}
142116
```
143117

144-
Then set the environment variable in your system before starting Claude Desktop.
145-
146-
### Installation Steps
147-
118+
### Manual Setup Steps
148119
1. Open Claude Desktop
149-
2. Go to Settings (from the Claude menu) → Developer → Edit Config
150-
3. Add your chosen configuration
151-
4. Save the file
152-
5. Restart Claude Desktop
153-
154-
### Verification
155-
156-
After restarting, you should see:
157-
- An MCP icon in the Claude Desktop interface
158-
- The GitHub server listed as "running" in Developer settings
120+
2. Go to Settings → Developer → Edit Config
121+
3. Paste the code block above in your configuration file
122+
4. If you're navigating to the configuration file outside of the app:
123+
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
124+
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
125+
5. Open the file in a text editor
126+
6. Paste one of the code blocks above, based on your chosen configuration (remote or local)
127+
7. Replace `YOUR_GITHUB_PAT` with your actual token or $GITHUB_PAT environment variable
128+
8. Save the file
129+
9. Restart Claude Desktop
159130

160131
---
161132

162133
## Troubleshooting
163134

164-
### Claude Web
165-
- Currently experiencing compatibility issues with the GitHub MCP Server
166-
- Try other remote MCP servers (Atlassian, Zapier, Notion) which work reliably
167-
- Use Claude Desktop or Claude Code CLI as alternatives for GitHub integration
168-
169-
### Claude Code CLI
170-
- Verify the command syntax is correct (note the single quotes around the JSON)
171-
- Ensure Docker is running: `docker --version`
172-
- Use `/mcp` command within Claude Code to check server status
173-
174-
### Claude Desktop
175-
- Check logs at:
176-
- **macOS**: `~/Library/Logs/Claude/`
177-
- **Windows**: `%APPDATA%\Claude\logs\`
178-
- Look for `mcp-server-github.log` for server-specific errors
179-
- Ensure configuration file is valid JSON
180-
- Try running the Docker command manually in terminal to diagnose issues
181-
182-
### Common Issues
183-
- **Invalid JSON**: Validate your configuration at [jsonlint.com](https://jsonlint.com)
184-
- **PAT issues**: Ensure your GitHub PAT has required scopes
185-
- **Docker not found**: Install Docker Desktop and ensure it's running
186-
- **Docker image pull fails**: Try `docker logout ghcr.io` then retry
187-
188-
---
189-
190-
## Security Best Practices
191-
192-
- **Protect configuration files**: Set appropriate file permissions
193-
- **Use environment variables** when possible instead of hardcoding tokens
194-
- **Limit PAT scope** to only necessary permissions
195-
- **Regularly rotate** your GitHub Personal Access Tokens
196-
- **Never commit** configuration files containing tokens to version control
135+
**Authentication Failed:**
136+
- Verify PAT has `repo` scope
137+
- Check token hasn't expired
138+
139+
**Remote Server:**
140+
- Verify URL: `https://api.githubcopilot.com/mcp`
141+
142+
**Docker Issues (Local Only):**
143+
- Ensure Docker Desktop is running
144+
- Try: `docker pull ghcr.io/github/github-mcp-server`
145+
- If pull fails: `docker logout ghcr.io` then retry
146+
147+
**Server Not Starting / Tools Not Showing:**
148+
- Run `claude mcp list` to view currently configured MCP servers
149+
- Validate JSON syntax
150+
- If using an environment variable to store your PAT, make sure you're properly sourcing your PAT using the environment variable
151+
- Restart Claude Code and check `/mcp` command
152+
- Delete the GitHub server by running `claude mcp remove github` and repeating the setup process with a different method
153+
- Make sure you're running Claude Code within the project you're currently working on to ensure the MCP configuration is properly scoped to your project
154+
- Check logs:
155+
- Claude Code: Use `/mcp` command
156+
- Claude Desktop: `ls ~/Library/Logs/Claude/` and `cat ~/Library/Logs/Claude/mcp-server-*.log` (macOS) or `%APPDATA%\Claude\logs\` (Windows)
197157

198158
---
199159

200-
## Additional Resources
160+
## Important Notes
201161

202-
- [Model Context Protocol Documentation](https://modelcontextprotocol.io)
203-
- [Claude Code MCP Documentation](https://docs.anthropic.com/en/docs/claude-code/mcp)
204-
- [Claude Web Integrations Support](https://support.anthropic.com/en/articles/11175166-about-custom-integrations-using-remote-mcp)
162+
- The npm package `@modelcontextprotocol/server-github` is deprecated as of April 2025
163+
- Remote server requires Streamable HTTP support (check your Claude version)
164+
- Configuration scopes for Claude Code:
165+
- `-s user`: Available across all projects
166+
- `-s project`: Shared via `.mcp.json` file
167+
- Default: `local` (current project only)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy