Title: `add_issue_comment`, `update_issue`, and `get_issue` reject valid integer `issue_number` · Issue #2807 · github/github-mcp-server · GitHub
Open Graph Title: `add_issue_comment`, `update_issue`, and `get_issue` reject valid integer `issue_number` · Issue #2807 · github/github-mcp-server
X Title: `add_issue_comment`, `update_issue`, and `get_issue` reject valid integer `issue_number` · Issue #2807 · github/github-mcp-server
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 para...
Open Graph 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 o...
X 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 o...
Opengraph URL: https://github.com/github/github-mcp-server/issues/2807
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`add_issue_comment`, `update_issue`, and `get_issue` reject valid integer `issue_number`","articleBody":"### Summary\n\nThree 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.\n\n### Affected tools\n- `add_issue_comment`\n- `update_issue`\n- `get_issue`\n\n### Unaffected tools (for comparison, same session, same repo, same auth)\n- `create_issue` — succeeds (does not take `issue_number`)\n- `list_issues`, `search_issues` — succeed\n- `create_branch`, `create_or_update_file`, `push_files`, `create_pull_request` — all succeed, including calls with integer fields like `milestone`\n\n### Reproduction\n\n1. Any repo the caller can write issues on.\n2. Call, e.g.:\n ```json\n {\n \"tool\": \"add_issue_comment\",\n \"arguments\": {\n \"owner\": \"\u003cowner\u003e\",\n \"repo\": \"\u003crepo\u003e\",\n \"issue_number\": 11,\n \"body\": \"test\"\n }\n }\n ```\n3. Call fails. Retrying multiple times, including after fully reconnecting the MCP server, reproduces the failure.\n4. `create_issue` against the same repo in the same session succeeds, ruling out auth, permissions, and rate limiting.\n5. Reproduced across at least two independent sessions on the same day.\n\n### Expected\nComment is posted / issue is updated / issue is fetched, matching a direct REST call to `POST /repos/{owner}/{repo}/issues/{issue_number}/comments` (etc.).\n\n### Actual\nCall 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.\n\n[TODO fill in with error string on next occurrence]\n\n### Hypothesis\n\nThe 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:\n\n- A path-parameter substitution step stringifies the value before an internal validator runs.\n- A schema-validation layer runs *after* path substitution and sees a string where a `number` is required.\n\nAnywhere `issue_number` is interpolated into a URL is worth checking first.\n\n### Affected version\n- MCP server: GitHub MCP http server\n- Transport: stdio.\n- Client: custom provider\n\n[Please run ` docker run -i --rm ghcr.io/github/github-mcp-server ./github-mcp-server --version` and paste the output below](https://github.com/github/github-mcp-server/pkgs/container/github-mcp-server/993100275?tag=sha256-27bf6a6927e2a9b0d3c96e6689f6dd6dcd0cd801e59d1916f2c324703b84e1da.sig)\n### Workaround\nNone 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.\n","author":{"url":"https://github.com/chriszhang08","@type":"Person","name":"chriszhang08"},"datePublished":"2026-07-02T23:59:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/2807/github-mcp-server/issues/2807"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5b003293-ed0c-48c4-a96d-cc662b3607e9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E930:41EE4:122298E:18D74F5:6A5F186E |
| html-safe-nonce | 7a1fc6f2a2cb9137830d2c3eca97e7d7ac1eb6ea7d04f43ca79c1ad9e0b606de |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTMwOjQxRUU0OjEyMjI5OEU6MThENzRGNTo2QTVGMTg2RSIsInZpc2l0b3JfaWQiOiIxNzkzNDU4MTE1NTc0NzAwMTQyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6d8f5537346ce9b60e0af2c2fcfb84c5a5b4f61abea37c80d9caa111ce924fdf |
| hovercard-subject-tag | issue:4798989361 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/github-mcp-server/2807/issue_layout |
| twitter:image | https://opengraph.githubassets.com/69eb8d87134ffcabde28ccefb08158b1e881737df9bfd973684d827fddeb8b40/github/github-mcp-server/issues/2807 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/69eb8d87134ffcabde28ccefb08158b1e881737df9bfd973684d827fddeb8b40/github/github-mcp-server/issues/2807 |
| og:image:alt | 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 o... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | chriszhang08 |
| hostname | github.com |
| expected-hostname | github.com |
| None | bf8fa4b42b6d150def6175efb9b0f1ec8e9628d7229ee2bdf6e850e7bdad923e |
| turbo-cache-control | no-preview |
| go-import | github.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 942771284 |
| octolytics-dimension-repository_nwo | github/github-mcp-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 942771284 |
| octolytics-dimension-repository_network_root_nwo | github/github-mcp-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7debc3c6cd5de09c6e22b47a1b9982acb2aabb7b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width