You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Verified Claude Code installation steps
- Identified and documented issues with Claude Desktop setup
- Updated installation documentation based on testing
# Install GitHub MCP Server in Claude Applications
2
2
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.
8
-
9
-
### Prerequisites
10
-
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
26
-
27
-
**Alternative**: Use Claude Desktop or Claude Code CLI for reliable GitHub MCP Server integration.
28
-
29
-
---
30
-
31
3
## Claude Code CLI
32
4
33
-
Claude Code CLI provides command-line access to Claude with MCP server integration.
34
-
35
5
### 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
+
- Claude Code provides the best experience when it's start within the directory for your project – or it may configure MCP in the wrong place, or pull from other project configuration files
36
10
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
11
+
<details>
12
+
<summary><b>Storing Your PAT Securely</b></summary>
13
+
<br>
40
14
41
-
### Installation
15
+
For security, avoid hardcoding your token. One common approach:
42
16
43
-
Run the following command to add the GitHub MCP server using Docker:
17
+
1. Store your token in `.env` file
18
+
```
19
+
GITHUB_PAT=your_token_here
20
+
```
44
21
22
+
2. Add to .gitignore
45
23
```bash
46
-
claude mcp add github -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
24
+
echo -e ".env\n.mcp.json">> .gitignore
47
25
```
48
26
49
-
Then set the environment variable:
27
+
</details>
28
+
29
+
### Remote Server Setup (Streamable HTTP)
30
+
31
+
1. Run the following command in the Claude Code CLI
50
32
```bash
51
-
claude mcp update github -e GITHUB_PERSONAL_ACCESS_TOKEN=your_github_pat
3. Run `claude mcp list` to see if the GitHub server is configured
58
42
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.
43
+
### Local Server Setup (Docker required)
60
44
61
-
### Configuration Options
45
+
1. Run the following command in the Claude Code CLI:
46
+
```bash
47
+
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
48
+
```
62
49
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)
3. Run `claude mcp list` to see if the GitHub server is configured
66
56
67
57
### Verification
68
-
69
-
Run the following command to verify the installation:
70
58
```bash
71
59
claude mcp list
60
+
claude mcp get github
72
61
```
73
62
74
63
---
75
64
76
65
## Claude Desktop
77
66
78
-
Claude Desktop provides a graphical interface for interacting with the GitHub MCP Server.
67
+
> ⚠️ **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!
79
68
80
69
### Prerequisites
70
+
- Claude Desktop installed (latest version)
71
+
-[GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new)
72
+
-[Docker](https://www.docker.com/) installed and running
81
73
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
74
+
> **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.
**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.
81
+
### Local Server Setup (Docker)
118
82
119
-
### Using Environment Variables
120
-
121
-
Claude Desktop supports environment variable references. You can use:
83
+
Add this codeblock to your `claude_desktop_config.json`:
122
84
123
85
```json
124
86
{
@@ -134,71 +96,60 @@ Claude Desktop supports environment variable references. You can use:
134
96
"ghcr.io/github/github-mcp-server"
135
97
],
136
98
"env": {
137
-
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT"
99
+
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"
138
100
}
139
101
}
140
102
}
141
103
}
142
104
```
143
105
144
-
Then set the environment variable in your system before starting Claude Desktop.
145
-
146
-
### Installation Steps
147
-
106
+
### Manual Setup Steps
148
107
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
108
+
2. Go to Settings → Developer → Edit Config
109
+
3.Paste the code block above in your configuration file
110
+
4.If you're navigating to the configuration file outside of the app:
- If pull fails: `docker logout ghcr.io` then retry
134
+
135
+
**Server Not Starting / Tools Not Showing:**
136
+
- Run `claude mcp list` to view currently configured MCP servers
137
+
- Validate JSON syntax
138
+
- If using an environment variable to store your PAT, make sure you're properly sourcing your PAT using the environment variable
139
+
- Restart Claude Code and check `/mcp` command
140
+
- Delete the GitHub server by running `claude mcp remove github` and repeating the setup process with a different method
141
+
- 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
142
+
- Check logs:
143
+
- Claude Code: Use `/mcp` command
144
+
- Claude Desktop: `ls ~/Library/Logs/Claude/` and `cat ~/Library/Logs/Claude/mcp-server-*.log` (macOS) or `%APPDATA%\Claude\logs\` (Windows)
0 commit comments