GitHub MCP Server: Issues, PRs & Code with AI
What it is: GitHub's own MCP server (github/github-mcp-server, written in Go), which superseded the earlier community/reference TypeScript implementation. It covers repos, issues, pull requests, actions runs, and code search, authenticated with a GitHub personal access token or, for Copilot-enabled orgs, GitHub's own hosted remote MCP endpoint that needs no local process at all.
Quick answer: Easiest is a fine-grained personal access token plus the Docker image: docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server. Scope the token to specific repos with read-only permissions to start — a token with broad write access to every repo you can touch is more blast radius than almost any task needs.
Why it matters for data work
Data work lives next to code more than people admit — the dbt model that changed, the pipeline PR that broke a dashboard, the issue where someone reported a metric discrepancy. An agent with GitHub access can trace "why did this number change" back through actual commits and PR descriptions instead of you doing archaeology across two tools by hand.
Install & configure
Three ways to run it, in order of setup effort: GitHub's remote hosted server (zero local install, org-level Copilot auth), the local Docker image, or the local Go binary. Docker is the most portable:
# Claude Code, local Docker image
claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=<token> -- \
docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
// Claude Desktop / Cursor config
{
"mcpServers": {
"github": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"],
"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "<token>" }
}
}
}
Generate a fine-grained personal access token (Settings → Developer settings → Personal access tokens → Fine-grained), scoped to specific repositories rather than "all repositories," with only the permission categories you need (Issues, Pull requests, Contents) rather than accepting the defaults.
Local binary, Docker, or GitHub's remote hosted server?
The remote option (a hosted MCP endpoint GitHub runs, available to Copilot-enabled accounts/orgs) needs no local process, credential file, or Docker daemon — auth flows through your existing GitHub/Copilot login. It's the lowest-friction choice if your org already has Copilot. The local Docker or binary options give you a specific personal access token you control directly rather than relying on org-level Copilot permissions, which matters if you want the agent's GitHub reach scoped tighter than what Copilot grants by default, or if Copilot isn't licensed for your account at all.
How do I keep it safe?
The server exposes write-capable tools by default (creating issues, pushing commits, merging PRs) if the token allows it — this is not a read-only-by-default design like the reference Postgres server. Use a fine-grained token scoped to specific repos and the minimum permission set, review any PR or issue an agent creates before treating it as final, and never point a write-capable GitHub agent at a repo where it might process untrusted content (an issue filed by an external user, a PR from a fork) without assuming that content could contain instructions aimed at the model, not you.
Troubleshooting
Frequent issues when setting this up:
- 403 / Resource not accessible: the fine-grained token wasn't granted the specific permission category (e.g., Pull requests: Read) the tool call needs.
- Repo not visible to the agent: fine-grained tokens are scoped per-repo at creation — add the repo to the token's access list.
- Docker: command not found / daemon not running: install Docker Desktop (or the CLI) and make sure the daemon is actually running before the client tries to launch the server.
- Rate limited: authenticated REST/GraphQL calls share GitHub's standard per-hour rate limits — heavy agent use on a busy repo can hit them.
Author & links
Author: GitHub (official)
Repo: github.com/github/github-mcp-server
License: MIT
Related skills
For local repo files without going through the GitHub API, see the Filesystem MCP server. For pulling in web pages linked from an issue or PR, see the Fetch MCP server. For team discussion context, see the Slack MCP server.
← Back to MCP Servers