GitHub MCP Server

31.1k · GitHub →

GitHub's official MCP server — repos, issues, PRs, Actions, and security data as agent tools.

What is GitHub MCP Server?

The GitHub MCP Server is GitHub's official way to let agents operate on the platform itself, not just on a local clone. It exposes the GitHub API as MCP toolsets — repos, issues, pull_requests, actions, code_security, discussions, dependabot, notifications, projects, and more — so an agent can triage issues, review and merge PRs, read CI logs, and chase security alerts through natural language.

It ships in two forms. The hosted remote server at api.githubcopilot.com/mcp/ needs zero local infrastructure and authenticates via browser OAuth. The local form runs as a Docker container or Go binary with a personal access token, which is what you want for GitHub Enterprise Server or when you need to pin exactly which credentials the agent holds.

The toolset system is the part worth learning. Enabling everything floods the model with tool definitions and measurably degrades tool selection; the server defaults to a core set (context, repos, issues, pull_requests, users) and lets you enable toolsets — or individual tools — explicitly, plus a read-only mode that strips every write operation. Scoping tightly is both a quality and a safety win.

Key capabilities

  • Modular toolsets — repos, issues, PRs, Actions, code security, Dependabot, discussions, projects — enabled per need
  • Hosted remote server with OAuth (no infrastructure) or local Docker/Go binary with a PAT
  • Read-only mode that disables every write tool across all toolsets
  • Fine-grained control: enable whole toolsets or individual tools, with dynamic tool discovery
  • Works with GitHub Enterprise Server and ghe.com via local deployment

When to use it

Pick the GitHub MCP Server when your agent's job extends beyond the working tree into the platform: issue triage, PR review workflows, reading Actions logs to diagnose CI failures, or auditing security alerts across repos. If the agent only needs git operations on a local clone, skip it — Claude Code and most coding agents already drive git and the gh CLI directly, with less setup and no extra token surface. Also think twice before enabling write toolsets with a broad PAT; start read-only and widen deliberately.

Alternatives

Frequently asked questions

How do I connect Claude Code to the GitHub MCP server?

The quickest path is the hosted remote server: add https://api.githubcopilot.com/mcp/ as a remote MCP server and complete the browser OAuth flow — no Docker, no token management. For Enterprise Server or credential pinning, run the Docker image ghcr.io/github/github-mcp-server locally with GITHUB_PERSONAL_ACCESS_TOKEN set, and scope the PAT to the minimum permissions the task needs.

What is the difference between the remote and local GitHub MCP server?

The remote server is hosted by GitHub at api.githubcopilot.com/mcp/, authenticates via OAuth, and requires nothing installed. The local server is a Docker container or Go binary you run yourself with a personal access token — required for GitHub Enterprise Server, and preferable when you want explicit control over credentials, toolsets, and read-only enforcement.

Can I restrict the GitHub MCP server to read-only access?

Yes, two complementary ways. A read-only flag disables every write tool across all toolsets, so the agent can browse repos, issues, and PRs but change nothing. Independently, you can scope which toolsets load at all (e.g. only repos and issues) and, for local deployments, pair that with a fine-grained PAT that lacks write permissions.

Star count updated 2026-07-02 · refreshed weekly from the GitHub API · browse all tools →