GitHub PR MCP Server
Allows managing GitHub Pull Requests: listing PRs, retrieving PR details, listing PR comments, creating comments, creating reviews, and merging PRs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GitHub PR MCP Server List open pull requests in this repository"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GitHub PR MCP Server
Un servidor MCP (Model Context Protocol) mínimo para interactuar con Pull Requests de GitHub. Está pensado como ejemplo didáctico para entender cómo crear un MCP server desde cero.
Qué hace
Expone 6 herramientas:
list_pull_requests— Lista los PRs de un repositorio.get_pull_request— Muestra el detalle de un PR.list_pull_request_comments— Lista los comentarios de un PR.create_pull_request_comment— Publica un comentario en un PR.create_pull_request_review— Aprueba, pide cambios o comenta un PR.merge_pull_request— Mergea un PR.
Related MCP server: tai-mcp-github
Requisitos
Node.js 20 o superior
Un token de GitHub con permisos para leer/escribir PRs (repo o repo:read + repo:write según la operación)
Instalación
npm installConfiguración
Exporta tu token de GitHub:
export GITHUB_TOKEN="ghp_xxxxxxxxxxxxxxxxxxxx"Ejecución
npm run devImportante: el servidor usa
stdiocomo transporte MCP. No escribe nada astdoutexcepto el protocolo; los logs van astderr.
Probar con MCP Inspector
El inspector te permite probar las herramientas sin necesidad de un host como Claude o Cursor:
npm run inspectLuego abre la URL que indica, conecta el servidor y prueba las tools.
Configurar en un host MCP
Añade esto a tu cliente MCP (Claude Code, Cursor, VS Code, etc.):
{
"mcpServers": {
"github-pr": {
"command": "npx",
"args": ["tsx", "/ruta/al/proyecto/src/index.ts"],
"env": {
"GITHUB_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxx"
}
}
}
}Estructura del proyecto
.
├── src/
│ └── index.ts # Todo el servidor
├── package.json
├── tsconfig.json
└── README.mdNotas para un video tutorial
El archivo
src/index.tses autónomo: configura el cliente de GitHub, define los schemas con Zod, registra las tools y arranca el transporte stdio.El SDK de MCP valida los argumentos automáticamente con los schemas; si falla, la tool no se ejecuta.
Para demostraciones, usa un repo de prueba y un PR que no importe romper.
Available Tools
6 toolscreate_pull_request_commentB
Crea un comentario general en un Pull Request
Inputs: body (required), repo (required), owner (required), pull_number (required).
create_pull_request_reviewB
Crea una review de un Pull Request. Para REQUEST_CHANGES o COMMENT, el body es obligatorio.
Inputs: repo (required), event (required), owner (required), pull_number (required), +1 more.
get_pull_requestA
Obtiene el detalle de un Pull Request específico
Inputs: repo (required), owner (required), pull_number (required).
list_pull_request_commentsB
Lista los comentarios de un Pull Request
Inputs: repo (required), owner (required), pull_number (required).
list_pull_requestsC
Lista los Pull Requests de un repositorio de GitHub
Inputs: repo (required), owner (required), state, per_page.
merge_pull_requestC
Mergea un Pull Request en su rama base
Inputs: repo (required), owner (required), pull_number (required), commit_title, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool performs a distinct action on pull requests: listing, retrieving, commenting, reviewing, and merging. There is no overlap in purpose, making it easy for an agent to select the correct tool.
All tool names follow a consistent verb_noun pattern (list_pull_requests, get_pull_request, create_pull_request_comment, merge_pull_request). The naming is uniform and predictable, with only minor singular/plural variations that are appropriate.
With 6 tools, the server is well-scoped for a PR-focused MCP server. Each tool covers a core PR interaction without unnecessary bloat or redundancy.
The tool surface covers the main PR lifecycle: list, get, comment, review, and merge. Minor gaps like updating a PR title/body or listing reviews exist, but agents can typically work around them, and the core workflows are well covered.
Related MCP Connectors
Create, deploy, and operate MCP servers directly from your GitHub repositories.
A MCP server built for developers enabling Git based project management with project and personal…
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
MCP server for siGit (sigit.si): browse repos, search code, manage PRs/issues, web search.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server for the GitHub REST API that enables interaction with repositories, pull requests, issues, branches, commits, reviews, and code search, with configurable write and destructive operations.-
- FlicenseAqualityDmaintenanceA minimal MCP server that exposes a focused set of GitHub PR review tools to AI agents, enabling PR listing, detail retrieval, comment viewing, and thread management.5-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables checking GitHub and Codeberg PR reviews, change requests, and conversations.MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for GitHub operations, providing tools for repository management, issues, pull requests, and code search.-