`add_issue_comment`, `update_issue`, and `get_issue` reject valid integer `issue_number`
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 68/100
Direção de pesquisa
Comece pelas implementações e pelos caminhos de validação de requisições de add_issue_comment, update_issue e get_issue, concentrando-se na interpolação de issue_number nos caminhos de URL. Reproduza as chamadas com um inteiro e compare-as com um parâmetro inteiro funcional, como milestone. Considera-se concluído quando os valores inteiros de issue_number passam pela validação e chegam aos endpoints REST correspondentes do GitHub, com cobertura de regressão para as três ferramentas.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Summary
Three endpoints that take issue_number as a required parameter consistently fail when invoked with an integer, even though the tool schema declares issue_number as number. Other endpoints on the same server that take integer parameters work correctly, and the failure survives reconnecting the MCP server.
Affected tools
add_issue_commentupdate_issueget_issue
Unaffected tools (for comparison, same session, same repo, same auth)
create_issue— succeeds (does not takeissue_number)list_issues,search_issues— succeedcreate_branch,create_or_update_file,push_files,create_pull_request— all succeed, including calls with integer fields likemilestone
Reproduction
- Any repo the caller can write issues on.
- Call, e.g.:
{ "tool": "add_issue_comment", "arguments": { "owner": "<owner>", "repo": "<repo>", "issue_number": 11, "body": "test" } } - Call fails. Retrying multiple times, including after fully reconnecting the MCP server, reproduces the failure.
create_issueagainst the same repo in the same session succeeds, ruling out auth, permissions, and rate limiting.- Reproduced across at least two independent sessions on the same day.
Expected
Comment is posted / issue is updated / issue is fetched, matching a direct REST call to POST /repos/{owner}/{repo}/issues/{issue_number}/comments (etc.).
Actual
Call is rejected before it reaches GitHub. The failure pattern is consistent with issue_number being serialised as a string somewhere in the request pipeline and then rejected by the server's own integer validation.
[TODO fill in with error string on next occurrence]
Hypothesis
The three broken endpoints are exactly the ones where issue_number is templated into a URL path segment (/repos/{owner}/{repo}/issues/{issue_number}[/comments]), whereas the working endpoints pass their integers in the request body or query string. Likely culprits:
- A path-parameter substitution step stringifies the value before an internal validator runs.
- A schema-validation layer runs after path substitution and sees a string where a
numberis required.
Anywhere issue_number is interpolated into a URL is worth checking first.
Affected version
- MCP server: GitHub MCP http server
- Transport: stdio.
- Client: custom provider
Workaround
None from the client side; the caller cannot influence how the server serialises the parameter. Affected users have to fall back to the GitHub REST API directly or edit the issue in the web UI.
- Linguagem predominante
- Go
- Estrelas
- 33.1k
- Forks
- 5k
- Merge médio
- 2d 15h
- PRs com merge (30d)
- 27
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de github/github-mcp-server
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
github/github-mcp-server#3235 ·
-
enhancement
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
github/github-mcp-server#3042 · 2 comentários ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
github/github-mcp-server#3032 · 1 reação ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
github/github-mcp-server#2803 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
github/github-mcp-server#2740 ·
Todas as issues de github/github-mcp-server
Issues semelhantes
-
kind/bug needs-triage
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
matrixorigin/matrixone#29223 ·
-
needs-acceptance wg/data-plane-networking
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
vllm-project/semantic-router#4024 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
alexgorbatchev/dotfiles#107 ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 84/100