`add_issue_comment`, `update_issue`, and `get_issue` reject valid integer `issue_number`
まだ誰も着手していません。
評価
調査の方向性
add_issue_comment、update_issue、get_issue の実装とリクエスト検証パスから始め、issue_number の URL パスへの補間に焦点を当てます。整数を指定した呼び出しを再現し、milestone のような正常に機能する整数パラメーターと比較します。完了とは、issue_number の整数値が検証を通過して対応する GitHub REST エンドポイントに到達し、3 つすべてのツールに回帰テストのカバレッジがあることです。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Go
- スター
- 33.1k
- フォーク
- 5k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 27
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/github-mcp-server のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
github/github-mcp-server#3235 ·
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
github/github-mcp-server#3042 · コメント 2 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/github-mcp-server#3032 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
github/github-mcp-server#2803 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
github/github-mcp-server#2740 ·
github/github-mcp-server の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
TheManticoreProject/Manticore#1383 ·
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelcontextprotocol/registry#1654 ·