GitHub MCP Server
OfficialManage repos, issues, PRs, and code directly from your AI chat
The official GitHub MCP server gives your AI assistant full access to the GitHub API. Create issues, open pull requests, review code, search repositories, manage branches, and read file contents — all without leaving your AI client. Authenticated via a personal access token with scopes you control. Ideal for automating repetitive GitHub workflows, reviewing codebases, and keeping track of open issues.
Install Config
Config file: ~/Library/Application Support/Claude/claude_desktop_config.json· Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"github": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
}
}
}
}Required environment variables:
GITHUB_PERSONAL_ACCESS_TOKEN— GitHub personal access token with repo and issues scopes(e.g. ghp_xxxxxxxxxxxxxxxxxxxx)
Available Tools (9)
| Tool name | Description |
|---|---|
| create_issue | Open a new GitHub issue |
| create_pull_request | Create a pull request |
| get_file_contents | Read a file from any repository |
| push_files | Push one or more files to a repository |
| create_repository | Create a new GitHub repository |
| search_repositories | Search for repositories on GitHub |
| list_issues | List issues with optional filters |
| create_branch | Create a new branch in a repository |
| fork_repository | Fork a repository to your account |
Example Prompts
- “List all open issues in my repository”
- “Create an issue titled 'Fix login bug' in my project”
- “What files are in the src directory of my repo?”
- “Open a pull request from feature/login to main”
- “Search for repositories about MCP servers”
Pros & Cons
Pros
- Official Anthropic server with full GitHub API access
- Create, read, and manage issues, PRs, and code
- Fine-grained token scopes — give only the permissions you need
Cons
- GitHub only — not GitLab or Bitbucket
- Requires a personal access token
Who Is This For?
- ·Developers automating repetitive GitHub tasks
- ·Open source maintainers managing large issue backlogs
- ·Teams who want AI-assisted code review workflows
When to use: Use when you spend significant time on GitHub tasks that don't require the full GitHub UI — creating issues, reviewing code, searching repos, or managing branches.
Supported Clients
Related Use Cases
Related Servers
Git MCP Server
OfficialRun git commands and inspect local repositories from your AI
The official Git MCP server lets your AI assistant interact with local git repositories directly. Read commit history, c…
Filesystem MCP Server
OfficialGive your AI read and write access to your local files
The official Filesystem MCP server from Anthropic provides secure, configurable access to your local file system. You sp…