Esta página se muestra en inglés. Una traducción al español está en curso.
MCP ConfigsMar 28, 2026·2 min de lectura

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.

Listo para agents

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.

Stage only · 17/100Política: staging
Superficie agent
Cualquier agent MCP/CLI
Tipo
Mcp Config
Instalación
Stage only
Confianza
Confianza: Community
Entrada
GitHub MCP Server
Comando de staging seguro
npx -y tokrepo@latest install 595e3cd6-fbee-4271-8ede-e8fc1c9d8493 --target codex

Primero deja archivos en staging; la activación requiere revisar el README y el plan staged.

TL;DR
GitHub MCP connects AI tools to GitHub for repo management, issues, and PRs.
§01

What it is

The GitHub MCP Server is the official Model Context Protocol server from GitHub. It connects AI tools like Claude Code and Cursor to GitHub for managing repositories, issues, pull requests, and code search via natural language. Instead of switching to the GitHub web interface or remembering CLI commands, you tell your AI agent what you need and it executes the GitHub API calls.

This server targets developers who want their AI assistant to interact with GitHub directly from the coding environment. It covers the most common GitHub operations: creating issues, reviewing PRs, searching code, and managing repository settings.

§02

Why it saves time or tokens

GitHub operations like creating issues, reviewing PRs, and searching code across repositories require context switches to the web UI or memorizing gh CLI syntax. The MCP server lets the AI agent handle these operations inline during a coding session. Filing a bug report from a code review finding or searching for usage patterns across repos happens within the same conversation.

§03

How to use

  1. Add the GitHub MCP server to your AI tool's MCP configuration
  2. Provide a GitHub personal access token with the needed scopes
  3. Instruct your AI agent to perform GitHub operations in natural language
§04

Example

{
  'mcpServers': {
    'github': {
      'command': 'npx',
      'args': ['-y', '@modelcontextprotocol/server-github'],
      'env': {
        'GITHUB_PERSONAL_ACCESS_TOKEN': 'ghp_xxxxx'
      }
    }
  }
}

Example commands:

  • 'Create an issue in myorg/backend titled API rate limiting needed'
  • 'Search for uses of deprecated function across all repos'
  • 'List open PRs assigned to me'
OperationWhat the Agent Does
IssuesCreate, update, comment, close
Pull RequestsList, review, comment
Code SearchSearch across repositories
ReposList files, read content
BranchesCreate, list, compare
§05

Related on TokRepo

§06

Common pitfalls

  • The personal access token grants the same permissions as your GitHub account; use fine-grained tokens with minimal scopes
  • Code search across many repos can be slow and token-intensive; scope searches to specific organizations or repositories
  • Creating issues or PRs via AI requires clear instructions; vague prompts produce low-quality issue descriptions

Preguntas frecuentes

What GitHub operations does the MCP server support?+

The server supports repository management (list files, read content), issue operations (create, update, comment, close), pull request operations (list, review, comment), code search, branch management, and user operations. It covers the most commonly used GitHub API endpoints.

Is the GitHub MCP server official?+

Yes. The GitHub MCP server is maintained as part of the Model Context Protocol project. It uses the official GitHub REST and GraphQL APIs. The server is open source and follows the MCP specification for AI tool integration.

What token scopes do I need?+

For basic operations, use a fine-grained token with repository read/write access, issue read/write, and pull request read/write. For code search across organizations, add the appropriate organization scopes. Start with minimal permissions and add scopes as needed.

Can I use this with GitHub Enterprise?+

Yes. Configure the GITHUB_API_URL environment variable to point to your GitHub Enterprise API endpoint. The MCP server uses the standard GitHub REST API, which is compatible with GitHub Enterprise Server and GitHub Enterprise Cloud.

Does the MCP server support pull request reviews?+

Yes. The agent can list pull requests, read diffs, add comments, and post review comments on specific lines. This enables AI-assisted code review where the agent reads the PR diff and posts findings as review comments directly on GitHub.

Referencias (3)
🙏

Fuente y agradecimientos

Created by GitHub. Licensed under MIT. github-mcp-server — ⭐ 28,300+

The official GitHub MCP integration, maintained by GitHub's engineering team.

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados