Github MCP Server
GitHub's official MCP server — repos, issues, PRs, Actions, and security data for your agent, as a free hosted remote or a local Docker server.
GitHub's official MCP server gives agents the full GitHub surface — repositories, issues, pull requests, Actions, code and secret scanning, Dependabot, discussions, projects — organized into toolsets you can enable selectively, each with a read-only variant. Use the hosted remote at api.githubcopilot.com/mcp with a PAT or OAuth, or run it locally via Docker.
The GitHub MCP Server is GitHub's official bridge between agents and everything on github.com — and the most consequential MCP server for day-to-day development work. Issues become readable context, PRs become something the agent can review and update, Actions logs become debuggable, and security findings become fixable, all without leaving the session.
Highlights
- Seventeen toolsets, enabled selectively —
repos,issues,pull_requests,actions,code_security,secret_protection,dependabot,discussions,projects, and more. Mount only what the task needs. - Read-only variants — every toolset has one (append
/readonlyto the hosted URL); the right default for review-and-triage agents. - Hosted or local — the free hosted remote at
api.githubcopilot.com/mcp(OAuth 2.1 or PAT), or the same MIT server self-hosted via Docker, including GitHub Enterprise support. - Per-toolset URLs —
…/mcp/x/issuesexposes just the issues toolset; clean composition for narrowly-scoped agents. - Copilot handoff — the remote-only
create_pull_request_with_copilottool delegates a task to the Copilot coding agent (Copilot subscription required).
In an AI-assisted workflow
claude mcp add --transport http github https://api.githubcopilot.com/mcp \
-H "Authorization: Bearer YOUR_GITHUB_PAT"
# then:
# > Triage the open issues labeled "bug", reproduce the top one, and draft a fix PRThe agent reads the issue thread, checks related PRs and CI runs, and works the task with real project state instead of your paraphrase of it.
WARNING
The server can do whatever your token can. Use a fine-grained PAT scoped to the repos and permissions the agent actually needs (the docs' minimum: repo, read:packages, read:org), and prefer read-only toolsets for agents that shouldn't write. Then mirror those limits in Claude Code's own permission rules — mcp__github__* deny rules are your second fence.
Good to know
MIT-licensed, ~30k GitHub stars, and actively developed by GitHub itself — the hosted remote went GA in late 2025 with OAuth 2.1 + PKCE. One Windows-specific gotcha from GitHub's own install guide: if claude mcp add-json fails with "Invalid input", use the --transport http form shown above instead. For driving GitHub from CI rather than a session, the same plumbing powers the Claude Code GitHub Action.
Frequently asked questions
- How do I add the GitHub MCP server to Claude Code?
- Hosted remote with a PAT: claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer YOUR_GITHUB_PAT". Locally instead: claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=YOUR_PAT -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server.
- What can the GitHub MCP server do?
- Seventeen toolsets cover most of GitHub: repos, issues, pull_requests, actions, code_security, secret_protection, dependabot, discussions, gists, git, labels, notifications, orgs, projects, and more. You scope what's exposed by enabling toolsets per URL or env var, and any toolset can be mounted read-only.
- Do I need a Copilot subscription to use it?
- No — the server is MIT-licensed and the hosted remote is free with a GitHub account and a PAT. The one exception is the remote-only create_pull_request_with_copilot tool, which delegates work to the Copilot coding agent and requires a Copilot plan.
Related
- The Best MCP Servers in 2026The MCP servers actually worth connecting in 2026 — Context7, GitHub, Chrome DevTools, Playwright, Serena, Exa, Firecrawl, and the best official vendor servers, by use case.
- Adding MCP Servers to Claude Code: Local, Remote, and Project-ScopedThe complete claude mcp add reference — stdio vs HTTP transports, local/project/user scopes, .mcp.json with env expansion, OAuth via /mcp, and the gotchas.
- Git Github ExpertUse this agent for Git and GitHub workflows — rebases, conflict resolution, history surgery, PRs, and Actions. Examples — resolving a messy merge, rewriting history safely, fixing a workflow file.
- Create PRPush the current branch and open a GitHub pull request with a generated title and body.
- Review PRReview a pull request for correctness, security, and style, and summarize findings.
- Running Claude Code in CI: Headless Mode & GitHub ActionsClaude Code without the terminal — claude -p flags, JSON and structured output, safe permission scoping, and the official GitHub Action responding to @claude.
- Linear MCPLinear's hosted MCP server — find, create, and update issues, projects, and comments from your AI agent, with OAuth and one-command setup.