GitHub MCP Server
Connect your AI agent to GitHub to manage repositories, create and review pull requests, search code, manage issues and labels, and automate workflows. The official GitHub MCP server provides read and write access to the GitHub API through a standardized MCP interface.
Quick Install
$ npx -y @modelcontextprotocol/server-githubEnvironment Variables
| Variable | Description | Required |
|---|---|---|
| GITHUB_PERSONAL_ACCESS_TOKEN | GitHub Personal Access Token with repo scope | Yes |
In-Depth Setup Guide
Complete setup walkthrough & security best practices
Configuration by Client
{
"mcpServers": {
"github": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxx"
}
}
}
}Need a different client? Use the Config Generator for Windsurf, Cline, Antigravity, and more.
Available Tools (7)
GitHub FAQ
What is the GitHub MCP server?
Connect your AI agent to GitHub to manage repositories, create and review pull requests, search code, manage issues and labels, and automate workflows. The official GitHub MCP server provides read and write access to the GitHub API through a standardized MCP interface.
How do I install the GitHub MCP server?
Run: npx -y @modelcontextprotocol/server-github
Which AI clients support the GitHub MCP server?
The GitHub MCP server works with Claude Desktop, Cursor, Codex CLI, Antigravity, Windsurf, and any MCP-compatible client using stdio transport.
What tools does the GitHub MCP server provide?
The server provides 7 tools: create_or_update_file, search_repositories, create_issue, create_pull_request, get_file_contents, list_commits, push_files.