GitHub MCP Server
GitHub MCP Server
Пользовательский MCP-сервер (Model Context Protocol), написанный на TypeScript, который подключает Claude к REST API GitHub.
Возможности
Предоставляет 6 инструментов (tools), которые Claude может вызывать:
Инструмент | Описание |
| Список репозиториев аутентифицированного пользователя |
| Детали конкретного репозитория |
| Список issues репозитория |
| Создаёт новую issue |
| Читает содержимое файла из репозитория |
| Ищет код на GitHub |
Related MCP server: remote-mcp-oauth-github
1. Генерация GitHub Personal Access Token
Перейдите в GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens
Создайте токен с минимально необходимыми разрешениями:
Contents: Read(дляget_file_content)Issues: Read and write(дляlist_issues/create_issue)Metadata: Read(обязательно всегда)
Скопируйте сгенерированный токен (начинается с
github_pat_...)
Совет по безопасности: никогда не коммитьте токен в репозиторий. Используйте переменную окружения.
2. Установка и сборка
npm install
npm run buildЭто создаёт build/index.js, который является исполняемым файлом сервера (общение через stdio — стандартный протокол MCP).
3. Локальное тестирование (опционально, без Claude)
export GITHUB_PERSONAL_ACCESS_TOKEN="seu_token_aqui"
npm startЕсли в stderr появится GitHub MCP server rodando via stdio., значит, всё работает. Для интерактивного тестирования tools используйте MCP Inspector:
npx @modelcontextprotocol/inspector node build/index.js4. Подключение к Claude Desktop
Отредактируйте файл конфигурации Claude Desktop:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Добавьте:
{
"mcpServers": {
"github": {
"command": "node",
"args": ["/caminho/absoluto/para/github-mcp-server/build/index.js"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "seu_token_aqui"
}
}
}
}Перезапустите Claude Desktop. Инструменты GitHub должны появиться на значке инструментов (🔨) в беседе.
5. Следующие шаги (идеи для расширения и прокачки портфолио)
Добавить инструменты записи:
create_pull_request,merge_pull_request,create_branchДобавить настоящую пагинацию (cursor-based) вместо только
per_pageRate limiting и кэш (GitHub ограничивает 5000 запросов в час для аутентифицированных пользователей)
Автоматические тесты с Vitest/Jest
CI с GitHub Actions, запускающий lint + тесты + сборку при каждом push
Опубликовать как npm-пакет (
npx github-mcp-server)Докеризировать сервер (хороший способ связать его с вашими другими DevOps-проектами)
Структура проекта
github-mcp-server/
├── src/
│ └── index.ts # lógica do servidor e definição das tools
├── build/ # gerado pelo `npm run build`
├── package.json
├── tsconfig.json
└── README.mdAvailable Tools
6 toolscreate_issueB
Cria uma nova issue em um repositório
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Descrição/corpo da issue | |
| repo | Yes | ||
| owner | Yes | ||
| title | Yes | Título da issue | |
| labels | No | Labels a aplicar |
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 states that the operation creates, but does not mention permissions, return type, or side effects beyond the creation itself.
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, focused sentence with no wasted words. The action and resource are stated immediately and clearly.
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 no annotations and no output schema, and the description is too minimal to give an agent complete context for executing the operation, especially for identifying owner/repo and understanding expected outputs or permission dependencies.
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 coverage is 60%, leaving owner and repo undocumented. The description does not clarify these required parameters; 'um repositório' is vague and does not compensate for the gaps in 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 clearly states a specific verb ('Cria') and resource ('nova issue em um repositório'), distinguishing it from siblings like list_issues and get_file_content. There is no ambiguity or tautology.
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 implies the use case: when a new issue should be created. However, it does not explicitly state when not to use this tool or how it compares to alternatives such as list_issues.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_file_contentB
Lê o conteúdo de um arquivo em um repositório
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch, tag ou commit SHA (opcional) | |
| path | Yes | Caminho do arquivo dentro do repositório | |
| repo | Yes | ||
| owner | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Nenhuma anotação foi fornecida, então a descrição precisa explicar o comportamento. Ela apenas descreve a leitura, sem mencionar formato de retorno, limites, autenticação, codificação do conteúdo ou condições de erro. O agente não obtém visibilidade sobre como a resposta será entregue.
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?
A descrição é uma frase curta e direta, sem conteúdo redundante. Ela entrega o objetivo principal sem incluir informações desnecessárias para a compreensão básica do uso.
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?
Sem annotations e sem schema de saída, a descrição deveria compensar com mais informações para chamadas corretas. O texto atual é muito enxuto para um cenário onde o formato de resposta, possíveis limites e condições de disponibilidade não são explicitados. Ainda que a ferramenta seja simples, o agente fica sem contexto suficiente para cenários não triviais.
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?
A cobertura do schema é de 50% e a descrição não acrescenta significado aos parâmetros owner, repo e ref. path já é explicado no schema, mas owner e repo permanecem vagos e a descrição geral não ajuda a entender o que cada parâmetro representa no contexto da chamada.
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?
A descrição afirma claramente o recurso e a ação: 'Lê o conteúdo de um arquivo em um repositório'. Isso distingue a ferramenta dos irmãos list_repos, get_repo, list_issues, create_issue e search_code, pois o agente identifica que o objetivo é recuperar o conteúdo de um arquivo específico.
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?
Não há orientação explícita sobre quando usar esta ferramenta nem alternativas para evitar. O uso precisa ser inferido pelo verbo 'ler', sem indicar diferenças de contexto em relação a ferramentas semelhantes. Falta contexto de seleção.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_repoC
Obtém detalhes de um repositório específico
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Nome do repositório | |
| owner | Yes | Dono do repositório (usuário ou organização) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description carries the full behavioral burden. It only says 'gets details', implying a read-only operation, but it does not explain error behavior (e.g., non-existent repo), return contents, authorization needs, or any constraints the agent should know before invoking it.
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, direct sentence with no wasted words and communicates its basic intent up front. However, it is very terse and needs more detail to truly stand alone, though it is not overly verbose.
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 lack of an output schema and annotations means the description should explain what 'detalhes' realistically includes or what the agent can expect as a result, but it does not. While the 2-parameter schema is simple and clear, the behavior around failures and return shape is left entirely to the agent to guess.
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%, since both 'owner' and 'repo' are already described in the JSON schema. The description does not add any parameter-level details beyond what the schema already provides, so the 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 uses a clear verb ('obtém' / 'gets') and a specific resource ('detalhes de um repositório específico'), which adequately conveys this tool retrieves a single repository's details. It implicitly distinguishes from list_repos via the word 'específico', but it does not name that sibling or specify which details are returned.
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 about when to use this tool versus list_repos, list_issues, or search_code. No alternatives are mentioned, and there are no usage conditions, prerequisites, or exclusions for the agent to follow.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_issuesC
Lista issues de um repositório
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | ||
| owner | Yes | ||
| state | No | open |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears the full responsibility for behavioral disclosure. It conveys a read-only list operation, but it says nothing about default state filtering, pagination, authentication, response contents, or access limitations. The description provides little behavioral context beyond what the name already implies.
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 with no wasted words and the core target is accurately fronted. It is concise and easy to parse, though it lacks peripheral details that would make it more informative.
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?
With no annotations and no output schema, the description leaves too much implicit. It does not explain response behavior, default state behavior, or how this listing interacts with discussion. The agent can invoke the tool based on the schema, but not confidently understand the full behavior from the description alone.
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 0%, so the description should compensate for the undocumented parameters. The phrase 'de um repositório' loosely aligns with owner and repo, but the description does not clarify their meaning or relation, and it entirely omits state semantics.
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 action, 'list', and a clear resource, 'issues', scoped to a repository. This makes the tool's basic purpose understandable and distinguishes it functionally from sibling tools like list_repos or create_issue. However, it does not explicitly differentiate itself from alternatives or mention filtering behavior.
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 gives no guidance about when to use this tool versus alternatives such as list_repos, search_code, or create_issue. There are no preconditions or exclusions stated, so the agent must infer usage entirely from the tool name and schema.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_reposA
Lista os repositórios do usuário autenticado no GitHub
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Critério de ordenação | updated |
| per_page | No | Quantidade de repositórios a retornar (máx 100) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. 'Lista' implies a read-only operation and the authenticated-user scope is disclosed, but it does not mention pagination behavior (only one page returned per call, default 20), authentication requirements, rate limits, or error conditions. Acceptable but not rich.
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?
A single, precise sentence in Portuguese that leads with the action and resource. No filler, no redundancy with the schema. Every word earns its place.
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 listing tool with 2 well-documented parameters this is largely adequate, but the output shape is not mentioned (no output schema) and pagination semantics are left implicit. It lacks any annotation backstop, so slightly more disclosure would be appropriate.
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 both parameters are already documented with constraints: 'sort' has an enum and default, 'per_page' has min, max, and default. The description adds nothing beyond the schema, which is fine — baseline 3 applies.
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') and resource ('repositórios do usuário autenticado'), clarifying both the action and the scoping to the authenticated user's own repos. This clearly differentiates it from siblings like get_repo (single repo), list_issues (issues), and search_code (code search).
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 intended use is implied by the purpose: call this when you need the authenticated user's repository list. However, it gives no explicit exclusions or nod to alternatives, e.g., no pointer to get_repo for a single repository or search_code for broader discovery.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_codeA
Busca código no GitHub usando a sintaxe de busca do GitHub
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Query de busca, ex: 'useState repo:facebook/react' ou 'TODO language:python' |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, all behavioral disclosure falls on the description. It usefully mentions that the tool relies on GitHub's search syntax rather than natural language, which is an important behavioral nuance. It does not mention authentication, result shape, pagination, or rate limits, but the query-syntax note adds meaningful transparency.
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 front-loads the core action and includes the most important usage detail: GitHub search syntax. There is no wasted or redundant content.
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 one-parameter, simple search tool with no output schema, the description is largely complete: it tells the agent what the tool searches, where, and the syntax to use. It could additionally clarify what kinds of results are returned, but this is not a serious omission for such a tool.
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 coverage is 100% and the parameter description already provides concrete examples using GitHub search syntax. The tool description reinforces that the query uses GitHub syntax, but adds little 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 clearly states the action ('Busca código') and resource ('no GitHub'), and clarifies that it uses GitHub's specific search syntax. This distinguishes it from sibling tools like list_repos and list_issues, which operate on different GitHub entities.
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 intended use is implied: an agent would call this when needing to find code, as opposed to listing repositories or issues. However, the description gives no explicit guidance about when to choose this tool over siblings, nor any exclusions or prerequisites.
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_issue - First observed
get_file_content - First observed
get_repo - First observed
list_issues - First observed
list_repos - First observed
search_code
TDQS
Each tool targets a distinct resource/action: repository listing/detail, issue listing/creation, file reading, and code search. No tools appear to overlap in purpose.
All tool names follow a consistent verb_noun pattern such as list_repos, get_repo, list_issues, and create_issue. The naming is predictable and internally consistent.
Six tools provide a reasonable, well-scoped surface for basic GitHub repository queries, issue management, and code search. Each tool earns its place without redundancy.
The set covers a useful read-heavy workflow and issue creation, but it lacks operations like updating/closing issues, repository creation, and pull request access. These are notable gaps within the GitHub domain.
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
Access the GitHub API, enabling file operations, repository management, search functionality, and…
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Manage repositories, users, releases, and automate GitHub workflows
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceConnects Claude Desktop to GitHub repositories, enabling users to perform git operations and GitHub API interactions through natural conversation.467-
- AlicenseNot gradedqualityDmaintenanceEnables Claude to authenticate with GitHub OAuth and access tools for user information, calculations, and GitHub repositories.5MIT
- FlicenseAqualityDmaintenanceConnects Claude to GitHub, enabling listing repositories, browsing open pull requests, and inspecting PR diffs for code review.4-
- FlicenseNot gradedqualityDmaintenanceEnables to interact with GitHub repositories directly from Claude, supporting actions like viewing repos, checking status, committing and pushing changes, and managing pull requests.-
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/luizHramoss/github-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server