> mcp integration
GitHub MCP Server: What It Does & How to Use It with Claude
What the GitHub MCP server can do — read repos, manage issues and PRs, inspect Actions, surface security alerts — and how to connect it to Claude.
The GitHub MCP server lets an AI assistant work directly inside your repositories: reading code, searching files, filing and triaging issues, reviewing pull requests, and inspecting GitHub Actions runs through natural language. GitHub maintains it officially, and it connects to any MCP client, including Claude Cowork, Claude Code, and Claude Desktop.
What can the GitHub MCP server do?
Capabilities are grouped into toolsets you can enable or disable. These are the ones GitHub ships in the official server.
| Toolset | What it enables |
|---|---|
| context | User profile and operating environment, recommended so the assistant knows who and where it is |
| repos | Browse and search code, read files, list commits, and manage branches and releases without a local clone |
| issues | Create, update, comment on, and triage issues |
| pull_requests | Open, review, comment on, and merge pull requests |
| actions | Inspect GitHub Actions workflows, fetch run logs, and re-run failed jobs |
| code_security | Surface code scanning alerts and security findings |
| dependabot | Read dependency vulnerability alerts |
| secret_protection | Review secret-scanning results |
| discussions / labels / projects / orgs / notifications / gists / users | Manage discussions, labels, project boards, org data, notifications, gists, and user lookups |
Default toolsets (when none are specified) are context, repos, issues, pull_requests, and users. There are roughly twenty toolsets in total. Enable only what a given task needs.
Which server is official, and do you need a community fork?
- Official (
github/github-mcp-server): built and maintained by GitHub, open source under MIT. It is the right default. It ships as a hosted remote server and as a local Docker image or Go binary, with content sanitization against prompt injection enabled by default. - Community servers: older third-party GitHub MCP servers exist from before the official one shipped. They predate GitHub’s release and are now largely redundant. Stick with the official server unless you have a specific reason not to.
How do you connect it to Claude (Cowork / Code / Desktop)?
The fastest path is the remote server, with no install required.
- Use the remote URL. Point your MCP client at
https://api.githubcopilot.com/mcp/(type:http). - Authenticate. On hosts that support it, sign-in opens in a browser. Otherwise pass a GitHub personal access token in the
Authorizationheader. In Claude Cowork, add it as a connector; in Claude Code,claude mcp addthe HTTP endpoint; in Claude Desktop, add it under MCP servers in settings. - Scope it down. Enable only the toolsets you need with the
X-MCP-Toolsetsheader (e.g.repos,issues,pull_requests) and start read-only withX-MCP-Readonly.
Prefer to self-host? Run the Docker image (ghcr.io/github/github-mcp-server) with a GITHUB_PERSONAL_ACCESS_TOKEN and the same --read-only / --toolsets flags.
How we use it: Good for repo-aware Q&A (“where is auth handled in this service?”), drafting issue triage, and reading Actions logs to explain a failing build. Bad for autonomous merging across many repos, so keep a human in the loop on writes. One real gotcha: loading every default toolset floods the context window, so we explicitly pass
X-MCP-Toolsetsand trim to the three to ten tools a task actually needs.
How do you keep it secure?
Token scopes decide everything. Start with a read-only token (or X-MCP-Readonly) and the minimum scopes (repo, read:org, read:user), then add write or security_events only when a workflow truly needs it. For public-repo exposure, lockdown mode surfaces content only from users with push access, and content sanitization against prompt injection is on by default.
Wiring GitHub into your stack
A GitHub-connected assistant is most useful when it sits next to the rest of your data: your database, your task tracker, your docs. We help teams wire MCP servers like this into Claude with sane scopes, read-only defaults, and a clear audit trail. If you want a hand getting it production-ready, Book a discovery call.
Sources: official repo · remote server docs · GitHub Docs: set up the MCP server · GitHub Blog: practical guide