`add_issue_comment`, `update_issue`, and `get_issue` reject valid integer `issue_number`
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Bắt đầu với các phần triển khai và các luồng xác thực request của add_issue_comment, update_issue và get_issue, tập trung vào việc nội suy issue_number vào các đường dẫn URL. Tái hiện các lệnh gọi với một số nguyên và so sánh chúng với một tham số số nguyên đang hoạt động như milestone. Được xem là hoàn tất khi các giá trị issue_number dạng số nguyên vượt qua bước xác thực và đến được các endpoint GitHub REST tương ứng, với phạm vi kiểm thử hồi quy cho cả ba công cụ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Go
- Star
- 33.1k
- Fork
- 5k
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 27
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/github-mcp-server
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
github/github-mcp-server#3235 ·
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
github/github-mcp-server#3042 · 2 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/github-mcp-server#3032 · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
github/github-mcp-server#2803 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
github/github-mcp-server#2740 ·
Tất cả issue của github/github-mcp-server
Issue tương tự
-
Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OpenNSW/nsw-srilanka#497 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
milvus-io/birdwatcher#545 ·
-
kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
kubernetes-sigs/prow#953 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
caddyserver/caddy#8046 ·