GitHub MCP
by anthropics
Turn your AI coding agent into a full-powered GitHub collaborator
code Node.js Beginner Self-hostable Verified Featured
β 5.2k stars π¦ 38k/week π
Updated: 1w ago
Description
GitHub MCP bridges the gap between your AI assistant and the platform where your code actually lives. Instead of copy-pasting issue descriptions or manually fetching file contents, your agent can interact with repositories, pull requests, and issues directly through the Model Context Protocol. The result is a workflow where triaging bugs, reviewing code, and managing branches happens conversationally, without ever leaving your editor.
What sets this server apart is the breadth of operations it supports. From searching across repositories and reading file contents to creating branches, pushing commits, and opening pull requests, the entire GitHub collaboration lifecycle is accessible to your AI agent. This is not a read-only integration; your agent can take real action on your behalf, which makes it especially powerful for teams that want to automate repetitive repository maintenance tasks.
Because it uses a personal access token scoped to your permissions, you stay in control of what the agent can do. Start with read-only scopes to explore, then widen access as you build trust in your workflows. The server is lightweight, runs locally via stdio, and requires no infrastructure beyond Node.js and a token.
β Best for
Developers and teams who want their AI agent to interact directly with GitHub repositories, issues, and pull requests
βοΈ Skip if
You only need to read local git history β a simpler git MCP server would suffice
π‘ Use cases
- Triage and label GitHub issues using AI-driven analysis of issue content
- Automate pull request creation from code changes your agent generates
- Search across multiple repositories for code patterns or security vulnerabilities
- Review pull requests by having your agent read diffs and post inline comments
π Pros
- β Covers the full GitHub API surface: repos, issues, PRs, code, branches
- β Official Anthropic project with active maintenance and frequent updates
- β Fine-grained control via GitHub token scopes
- β Works with every major MCP client out of the box
π Cons
- β Requires a GitHub personal access token with appropriate permissions
- β Write operations (push, create PR) need careful scope management to avoid unintended changes
- β No support for GitHub Enterprise Server on-premise instances yet
π§ Exposed tools (15 tools)
| Tool | Category | Description |
|---|---|---|
| create_branch | branches | Create a new branch from a reference |
| get_file_contents | code | Read the contents of a file from a repository |
| push_files | code | Push file changes to a repository branch |
| search_code | code | Search for code across GitHub repositories |
| list_commits | code | List commits on a repository branch |
| list_issues | issues | List issues in a repository with optional filters |
| create_issue | issues | Create a new issue in a repository |
| get_issue_comments | issues | Get all comments on an issue |
| create_issue_comment | issues | Add a comment to an existing issue |
| get_pull_request | pull requests | Get details of a specific pull request |
| list_pull_requests | pull requests | List pull requests in a repository |
| create_pull_request | pull requests | Create a new pull request |
| search_repositories | repositories | Search for GitHub repositories by query |
| get_repository | repositories | Get detailed information about a specific repository |
| fork_repository | repositories | Fork a repository to your account |
β‘ Installation
Prerequisites:
- β’ Node.js v18+
- β’ GitHub personal access token
- β’ API key required
claude mcp add github -- npx @anthropic-ai/github-mcp@latestπ‘ Tips & tricks
Create a dedicated GitHub token with the minimum scopes you need. For read-only
exploration, the `repo:read` and `read:org` scopes are enough. Add `repo` full
access only when you want your agent to push commits or open PRs. Store the token
in your shell profile as GITHUB_TOKEN so every MCP client can pick it up automatically.
Quick info
- Author
- anthropics
- License
- MIT
- Runtime
- Node.js 18+
- Transport
- stdio
- Category
- code
- Difficulty
- Beginner
- Self-hostable
- β
- API key
- API key required
- Docker
- β
- Version
- 0.3.0
- Updated
- Feb 14, 2026
Client compatibility
- β Claude Code
- β Cursor
- β VS Code Copilot
- β Gemini CLI
- β Windsurf
- β Cline
- β JetBrains AI
- β Warp
Platforms
π macOS π§ Linux πͺ Windows