GitHub MCP server: what it is and how to connect it
Updated Oct 26, 2026 · Sources listed at the end
The GitHub MCP Server is GitHub’s official Model Context Protocol server. It lets AI tools read repositories and code, manage issues and pull requests, analyse code and automate workflows through natural language.1
Two ways to run it
- Remote (hosted by GitHub): point an MCP host at
https://api.githubcopilot.com/mcp/. The repository’s examples show an HTTP server entry with anAuthorization: Bearerheader holding a personal access token.1 - Local: run the container image, passing your token as an environment variable:
docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
The server groups tools into toolsets; when none are specified, default toolsets are used.1
Adding it to a coding agent
In Claude Code use claude mcp add --transport http <name> <url> (guide); in Cursor add it to mcp.json (guide).23
Token hygiene
Use a token with the narrowest permissions you need. Anyone who can run your agent can act on GitHub with that token’s rights.
Footnotes
Tools mentioned
- GitHub Copilot: free plan, paid from $10/mo
- Claude Code: paid from $20/mo
- Cursor: free plan, paid from $8/mo