GitHub
GitHub MCP Server
Access GitHub repositories, issues, pull requests, and code search directly from your AI coding assistant.
Last reviewed Mar 2, 2026
Install
claude mcp add github --transport stdio -- npx -y @modelcontextprotocol/server-githubEnvironment variables required:
GITHUB_PERSONAL_ACCESS_TOKEN=your-github-patAvailable tools
| Tool | Description |
|---|---|
| get_file_contents | Read file contents from a repository |
| search_code | Search for code across GitHub repositories |
| search_repositories | Find repositories matching search criteria |
| create_pull_request | Open a new pull request on a repository |
| create_issue | Create a new issue in a repository |
| create_branch | Create a new branch in a repository |
| push_files | Push file changes to a repository |
| list_commits | List recent commits on a branch |
| list_issues | List issues in a repository with filters |
| get_issue | Get details of a specific issue |
What it does
The GitHub MCP Server connects your AI coding assistant directly to the GitHub API, giving it the ability to read, search, and modify repositories without leaving your editor. It supports the full range of GitHub operations including file access, code search, issue management, and pull request workflows.
This is one of the most popular MCP servers in the ecosystem, enabling AI assistants to understand your codebase context by reading files directly from GitHub, searching across repositories, and even making changes through commits and pull requests.
Use cases
- Search across all your GitHub repositories for specific code patterns or implementations
- Create and manage issues and pull requests without switching to the browser
- Read file contents from any repository to provide context for code generation
- Automate branch creation, file pushes, and PR workflows from your editor
- List and review recent commits to understand project history
- Triage issues by reading, labeling, and commenting programmatically
Getting started
- Create a GitHub Personal Access Token at github.com/settings/tokens/new. Select the
reposcope for full repository access, or use fine-grained tokens to limit access to specific repositories. - Set the
GITHUB_PERSONAL_ACCESS_TOKENenvironment variable to your token value before running the MCP server. - For organization repositories, ensure your token has the necessary org permissions. You may need to authorize the token for SSO-enabled organizations.
- The server uses the GitHub REST API under the hood, so standard rate limits apply. Authenticated requests get 5,000 requests per hour.
Compatibility
Related MCP servers
AWS MCP Server
Interact with AWS services including S3, Lambda, CloudWatch, and ECS from your AI coding assistant.
Context7 MCP Server
Fetch up-to-date library documentation and code examples directly into your AI coding assistant.
Docker MCP Server
Manage Docker containers, images, and builds directly from your AI coding assistant.