From bdb0cd293dfac188f931e2255494b3b6589645e7 Mon Sep 17 00:00:00 2001 From: Dimitrios Philliou Date: Sat, 19 Jul 2025 03:26:01 -0700 Subject: [PATCH 1/7] Revise Claude installation guide - Verified Claude Code installation steps - Identified and documented issues with Claude Desktop setup - Updated installation documentation based on testing --- docs/installation-guides/install-claude.md | 219 ++++++++------------- 1 file changed, 85 insertions(+), 134 deletions(-) diff --git a/docs/installation-guides/install-claude.md b/docs/installation-guides/install-claude.md index 2c50be2f9..05b9a0432 100644 --- a/docs/installation-guides/install-claude.md +++ b/docs/installation-guides/install-claude.md @@ -1,124 +1,86 @@ # 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 +- Claude Code CLI installed +- [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new) +- For local setup: [Docker](https://www.docker.com/) installed and running +- 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 -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 +
+Storing Your PAT Securely +
-### Installation +For security, avoid hardcoding your token. One common approach: -Run the following command to add the GitHub MCP server using Docker: +1. Store your token in `.env` file +``` +GITHUB_PAT=your_token_here +``` +2. Add to .gitignore ```bash -claude mcp add github -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server +echo -e ".env\n.mcp.json" >> .gitignore ``` -Then set the environment variable: +
+ +### Remote Server Setup (Streamable HTTP) + +1. Run the following command in the Claude Code CLI ```bash -claude mcp update github -e GITHUB_PERSONAL_ACCESS_TOKEN=your_github_pat +claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer YOUR_GITHUB_PAT ``` -Or as a single command with the token inline: +With an environment variable: ```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"}}' +claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer $(grep GITHUB_PAT .env | cut -d '=' -f2) ``` +2. Restart Claude Code +3. Run `claude mcp list` to see if the GitHub server is configured -**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. +### Local Server Setup (Docker required) -### Configuration Options +1. Run the following command in the Claude Code CLI: +```bash +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 +``` -- 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) +With an environment variable: +```bash +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 +``` +2. Restart Claude Code +3. Run `claude mcp list` to see if the GitHub server is configured ### Verification - -Run the following command to verify the installation: ```bash claude mcp list +claude mcp get github ``` --- ## Claude Desktop -Claude Desktop provides a graphical interface for interacting with the GitHub MCP Server. +> ⚠️ **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! ### Prerequisites +- Claude Desktop installed (latest version) +- [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new) +- [Docker](https://www.docker.com/) installed and running -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 +> **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. ### 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" - } - } - } -} -``` +- **Linux**: `~/.config/Claude/claude_desktop_config.json` -**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. +### Local Server Setup (Docker) -### Using Environment Variables - -Claude Desktop supports environment variable references. You can use: +Add this codeblock to your `claude_desktop_config.json`: ```json { @@ -134,71 +96,60 @@ Claude Desktop supports environment variable references. You can use: "ghcr.io/github/github-mcp-server" ], "env": { - "GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT" + "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT" } } } } ``` -Then set the environment variable in your system before starting Claude Desktop. - -### Installation Steps - +### Manual Setup 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 +2. Go to Settings → Developer → Edit Config +3. Paste the code block above in your configuration file +4. If you're navigating to the configuration file outside of the app: + - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` + - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json` +5. Open the file in a text editor +6. Paste one of the code blocks above, based on your chosen configuration (remote or local) +7. Replace `YOUR_GITHUB_PAT` with your actual token or $GITHUB_PAT environment variable +8. Save the file +9. Restart Claude Desktop --- ## 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 +**Authentication Failed:** +- Verify PAT has `repo` scope +- Check token hasn't expired + +**Remote Server:** +- Verify URL: `https://api.githubcopilot.com/mcp/` + +**Docker Issues (Local Only):** +- Ensure Docker Desktop is running +- Try: `docker pull ghcr.io/github/github-mcp-server` +- If pull fails: `docker logout ghcr.io` then retry + +**Server Not Starting / Tools Not Showing:** +- Run `claude mcp list` to view currently configured MCP servers +- Validate JSON syntax +- If using an environment variable to store your PAT, make sure you're properly sourcing your PAT using the environment variable +- Restart Claude Code and check `/mcp` command +- Delete the GitHub server by running `claude mcp remove github` and repeating the setup process with a different method +- 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 +- Check logs: + - Claude Code: Use `/mcp` command + - Claude Desktop: `ls ~/Library/Logs/Claude/` and `cat ~/Library/Logs/Claude/mcp-server-*.log` (macOS) or `%APPDATA%\Claude\logs\` (Windows) --- -## Additional Resources +## Important Notes -- [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) +- The npm package `@modelcontextprotocol/server-github` is deprecated as of April 2025 +- Remote server requires Streamable HTTP support (check your Claude version) +- Configuration scopes for Claude Code: + - `-s user`: Available across all projects + - `-s project`: Shared via `.mcp.json` file + - Default: `local` (current project only) From 472fc2036f3cb62b99dd485d1f8f7f0df12a1d5e Mon Sep 17 00:00:00 2001 From: Dimitrios Philliou Date: Sat, 19 Jul 2025 03:30:13 -0700 Subject: [PATCH 2/7] Revise instructions for opening Claude Code Updated recommendations for opening Claude Code. --- docs/installation-guides/install-claude.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation-guides/install-claude.md b/docs/installation-guides/install-claude.md index 05b9a0432..2d020858d 100644 --- a/docs/installation-guides/install-claude.md +++ b/docs/installation-guides/install-claude.md @@ -6,7 +6,7 @@ - Claude Code CLI installed - [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new) - For local setup: [Docker](https://www.docker.com/) installed and running -- 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 +- Open Claude Code inside the directory for your project (recommended for best experience and clear scope of configuration)
Storing Your PAT Securely From c2e647e62002fbdf02ff52326c019db146c461f5 Mon Sep 17 00:00:00 2001 From: Dimitrios Philliou Date: Sat, 19 Jul 2025 03:35:43 -0700 Subject: [PATCH 3/7] Update docs/installation-guides/install-claude.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/installation-guides/install-claude.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation-guides/install-claude.md b/docs/installation-guides/install-claude.md index 2d020858d..abfd8f8c3 100644 --- a/docs/installation-guides/install-claude.md +++ b/docs/installation-guides/install-claude.md @@ -125,7 +125,7 @@ Add this codeblock to your `claude_desktop_config.json`: - Check token hasn't expired **Remote Server:** -- Verify URL: `https://api.githubcopilot.com/mcp/` +- Verify URL: `https://api.githubcopilot.com/mcp` **Docker Issues (Local Only):** - Ensure Docker Desktop is running From a7f00cf3838495fe3545063f50daf06a31803c07 Mon Sep 17 00:00:00 2001 From: Dimitrios Philliou Date: Sat, 19 Jul 2025 03:35:58 -0700 Subject: [PATCH 4/7] Update docs/installation-guides/install-claude.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/installation-guides/install-claude.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation-guides/install-claude.md b/docs/installation-guides/install-claude.md index abfd8f8c3..0d0d3bc37 100644 --- a/docs/installation-guides/install-claude.md +++ b/docs/installation-guides/install-claude.md @@ -30,7 +30,7 @@ echo -e ".env\n.mcp.json" >> .gitignore 1. Run the following command in the Claude Code CLI ```bash -claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer YOUR_GITHUB_PAT +claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer YOUR_GITHUB_PAT" ``` With an environment variable: From 716ea7f72087b680ee93e777348e7f3e52e18962 Mon Sep 17 00:00:00 2001 From: Dimitrios Philliou Date: Sat, 19 Jul 2025 03:46:31 -0700 Subject: [PATCH 5/7] Update installation guide for Claude setup Added installation option for using Claude Code using a release binary. --- docs/installation-guides/install-claude.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/installation-guides/install-claude.md b/docs/installation-guides/install-claude.md index 0d0d3bc37..f4d8e8501 100644 --- a/docs/installation-guides/install-claude.md +++ b/docs/installation-guides/install-claude.md @@ -42,6 +42,7 @@ claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Aut ### Local Server Setup (Docker required) +### With Docker 1. Run the following command in the Claude Code CLI: ```bash 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 @@ -54,6 +55,17 @@ claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=$(grep GITHUB_PAT .env | c 2. Restart Claude Code 3. Run `claude mcp list` to see if the GitHub server is configured +### With a Go Binary (without Docker) + +1. Download [release binary](https://github.com/github/github-mcp-server/releases) +2. Add to your `PATH` +3. Run: +```bash +claude mcp add-json github '{"command": "github-mcp-server", "args": ["stdio"], "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"}}' +``` +2. Restart Claude Code +3. Run `claude mcp list` to see if the GitHub server is configured + ### Verification ```bash claude mcp list From 6303a347c3b362d97033929ffbfbcfab03823444 Mon Sep 17 00:00:00 2001 From: Dimitrios Philliou Date: Sat, 19 Jul 2025 03:48:27 -0700 Subject: [PATCH 6/7] Change section title for Go Binary installation Updated section title for clarity regarding installation without Docker. --- docs/installation-guides/install-claude.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation-guides/install-claude.md b/docs/installation-guides/install-claude.md index f4d8e8501..8e6c14a6e 100644 --- a/docs/installation-guides/install-claude.md +++ b/docs/installation-guides/install-claude.md @@ -55,7 +55,7 @@ claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=$(grep GITHUB_PAT .env | c 2. Restart Claude Code 3. Run `claude mcp list` to see if the GitHub server is configured -### With a Go Binary (without Docker) +### With a Binary (no Docker) 1. Download [release binary](https://github.com/github/github-mcp-server/releases) 2. Add to your `PATH` From f8a2797882171e02201b503251e38ad1de318ba3 Mon Sep 17 00:00:00 2001 From: LuluBeatson Date: Mon, 21 Jul 2025 10:54:40 +0100 Subject: [PATCH 7/7] Close double quote in bash command --- docs/installation-guides/install-claude.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation-guides/install-claude.md b/docs/installation-guides/install-claude.md index 8e6c14a6e..1a5b789f4 100644 --- a/docs/installation-guides/install-claude.md +++ b/docs/installation-guides/install-claude.md @@ -35,7 +35,7 @@ claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Aut With an environment variable: ```bash -claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer $(grep GITHUB_PAT .env | cut -d '=' -f2) +claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer $(grep GITHUB_PAT .env | cut -d '=' -f2)" ``` 2. Restart Claude Code 3. Run `claude mcp list` to see if the GitHub server is configured 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