GitHub MCP Server
Servidor MCP (Protocolo de contexto de modelo) de GitHub
¡Hola! Este es mi primer servidor MCP de GitHub que permite que los LLM compatibles con MCP, como Claude , interactúen con mi servidor MCP y, por lo tanto, con la API de GitHub.
Requisitos
TypeScript (lenguaje de programación)
Octokit (para realizar solicitudes de API a GitHub)
SDK de protocolo de contexto de modelo
Configurar el proyecto localmente
Clonar el repositorio
Ejecutar
npm installAgregue el archivo
.envmirando el ejemplo proporcionado en el archivo.env.examplePara convertir los archivos TypeScript a Javascript, ejecute
npx tscPara ejecutar finalmente el proyecto, ejecute
node build/index.js
Related MCP server: mcp-server-github
Formas de realizar la prueba
Puede probar su servidor MCP de 2 maneras:
Inspector de MCP
Escritorio de Claude
Prueba usando el inspector MCP
Simplemente ejecute
npx @modelcontextprotocol/inspector node build/index.jsen la terminalVaya a http://localhost:5173
Ahora puedes ver el inspector MCP y realizar pruebas.
Prueba usando Claude Desktop
Descargue e instale Claude Desktop desde aquí
Vaya a Archivo > Configuración... > Desarrollador > Editar configuración
Debería abrir la ubicación del archivo claude_desktop_config.json.
Abra ese archivo en su editor de código y agregue lo siguiente:
{ "mcpServers": { "gh": { "command": "node", "args": ["absolute\\path\\to\\your\\index.js\\file"], "env": { "GITHUB_TOKEN": "your-github-personal-access-token" } } } }Salir y volver a abrir el escritorio de Claude
Funcionalidades
El MCP admite principalmente dos funciones:
Herramientas (4)
create-issue: crea un nuevo problema en un repositorio de GitHubget-repo-info: obtener información sobre un repositorio específico de GitHublist-issues: enumera problemas en un repositorio de GitHubsearch-repos: busca repositorios de GitHub
Indicaciones (5)
create-issue-description: genera una descripción para un problema de GitHubcreate-pull-request-description: genera una descripción para una solicitud de extracción de GitHubsearch-repos-prompt: genera una consulta para buscar repositorios de GitHubcreate-issue-prompt: genera parámetros para crear un problema en GitHubenhance-github-response: formatea y mejora los datos de respuesta de la API de GitHub sin procesar
Puede escribir sus propias indicaciones o seleccionar una indicación adecuada del menú desplegable en la opción "Elegir una integración" para MCP en el escritorio de Claude
Available Tools
4 toolscreate-issueC
Create a new issue in a GitHub repository
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Repository owner (username or organization) | |
| repo | Yes | Repository name | |
| title | Yes | Issue title | |
| body | Yes | Issue body | |
| labels | No | Labels to apply to the issue |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. While 'Create' implies a write/mutation operation, it doesn't disclose authentication requirements, rate limits, error conditions, or what happens on success (e.g., returns issue ID). For a mutation tool with zero annotation coverage, this is a significant gap.
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, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized for a tool with good schema documentation and gets straight to the point.
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 mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after creation (return values), authentication needs, error handling, or constraints. Given the complexity of creating GitHub issues, more context would be helpful.
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 description coverage is 100%, with all parameters well-documented in the schema itself. The description adds no additional parameter information beyond what's already in the structured schema, so it meets the baseline expectation but doesn't provide extra value.
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 ('Create a new issue') and target resource ('in a GitHub repository'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'list-issues' or 'search-repos' beyond the obvious create vs. read distinction.
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 guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., authentication, repository access), when not to use it, or how it differs from similar operations in sibling tools beyond the basic verb difference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get-repo-infoC
Get information about a specific GitHub repository
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Repository owner (username or organization) | |
| repo | Yes | Repository name |
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. While 'Get information' implies a read-only operation, it doesn't specify authentication requirements, rate limits, what specific information is returned, error conditions, or whether this is a lightweight vs comprehensive repository query. The description is too minimal for a tool with no annotation coverage.
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 extremely concise - a single sentence that directly states the tool's purpose. There's zero wasted language, and the information is front-loaded. Every word earns its place in this minimal description.
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?
Given that there are no annotations and no output schema, the description is insufficiently complete. For a tool that presumably returns repository information (name, description, stars, forks, etc.), the description should at least hint at what information is returned. The current description leaves too much unspecified about the tool's behavior and output.
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 description coverage is 100%, with both parameters ('owner' and 'repo') well-documented in the schema. The description doesn't add any parameter semantics beyond what the schema already provides. According to the scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no parameter information in the description.
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's purpose with a specific verb ('Get information') and resource ('about a specific GitHub repository'), making it immediately understandable. However, it doesn't distinguish this tool from potential sibling tools like 'search-repos' or 'list-issues' that might also provide repository information in different contexts.
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 guidance on when to use this tool versus alternatives. It doesn't mention when this tool is appropriate compared to 'search-repos' (which might return multiple repositories) or 'list-issues' (which focuses on issues rather than repository metadata). There are no explicit when/when-not instructions or alternative recommendations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list-issuesC
List issues in a GitHub repository
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Repository owner (username or organization) | |
| repo | Yes | Repository name | |
| state | No | Issue state | |
| limit | No | Maximum number of issues to return |
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 states the action ('List issues') but doesn't mention critical behaviors like whether this is a read-only operation, if it requires authentication, rate limits, pagination details, or what the output format looks like. This leaves significant gaps for an agent to understand how to use it effectively.
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 wasted words. It's front-loaded with the core action and resource, making it highly efficient and easy to parse.
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?
Given the complexity of a GitHub API tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like authentication needs, rate limits, or output structure, which are crucial for an agent to invoke this tool correctly in a real-world context.
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 description coverage is 100%, meaning all parameters are documented in the input schema. The description adds no additional meaning beyond what's already in the schema (e.g., it doesn't explain parameter interactions or provide examples). This meets the baseline for high schema coverage.
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 verb ('List') and resource ('issues in a GitHub repository'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'search-repos' or 'get-repo-info', which might also involve repository data retrieval, so it doesn't reach the highest score.
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 guidance on when to use this tool versus alternatives like 'search-repos' or 'create-issue'. It lacks any context about prerequisites, such as needing repository access, or when this tool is preferred over others for issue retrieval.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search-reposC
Search for GitHub repositories
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query | |
| sort | No | Sort order | |
| limit | No | Maximum number of results to return |
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 but provides minimal information. It mentions 'search' but doesn't disclose rate limits, authentication requirements, result format, pagination behavior, or what happens when no results are found. For a search tool with zero annotation coverage, this leaves significant behavioral gaps.
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 extremely concise at just four words, with zero wasted language. It's front-loaded with the essential purpose and doesn't include any unnecessary information. Every word earns its place in this minimal description.
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 search tool with 3 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns (repository objects? just names?), doesn't mention authentication needs, rate limits, or error conditions. The combination of missing behavioral context and lack of output information creates significant gaps.
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 has 100% description coverage, with all parameters well-documented in the schema itself. The description adds no additional parameter information beyond what's already in the schema - it doesn't explain search syntax, default values, or provide examples. The baseline of 3 is appropriate when the schema does the heavy lifting.
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 'Search for GitHub repositories' clearly states the verb ('Search') and resource ('GitHub repositories'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get-repo-info' or 'list-issues' - it doesn't specify this is for finding repositories by search criteria rather than retrieving specific repository details or listing issues.
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 guidance on when to use this tool versus alternatives. It doesn't mention when to use search-repos instead of get-repo-info (for specific repository details) or list-issues (for repository issues), nor does it provide any context about prerequisites, limitations, or typical use cases.
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.
4 tool updates
- First observed
create-issue - First observed
get-repo-info - First observed
list-issues - First observed
search-repos
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: create-issue handles issue creation, get-repo-info retrieves repository details, list-issues lists existing issues, and search-repos searches for repositories. There is no overlap in functionality, making tool selection straightforward for an agent.
The tools follow a consistent verb-noun pattern with hyphens (e.g., create-issue, get-repo-info), which is predictable and readable. However, there is a minor deviation in 'get-repo-info' where 'info' is appended, slightly breaking the pure verb-noun convention compared to others like 'list-issues'.
With only 4 tools, the set feels thin for a GitHub server, lacking common operations like updating/deleting issues, managing pull requests, or accessing repository contents. While the tools cover basic functions, the count is borderline low for the broad scope of GitHub interactions.
There are significant gaps in the tool surface for a GitHub domain. Missing operations include update_issue, delete_issue, create_pull_request, get_pull_request, and repository management actions (e.g., create_repo, update_repo). This incomplete coverage will likely cause agent failures when trying to perform common GitHub workflows.
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Create, deploy, and operate MCP servers directly from your GitHub repositories.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Related MCP Servers
- FlicenseBqualityDmaintenanceAn MCP server that enables Claude and other compatible LLMs to interact with the GitHub API, supporting features like creating issues, retrieving repository information, listing issues, and searching repositories.4-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with the GitHub API directly.20 npmMIT
- FlicenseNot gradedqualityDmaintenanceA working MCP server that connects to the real GitHub API, enabling users to manage repositories, issues, pull requests, and more through natural language in Claude Desktop.-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides tools for interacting with the GitHub API, enabling AI assistants to query repositories, pull requests, issues, commits, users, and more.494 npmISC