GitHub MCP Server — Official GitHub AI Integration
GitHub's official MCP server that lets AI assistants manage repos, issues, PRs, Actions, and code search through the Model Context Protocol.
Staging seguro para este activo
Este activo primero queda en staging. El prompt copiado pide inspeccionar los archivos staged antes de activar scripts, config MCP o config global.
npx -y tokrepo@latest install 679a2650-b97b-4e8e-af6e-b51bafcbf610 --target codexPrimero deja archivos en staging; la activación requiere revisar el README y el plan staged.
What it is
GitHub MCP Server is the official Model Context Protocol server built by GitHub that connects AI coding assistants to the GitHub platform. It translates natural language requests into GitHub API calls, enabling AI tools to manage repositories, issues, pull requests, code reviews, Actions workflows, and security alerts.
The server targets developers using AI coding assistants like Claude Code who want their agent to interact with GitHub directly -- creating issues, reviewing PRs, searching code, and monitoring CI/CD pipelines without switching to the browser.
How it saves time or tokens
Without the MCP server, interacting with GitHub from an AI assistant requires manual copy-paste of URLs, issue descriptions, and PR diffs. The MCP server provides structured access to all GitHub data, so the assistant can read, search, and write to GitHub in a single conversation. This eliminates context switching between the AI tool and the GitHub web interface.
The token estimate is approximately 636 tokens for the server configuration itself. Actual token usage depends on the scope of GitHub operations performed.
How to use
- Add the MCP server to your AI assistant configuration:
{
"mcpServers": {
"github": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<your-token>"
}
}
}
}
- Generate a GitHub Personal Access Token with the scopes your workflow needs (repo, issues, pull requests).
- Start your AI assistant. The MCP server connects automatically and exposes GitHub tools.
Example
Once configured, your AI assistant can perform GitHub operations directly:
# Example interactions through the MCP server:
# 'Search for open issues labeled bug in my-org/my-repo'
# 'Create a PR from feature-branch to main with this description'
# 'Show me the failing CI checks on PR #42'
# 'List recent commits on the main branch'
The server exposes tools for:
- Repository: search, browse files, list branches, read commits
- Issues: create, update, comment, label, close
- Pull Requests: create, review, merge, request changes
- Actions: list workflows, view run logs, re-run jobs
- Code Search: search across public and private repos
- Security: code scanning alerts, Dependabot, secret scanning
Related on TokRepo
- GitHub MCP Integration -- Detailed GitHub MCP setup and configuration
- AI Tools for Coding -- Developer productivity tools and integrations
Common pitfalls
- The Personal Access Token scope determines what the MCP server can access. A token with only public_repo scope cannot interact with private repositories. Create a fine-grained token with exactly the permissions you need.
- The Docker-based setup requires Docker running locally. For environments without Docker, the server can also run as a standalone Go binary.
- Rate limiting applies to all GitHub API calls made through the MCP server. Heavy usage (bulk issue creation, large code searches) can exhaust your hourly API quota.
Preguntas frecuentes
The token needs scopes matching your use case. For basic repo and issue operations, the repo scope is sufficient. For Actions, add the workflow scope. For security alerts, add the security_events scope. Fine-grained tokens let you limit access to specific repositories.
Yes, if the Personal Access Token has the repo scope. The MCP server accesses GitHub through the authenticated API, so it can see everything the token owner can see.
Yes. Add the MCP server configuration to your Claude Code MCP settings. Claude Code will discover the GitHub tools automatically and can use them during conversations.
Yes. The GitHub MCP server is MIT licensed and the source code is available on GitHub. It is built in Go and can be compiled from source or run as a Docker container.
The MCP server can be configured to point at GitHub Enterprise Server instances by setting the appropriate base URL environment variable. Check the repository README for Enterprise-specific configuration.
Referencias (3)
- GitHub MCP Server Repository— GitHub MCP Server is the official MCP server built by GitHub
- MCP Specification— Model Context Protocol specification for AI tool integration
- GitHub Docs— GitHub REST API documentation for repository and issue management
Relacionados en TokRepo
Fuente y agradecimientos
- GitHub: github/github-mcp-server
- License: MIT
- Stars: 28,000+
- Maintainer: GitHub, Inc.
Thanks to the GitHub team for building the official integration that sets the standard for MCP server quality and security.
Discusión
Activos relacionados
GitHub MCP Server — Manage Repos & Issues from AI Tools
GitHub official MCP server. Connect Claude Code or Cursor to GitHub for managing repos, issues, PRs, and code search via natural language.
GitHub MCP — Repository Management for AI Agents
Official GitHub MCP server that gives AI agents access to repos, issues, PRs, code search, and Actions. Create branches, review PRs, and manage projects via natural language. 5,000+ stars.
GitMCP — Remote MCP Server for Any GitHub Repo
Free remote MCP server that gives AI agents context from any GitHub project. Eliminates code hallucinations by providing real README, docs, and code. Zero setup. 7.8K+ stars.
Notion MCP Server — Official Notion Integration
Official Notion MCP server. Search, read, create, and update Notion pages, databases, and blocks from Claude Code, Cursor, or any MCP client. By Notion. 4.1K+ stars.