Repository navigation
Description
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.
Activity
rpelevin commentedon Jul 3, 2026
This looks like an operation-identity boundary bug, not just a parameter type mismatch.
The invariant I would want is:
Tests I would add:
That keeps MCP tool schemas honest while making issue mutations auditable before any GitHub write is attempted.
Boundary: architecture and conformance feedback only; no claim about GitHub/MCP Server alignment, implementation correctness, acceptance, partnership, integration, customer interest, official alignment, GitHub MCP usage, or Neura usage.
fix(issues): rebase native integer issue_number validation onto main
fix(issues): rebase native integer issue_number validation onto main
CAOShurong commentedon Aug 24, 2026
Verified against current
main— this appears to be already fixed.I built the server from
main(64a49f3, go1.26.7) and drove it over stdio JSON-RPC with a real token:issue_read(the modern replacement ofget_issue) with"issue_number": 2807passed as a JSON integer returns the issue normally — no parameter error.RequiredInt→toIntinpkg/github/params.gonow accepts bothfloat64and numeric-string representations and rejects NaN/Inf/fractional/out-of-range values, with tests covering the numeric-string path.The reporter's hypothesis about URL-path templating was reasonable, but the actual root cause looks like the pre-refactor parameter handling: since the params-helper refactor (commit
21c5a6f, which introducedpkg/github/params.gowith the toleranttoInt), integer inputs are coerced correctly on all three tools named here. Note the tool surface has also changed:get_issue/update_issueare now the method-parameterizedissue_read/issue_write.Suggest closing as fixed; happy to re-check with a specific version if anyone still reproduces this on a release built after 2026-08-17.
fix(params): accept native integer types for numeric tool parameters