DEV · Dev Tools · Official server
GitHub
GitHub's official MCP server: work with repos, issues, pull requests, Actions and code security from your agent.
- Transport
- Remote HTTP + local stdio
- Status
- Official · GitHub
- Auth method
- OAuth (remote) or Personal Access Token
- Scopes / permissions
- Not documented
- Last verified
- Oct 22, 2026
- Tools listed
- 05
§1What it does
The GitHub MCP Server connects AI tools directly to GitHub's platform, letting agents read repositories and code files, manage issues and pull requests, analyze code, and automate workflows. It is available as a remote server hosted by GitHub or as a local server run via Docker.
§2Setup
{
"servers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/"
}
}
}claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PAT -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-serverSnippets adapted from the official documentation. Check the official page for current options and auth requirements.
§2bWhen you disconnect
- Removed locallyClear the sign-in or remove the server in your MCP client (for example
claude mcp logoutorclaude mcp removein Claude Code, or log out of the server in Cursor). This only deletes the client's copy of the tokens. - Authorization revokedRevoke the grant on GitHub's app-permissions page: GitHub → Settings → Applications → Authorized OAuth Apps ↗. This is what stops the refresh token; clearing the client alone is not enough.
Why both steps: OAuth token refresh in the security checklist.
§3Prompts to try
- “Summarize the open pull requests in my repo that are waiting on review.”
- “Find where the auth middleware is defined in this repository and explain it.”
- “Create an issue describing the bug we just reproduced.”