`add_issue_comment`, `update_issue`, and `get_issue` reject valid integer `issue_number`
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
Línea de trabajo
Comienza con las implementaciones y las rutas de validación de solicitudes de add_issue_comment, update_issue y get_issue, centrándote en la interpolación de issue_number en las rutas URL. Reproduce las llamadas con un entero y compáralas con un parámetro entero funcional como milestone. Se considera terminado cuando los valores enteros de issue_number pasan la validación y llegan a los endpoints REST de GitHub correspondientes, con cobertura de regresión para las tres herramientas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 33.1k
- Forks
- 5k
- Merge medio
- 2 d 15 h
- PR fusionados (30 d)
- 27
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de github/github-mcp-server
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
github/github-mcp-server#3235 ·
-
enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
github/github-mcp-server#3042 · 2 comentarios ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
github/github-mcp-server#3032 · 1 reacción ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
github/github-mcp-server#2803 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
github/github-mcp-server#2740 ·
Todos los issues de github/github-mcp-server
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
TheManticoreProject/Manticore#1383 ·
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
handle worker groups migrations Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
modelcontextprotocol/registry#1654 ·