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 "Install 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 ServerList 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
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Texto del comentario | |
| repo | Yes | Nombre del repositorio | |
| owner | Yes | Usuario u organización propietaria del repositorio | |
| pull_number | Yes | Número del Pull Request |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the full burden of disclosing behavior. It only says 'creates a general comment' but does not mention permissions, idempotency, rate limits, side effects, or response format. This leaves significant behavioral uncertainty for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence that is front-loaded and free of extraneous content. Every word earns its place, delivering the core purpose without unnecessary detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite complete parameter documentation, the tool has no annotations and no output schema, leaving the description to provide full operational context. It does not explain when to use the tool, what it returns, or any prerequisites, making it incomplete for an agent to confidently invoke it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides complete descriptions for all four parameters (100% coverage), so the description adds little beyond the schema. The qualifier 'general' provides minor context but does not enhance parameter meaning beyond what the schema already conveys. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action ('Crea un comentario general en un Pull Request') with a clear verb and resource, and the word 'general' distinguishes it from line-specific or review comments. This aligns with sibling tools like create_pull_request_review, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like create_pull_request_review or list_pull_request_comments. The description lacks any when-to-use or when-not-to-use context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_pull_request_reviewB
Crea una review de un Pull Request. Para REQUEST_CHANGES o COMMENT, el body es obligatorio.
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Comentario asociado a la review | |
| repo | Yes | Nombre del repositorio | |
| event | Yes | Tipo de review a realizar | |
| owner | Yes | Usuario u organización propietaria del repositorio | |
| pull_number | Yes | Número del Pull Request |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description bears the full responsibility for behavioral disclosure. It does disclose an important constraint: the body is mandatory for REQUEST_CHANGES and COMMENT events. However, it does not mention permissions, side effects beyond creation, or the response format. This is a moderate level of transparency for a simple mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, consisting of two short sentences. It front-loads the main purpose and then adds a precise condition. Every word earns its place; there is no fluff or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has a moderate complexity with 5 parameters and no output schema. The description covers the essential purpose and a key constraint, but it omits other useful context such as what the review creation entails (e.g., whether it requires a commit ID), potential errors, or the shape of the response. Given the absence of an output schema, these gaps leave completeness at a 'minimum viable' level.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All parameters have schema descriptions, giving a baseline of 3. The description adds semantic value by clarifying that 'body' is conditionally required for REQUEST_CHANGES or COMMENT, something not explicit in the schema where body is optional. This enhancement justifies a score above baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action: 'Crea una review de un Pull Request' (Creates a Pull Request review). It is specific enough to distinguish from sibling tools like create_pull_request_comment, though it does not explicitly name that alternative. The purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit guidance on when to use this tool versus alternatives such as create_pull_request_comment. It only mentions a conditional requirement about the body for certain event types, which is a parameter-level note rather than tool-selection guidance. There is no 'use this when...' or 'instead of...' statement.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_pull_requestA
Obtiene el detalle de un Pull Request específico
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Nombre del repositorio | |
| owner | Yes | Usuario u organización propietaria del repositorio | |
| pull_number | Yes | Número del Pull Request |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It implies a read operation but does not disclose behavior such as error handling, authentication requirements, rate limits, or the exact structure of the returned data.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single clear sentence with no filler. It is front-loaded and properly sized for a simple getter tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a straightforward read operation with fully described parameters, the description is minimally adequate. However, since there is no output schema, it does not clarify the return format beyond the vague word 'detalle', leaving some ambiguity about what the response contains.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so parameters are well-documented in the schema. The description adds no additional parameter meaning beyond what the schema already provides, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a clear verb ('Obtiene' = gets) and resource ('detalle de un Pull Request específico' = detail of a specific Pull Request). It distinguishes from siblings like list_pull_requests by explicitly indicating a single PR.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage context is implied by the name and description (to fetch one PR's details), but there is no explicit guidance on when to use this versus alternatives or any exclusions. It lacks direct sibling differentiation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_pull_request_commentsB
Lista los comentarios de un Pull Request
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Nombre del repositorio | |
| owner | Yes | Usuario u organización propietaria del repositorio | |
| pull_number | Yes | Número del Pull Request |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It only states that the tool lists comments, but does not disclose pagination, ordering, what types of comments are included (review comments vs. issue comments), authentication requirements, or any other behavioral nuances. This is a significant gap for a tool with no structured safety hints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, short sentence that is front-loaded with the action and resource. Every word earns its place, and there is no irrelevant information. It is efficiently minimal without being vague about the core purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with no output schema and no annotations, the description is too sparse. It does not explain what the response will include, whether pagination is supported, or how comments are ordered. The ambiguity about which types of comments (e.g., review comments vs. general comments) are listed further limits completeness. The schema covers parameters, but behavioral and output context are missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides 100% coverage, describing each parameter (owner, repo, pull_number) with Spanish labels. The description adds no extra meaning beyond what the schema provides, so the baseline score of 3 is appropriate. It does not clarify parameter formats or relationships beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Lista' (Lists) and clearly identifies the resource as 'los comentarios de un Pull Request' (comments of a Pull Request). This distinguishes it from siblings like list_pull_requests (lists PRs) and create_pull_request_comment (creates a comment), making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage is implied by the name and description: use it to list comments on a PR. However, there is no explicit guidance on when to prefer this over alternatives, such as when only review comments are needed or when to use create_pull_request_comment. No exclusions or alternative tool mentions are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_pull_requestsC
Lista los Pull Requests de un repositorio de GitHub
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Nombre del repositorio | |
| owner | Yes | Usuario u organización propietaria del repositorio | |
| state | No | Estado de los PRs a listar | open |
| per_page | No | Cantidad máxima de PRs a devolver |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It only repeats the basic function and does not mention that it is a read-only operation, pagination behavior, or any other runtime characteristics.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, front-loaded with the verb 'Lista', and every word contributes to the core purpose. It is appropriately sized for the tool's simplicity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is extremely sparse. While the schema covers parameters well, the lack of an output schema and annotations means the agent receives no information about return format, pagination, or typical usage. For a complete tool description, more context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already describes all parameters with defaults, constraints, and enums, so the description adds no extra meaning. Per the rubric, full schema coverage yields a baseline of 3, which is appropriate here.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists pull requests from a GitHub repository, specifying the verb and resource. However, it does not differentiate from sibling tools like get_pull_request or list_pull_request_comments, so it doesn't fully earn a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. There is no mention of suitable contexts, exclusions, or why one would choose list_pull_requests over get_pull_request or others.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
merge_pull_requestC
Mergea un Pull Request en su rama base
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Nombre del repositorio | |
| owner | Yes | Usuario u organización propietaria del repositorio | |
| pull_number | Yes | Número del Pull Request | |
| commit_title | No | Título del commit de merge | |
| commit_message | No | Mensaje del commit de merge |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of disclosing behavioral traits. It fails to mention that this is a write operation, potentially destructive, may fail on merge conflicts, or requires specific permissions. The sparse description provides no insight beyond the basic action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence, which is structurally clean. However, it is under-specified for a merge operation; while concise, it lacks critical information that would justify the brevity. It is not verbose, but the minimalism is a weakness rather than a strength.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
This is a mutation tool with no annotations and no output schema. The description fails to convey side effects, potential failure modes, return information, or any contextual cues. Given the complexity (5 parameters, destructive action), the completeness is severely lacking.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all five parameters are individually documented in the schema. The description adds no extra semantic meaning about parameter usage or relationships, but the schema already suffices, warranting the baseline score of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Mergea un Pull Request') and the target context ('en su rama base'), making the tool's purpose unambiguous. It effectively differentiates from sibling tools (list, get, comment, review) which do not merge.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like create_pull_request_comment or get_pull_request. There is no mention of prerequisites, such as required mergeability checks or whether the PR must be open.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
6 tool updates
v1.0.0- First observed
create_pull_request_comment - First observed
create_pull_request_review - First observed
get_pull_request - First observed
list_pull_request_comments - First observed
list_pull_requests - First observed
merge_pull_request
TDQS
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.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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…
MCP server for siGit (sigit.si): browse repos, search code, manage PRs/issues, web search.
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceMCP 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 gradedqualityBmaintenanceAn 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.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Pelado-Nerdworks/github-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server