- Notifications
You must be signed in to change notification settings - Fork1.4k
Bot#700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
Ferdy2826 wants to merge3 commits intogithub:dependabot/go_modules/github.com/migueleliasweb/go-github-mock-1.4.0Choose a base branch fromFerdy2826:main
base:dependabot/go_modules/github.com/migueleliasweb/go-github-mock-1.4.0
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
+1,340 −249
Open
Bot#700
Changes fromall commits
Commits
Show all changes
3 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# GitHub MCP Server Installation Guides | ||
This directory contains detailed installation instructions for the GitHub MCP Server across different host applications and IDEs. Choose the guide that matches your development environment. | ||
## Installation Guides by Host Application | ||
- **[GitHub Copilot in other IDEs](install-other-copilot-ides.md)** - Installation for JetBrains, Visual Studio, Eclipse, and Xcode with GitHub Copilot | ||
- **[Claude Applications](install-claude.md)** - Installation guide for Claude Web, Claude Desktop and Claude Code CLI | ||
- **[Cursor](install-cursor.md)** - Installation guide for Cursor IDE | ||
- **[Windsurf](install-windsurf.md)** - Installation guide for Windsurf IDE | ||
## Support by Host Application | ||
| Host Application | Local GitHub MCP Support | Remote GitHub MCP Support | Prerequisites | Difficulty | | ||
|-----------------|---------------|----------------|---------------|------------| | ||
| Copilot in VS Code | ✅ | ✅ Full (OAuth + PAT) | Local: Docker or Go build, GitHub PAT<br>Remote: VS Code 1.101+ | Easy | | ||
| Copilot Coding Agent | ✅ | ✅ Full (on by default; no auth needed) | Any _paid_ copilot license | Default on | | ||
| Copilot in Visual Studio | ✅ | ✅ PAT + ❌ No OAuth | Local: Docker or Go build, GitHub PAT<br>Remote: Visual Studio 17.14+ | Easy | | ||
| Copilot in JetBrains | ✅ | ✅ PAT + ❌ No OAuth | Local: Docker or Go build, GitHub PAT<br>Remote: JetBrains Copilot Extension v1.5.35+ | Easy | | ||
| Claude Code | ✅ | ✅ PAT + ❌ No OAuth| GitHub MCP Server binary or remote URL, GitHub PAT | Easy | | ||
| Claude Desktop | ✅ | ✅ PAT + ❌ No OAuth | Docker or Go build, GitHub PAT | Moderate | | ||
| Cursor | ✅ | ✅ PAT + ❌ No OAuth | Docker or Go build, GitHub PAT | Easy | | ||
| Windsurf | ✅ | ✅ PAT + ❌ No OAuth | Docker or Go build, GitHub PAT | Easy | | ||
| Copilot in Xcode | ✅ | ✅ PAT + ❌ No OAuth | Local: Docker or Go build, GitHub PAT<br>Remote: Copilot for Xcode latest version | Easy | | ||
| Copilot in Eclipse | ✅ | ✅ PAT + ❌ No OAuth | Local: Docker or Go build, GitHub PAT<br>Remote: TBD | Easy | | ||
**Legend:** | ||
- ✅ = Fully supported | ||
- ❌ = Not yet supported | ||
**Note:** Remote MCP support requires host applications to register a GitHub App or OAuth app for OAuth flow support – even if the new OAuth spec is supported by that host app. Currently, only VS Code has full remote GitHub server support. | ||
## Installation Methods | ||
The GitHub MCP Server can be installed using several methods. **Docker is the most popular and recommended approach** for most users, but alternatives are available depending on your needs: | ||
### 🐳 Docker (Most Common & Recommended) | ||
- **Pros**: No local build required, consistent environment, easy updates, works across all platforms | ||
- **Cons**: Requires Docker installed and running | ||
- **Best for**: Most users, especially those already using Docker or wanting the simplest setup | ||
- **Used by**: Claude Desktop, Copilot in VS Code, Cursor, Windsurf, etc. | ||
### 📦 Pre-built Binary (Lightweight Alternative) | ||
- **Pros**: No Docker required, direct execution via stdio, minimal setup | ||
- **Cons**: Need to manually download and manage updates, platform-specific binaries | ||
- **Best for**: Minimal environments, users who prefer not to use Docker | ||
- **Used by**: Claude Code CLI, lightweight setups | ||
### 🔨 Build from Source (Advanced Users) | ||
- **Pros**: Latest features, full customization, no external dependencies | ||
- **Cons**: Requires Go development environment, more complex setup | ||
- **Prerequisites**: [Go 1.24+](https://go.dev/doc/install) | ||
- **Build command**: `go build -o github-mcp-server cmd/github-mcp-server/main.go` | ||
- **Best for**: Developers who want the latest features or need custom modifications | ||
### Important Notes on the GitHub MCP Server | ||
- **Docker Image**: The official Docker image is now `ghcr.io/github/github-mcp-server` | ||
- **npm Package**: The npm package @modelcontextprotocol/server-github is no longer supported as of April 2025 | ||
- **Remote Server**: The remote server URL is `https://api.githubcopilot.com/mcp/` | ||
## General Prerequisites | ||
All installations with Personal Access Tokens (PAT) require: | ||
- **GitHub Personal Access Token (PAT)**: [Create one here](https://github.com/settings/personal-access-tokens/new) | ||
Optional (depending on installation method): | ||
- **Docker** (for Docker-based installations): [Download Docker](https://www.docker.com/) | ||
- **Go 1.24+** (for building from source): [Install Go](https://go.dev/doc/install) | ||
## Security Best Practices | ||
Regardless of which installation method you choose, follow these security guidelines: | ||
1. **Secure Token Storage**: Never commit your GitHub PAT to version control | ||
2. **Limit Token Scope**: Only grant necessary permissions to your GitHub PAT | ||
3. **File Permissions**: Restrict access to configuration files containing tokens | ||
4. **Regular Rotation**: Periodically rotate your GitHub Personal Access Tokens | ||
5. **Environment Variables**: Use environment variables when supported by your host | ||
## Getting Help | ||
If you encounter issues: | ||
1. Check the troubleshooting section in your specific installation guide | ||
2. Verify your GitHub PAT has the required permissions | ||
3. Ensure Docker is running (for local installations) | ||
4. Review your host application's logs for error messages | ||
5. Consult the main [README.md](README.md) for additional configuration options | ||
## Configuration Options | ||
After installation, you may want to explore: | ||
- **Toolsets**: Enable/disable specific GitHub API capabilities | ||
- **Read-Only Mode**: Restrict to read-only operations | ||
- **Dynamic Tool Discovery**: Enable tools on-demand | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
#Install GitHub MCP Server in Claude Applications | ||
This guide covers installation of the GitHub MCP server for Claude Code CLI, Claude Desktop, and Claude Web applications. | ||
##Claude Web (claude.ai) | ||
Claude Web supports remote MCP servers through the Integrations built-in feature. | ||
###Prerequisites | ||
1. Claude Pro, Team, or Enterprise account (Integrations not available on free plan) | ||
2.[GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new) | ||
###Installation | ||
**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. | ||
For other remote MCP servers that do work with Claude Web: | ||
1. Go to[claude.ai](https://claude.ai) and log in | ||
2. Click your profile icon →**Settings** | ||
3. Navigate to**Integrations** section | ||
4. Click**+ Add integration** or**Add More** | ||
5. Enter the remote server URL | ||
6. Follow the OAuth authentication flow when prompted | ||
**Alternative**: Use Claude Desktop or Claude Code CLI for reliable GitHub MCP Server integration. | ||
--- | ||
##Claude Code CLI | ||
Claude Code CLI provides command-line access to Claude with MCP server integration. | ||
###Prerequisites | ||
1. Claude Code CLI installed | ||
2.[GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new) | ||
3.[Docker](https://www.docker.com/) installed and running | ||
###Installation | ||
Run the following command to add the GitHub MCP server using Docker: | ||
```bash | ||
claude mcp add github -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server | ||
``` | ||
Then set the environment variable: | ||
```bash | ||
claude mcp update github -e GITHUB_PERSONAL_ACCESS_TOKEN=your_github_pat | ||
``` | ||
Or as a single command with the token inline: | ||
```bash | ||
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"}}' | ||
``` | ||
**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. | ||
###Configuration Options | ||
- Use`-s user` to add the server to your user configuration (available across all projects) | ||
- Use`-s project` to add the server to project-specific configuration (shared via`.mcp.json`) | ||
- Default scope is`local` (available only to you in the current project) | ||
###Verification | ||
Run the following command to verify the installation: | ||
```bash | ||
claude mcp list | ||
``` | ||
--- | ||
##Claude Desktop | ||
Claude Desktop provides a graphical interface for interacting with the GitHub MCP Server. | ||
###Prerequisites | ||
1. Claude Desktop installed | ||
2.[GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new) | ||
3.[Docker](https://www.docker.com/) installed and running | ||
###Configuration File Location | ||
-**macOS**:`~/Library/Application Support/Claude/claude_desktop_config.json` | ||
-**Windows**:`%APPDATA%\Claude\claude_desktop_config.json` | ||
-**Linux**:`~/.config/Claude/claude_desktop_config.json` (unofficial support) | ||
###Installation | ||
Add the following to your`claude_desktop_config.json`: | ||
```json | ||
{ | ||
"mcpServers": { | ||
"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" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
**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. | ||
###Using Environment Variables | ||
Claude Desktop supports environment variable references. You can use: | ||
```json | ||
{ | ||
"mcpServers": { | ||
"github": { | ||
"command":"docker", | ||
"args": [ | ||
"run", | ||
"-i", | ||
"--rm", | ||
"-e", | ||
"GITHUB_PERSONAL_ACCESS_TOKEN", | ||
"ghcr.io/github/github-mcp-server" | ||
], | ||
"env": { | ||
"GITHUB_PERSONAL_ACCESS_TOKEN":"$GITHUB_PAT" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
Then set the environment variable in your system before starting Claude Desktop. | ||
###Installation Steps | ||
1. Open Claude Desktop | ||
2. Go to Settings (from the Claude menu) → Developer → Edit Config | ||
3. Add your chosen configuration | ||
4. Save the file | ||
5. Restart Claude Desktop | ||
###Verification | ||
After restarting, you should see: | ||
- An MCP icon in the Claude Desktop interface | ||
- The GitHub server listed as "running" in Developer settings | ||
--- | ||
##Troubleshooting | ||
###Claude Web | ||
- Currently experiencing compatibility issues with the GitHub MCP Server | ||
- Try other remote MCP servers (Atlassian, Zapier, Notion) which work reliably | ||
- Use Claude Desktop or Claude Code CLI as alternatives for GitHub integration | ||
###Claude Code CLI | ||
- Verify the command syntax is correct (note the single quotes around the JSON) | ||
- Ensure Docker is running:`docker --version` | ||
- Use`/mcp` command within Claude Code to check server status | ||
###Claude Desktop | ||
- Check logs at: | ||
-**macOS**:`~/Library/Logs/Claude/` | ||
-**Windows**:`%APPDATA%\Claude\logs\` | ||
- Look for`mcp-server-github.log` for server-specific errors | ||
- Ensure configuration file is valid JSON | ||
- Try running the Docker command manually in terminal to diagnose issues | ||
###Common Issues | ||
-**Invalid JSON**: Validate your configuration at[jsonlint.com](https://jsonlint.com) | ||
-**PAT issues**: Ensure your GitHub PAT has required scopes | ||
-**Docker not found**: Install Docker Desktop and ensure it's running | ||
-**Docker image pull fails**: Try`docker logout ghcr.io` then retry | ||
--- | ||
##Security Best Practices | ||
-**Protect configuration files**: Set appropriate file permissions | ||
-**Use environment variables** when possible instead of hardcoding tokens | ||
-**Limit PAT scope** to only necessary permissions | ||
-**Regularly rotate** your GitHub Personal Access Tokens | ||
-**Never commit** configuration files containing tokens to version control | ||
--- | ||
##Additional Resources | ||
-[Model Context Protocol Documentation](https://modelcontextprotocol.io) | ||
-[Claude Code MCP Documentation](https://docs.anthropic.com/en/docs/claude-code/mcp) | ||
-[Claude Web Integrations Support](https://support.anthropic.com/en/articles/11175166-about-custom-integrations-using-remote-mcp) |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.