claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer YOUR_GITHUB_PAT"
With an environment variable:
claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer $(grep GITHUB_PAT .env | cut -d '=' -f2)"
claude mcp list to see if the GitHub server is configuredclaude 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
With an environment variable:
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
claude mcp list to see if the GitHub server is configuredPATHclaude mcp add-json github '{"command": "github-mcp-server", "args": ["stdio"], "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"}}'
claude mcp list to see if the GitHub server is configuredclaude mcp list
claude mcp get github
⚠️ 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!
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.
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonAdd this codeblock to your claude_desktop_config.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"
}
}
}
}
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonYOUR_GITHUB_PAT with your actual token or $GITHUB_PAT environment variableAuthentication Failed:
repo scopeRemote Server:
https://api.githubcopilot.com/mcpDocker Issues (Local Only):
docker pull ghcr.io/github/github-mcp-serverdocker logout ghcr.io then retryServer Not Starting / Tools Not Showing:
claude mcp list to view currently configured MCP servers/mcp commandclaude mcp remove github and repeating the setup process with a different method/mcp commandls ~/Library/Logs/Claude/ and cat ~/Library/Logs/Claude/mcp-server-*.log (macOS) or %APPDATA%\Claude\logs\ (Windows)@modelcontextprotocol/server-github is deprecated as of April 2025-s user: Available across all projects-s project: Shared via .mcp.json filelocal (current project only)