Creativity · MCP — server
MCP GitHub Server
The MCP GitHub Server is the reference Model Context Protocol server for github.com. It exposes repository, issue, pull request, and workflow APIs as MCP tools so an LLM client like Claude Desktop or Cursor can read code, file issues, and review PRs on your behalf — authenticated with a GitHub PAT or fine-scoped GitHub App installation token.
MCP facts
- Kind
- server
- Ecosystem
- anthropic-mcp
- Language
- TypeScript / Node.js
- Transports
- stdio, http
Capabilities
- Tools: search_repositories, get_file_contents, create_or_update_file, create_issue, create_pull_request, merge_pull_request
- Resources: repo://owner/name tree and file contents at a given ref
- Actions: list and re-run workflow runs, read job logs
- Auth: Personal Access Token or GitHub App installation token via env var
Install
npx -y @modelcontextprotocol/server-github Configuration
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxx"
}
}
}
} Frequently asked questions
What can the MCP GitHub server do?
It exposes the GitHub REST and GraphQL APIs as MCP tools — search code, read files at a ref, create or comment on issues, open and merge PRs, and inspect GitHub Actions workflow runs — all driven by a Claude or Cursor agent.
How do I authenticate the MCP GitHub server?
Set GITHUB_PERSONAL_ACCESS_TOKEN in the server's env block. For org-wide use prefer a fine-grained PAT or a GitHub App installation token with the minimum scopes required (repo:read, issues:write, pull_requests:write, etc.).
Can the MCP GitHub server push to main or merge PRs?
Yes, but only if the token has write access. Use branch protection rules and required reviews so an agent cannot bypass CI — and prefer a scoped token that can push to feature branches but not protected branches.
Is there a hosted version of the GitHub MCP server?
GitHub ships a first-party hosted MCP endpoint over HTTP with OAuth, so you do not have to run the stdio server locally. Most developers still run the npx version for local agents in Claude Desktop.
Sources
- modelcontextprotocol/servers — github — accessed 2026-04-20
- GitHub MCP Server (official) — accessed 2026-04-20
- Model Context Protocol spec — accessed 2026-04-20