Title: Protocol-gated tools (delete_repository) are listed based on the client's requested protocolVersion string, not the negotiated version · Issue #3763 · github/github-mcp-server · GitHub
Open Graph Title: Protocol-gated tools (delete_repository) are listed based on the client's requested protocolVersion string, not the negotiated version · Issue #3763 · github/github-mcp-server
X Title: Protocol-gated tools (delete_repository) are listed based on the client's requested protocolVersion string, not the negotiated version · Issue #3763 · github/github-mcp-server
Description: Describe the bug delete_repository is meant to be available only to sessions on protocol ≥ 2026-07-28 with form elicitation. The availability check reads req.ProtocolVersion(). For a session started with initialize, that returns the vers...
Open Graph Description: Describe the bug delete_repository is meant to be available only to sessions on protocol ≥ 2026-07-28 with form elicitation. The availability check reads req.ProtocolVersion(). For a session starte...
X Description: Describe the bug delete_repository is meant to be available only to sessions on protocol ≥ 2026-07-28 with form elicitation. The availability check reads req.ProtocolVersion(). For a session starte...
Opengraph URL: https://github.com/github/github-mcp-server/issues/3763
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Protocol-gated tools (delete_repository) are listed based on the client's requested protocolVersion string, not the negotiated version","articleBody":"### Describe the bug\n\n`delete_repository` is meant to be available only to sessions on protocol ≥ `2026-07-28` with form elicitation. The availability check reads `req.ProtocolVersion()`. For a session started with `initialize`, that returns the version the **client requested** (`InitializeParams.ProtocolVersion`), not the version the server answered. The comparison is also a plain string compare. As a result:\n\n- A client that requests `2026-07-28` is negotiated down to `2025-11-25` (deliberate in go-sdk, since `initialize` is deprecated in 2026-07-28), yet `tools/list` includes `delete_repository`.\n- Any string that sorts after `2026-07-28`, such as `zzz`, does the same.\n\nImpact is low. By code reading (not tested), `--read-only` should still remove the tool and deletion still requires the elicitation confirmation. But the listed tool set doesn't match the protocol the session actually speaks.\n\nUpstream context: go-sdk issue modelcontextprotocol/go-sdk#1258 (closed 2026-11-03 by go-sdk PR #1266) fixed the same requested-vs-negotiated confusion *inside* the SDK, through an unexported `ServerSession.protocolVersion()`. The public `ServerRequest.ProtocolVersion()` on go-sdk main still returns `InitializeParams.ProtocolVersion`. That fix isn't in a go-sdk release yet (latest v1.8.0, which this repo pins), so a go-sdk bump alone will not change this server's behaviour.\n\nCode (main 99d6d650, unchanged since v2.1.0): `pkg/inventory/tool_availability.go:120,136,175` (`req.ProtocolVersion()`), `:148-151` (`protocolVersion >= minimum`, string compare). go-sdk v1.8.0 `mcp/shared.go:674-686` (`ServerRequest.ProtocolVersion`).\n\n### Affected version\n\nv2.1.0 (image `sha256:f6056fc1…0f8a`, commit 4bcdcdf8) and main nightly (image `sha256:48bc16d0…338f`, revision 99d6d650). stdio, `--toolsets=all`.\n\n### Steps to reproduce the behavior\n\n1. `initialize`:\n ```json\n {\"protocolVersion\":\"2026-07-28\",\"capabilities\":{\"elicitation\":{\"form\":{}}},\"clientInfo\":{\"name\":\"t\",\"version\":\"0\"}}\n ```\n The result has `protocolVersion: \"2025-11-25\"`. `tools/list`: 92 tools, including `delete_repository`.\n2. Same with `\"protocolVersion\":\"zzz\",\"capabilities\":{\"elicitation\":{}}`. Negotiated `2025-11-25`, 92 tools, including `delete_repository`.\n3. Same with `\"protocolVersion\":\"2025-11-25\"` and form elicitation: 91 tools, no `delete_repository`.\n4. `\"2026-07-28\"` without an elicitation capability: 91 tools, no `delete_repository`.\n\n### Expected vs actual behavior\n\nExpected: availability follows the negotiated version (`2025-11-25` in steps 1 and 2), so `delete_repository` is not listed. Unknown version strings are not treated as newer.\n\nActual: the requested string decides, and `zzz` counts as newer than `2026-07-28`.\n\nSuggested fix: gate on the negotiated version. Either have go-sdk expose it, or make `ServerRequest.ProtocolVersion()` return it (a follow-up to go-sdk #1266). Meanwhile, when there is no per-request `_meta` version, cap the session value to the `initialize` result's version. Compare against a list of known versions, not lexically.\n\n### Logs\n\n```\nrequested 2026-07-28 + elicitation.form -> negotiated 2025-11-25, tools/list 92, delete_repository listed\nrequested zzz + elicitation -> negotiated 2025-11-25, tools/list 92, delete_repository listed\nrequested 2025-11-25 + elicitation.form -> negotiated 2025-11-25, tools/list 91\nrequested 2026-07-28, no elicitation -> negotiated 2025-11-25, tools/list 91\n```\nSame on v2.1.0 and main.\n\nFound during an independent audit of v2.1.0 on a throwaway org and private test repo. Prepared with AI assistance (Claude Code); reproduced by two independent test runs before filing.\n","author":{"url":"https://github.com/rafe-walker","@type":"Person","name":"rafe-walker"},"datePublished":"2026-11-09T06:15:09Z","url":"https://github.com/github/github-mcp-server/issues/3763"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:32618dd7-645d-6fe9-1890-a98a45374bd5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E1F4:32E0F9:297CE5:36122A:6B06149F |
| html-safe-nonce | 9847a72eba14ebd5f72ccaed2422f70e341fadb4b953c5e7496134888ed87811 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMUY0OjMyRTBGOToyOTdDRTU6MzYxMjJBOjZCMDYxNDlGIiwidmlzaXRvcl9pZCI6IjM2NjAzNTUxMTkyNTU3ODY2NTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5e89ba53aeb88d068da52ea034f3c22b1a103e8399b494dbbfa75f434f402a9b |
| hovercard-subject-tag | issue:6281007438 |
| 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/3763/issue_layout |
| twitter:image | https://opengraph.githubassets.com/278e66c59005ee4aa03e5f33c0e907f33b5fc24ac07ae103d810252e301b2337/github/github-mcp-server/issues/3763 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/278e66c59005ee4aa03e5f33c0e907f33b5fc24ac07ae103d810252e301b2337/github/github-mcp-server/issues/3763 |
| og:image:alt | Describe the bug delete_repository is meant to be available only to sessions on protocol ≥ 2026-07-28 with form elicitation. The availability check reads req.ProtocolVersion(). For a session starte... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rafe-walker |
| hostname | github.com |
| expected-hostname | github.com |
| None | 97d4714e567728e1f85f88b0cf68c89f0f8a3dc41e8869af7aeb8195ad990374 |
| 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 | 866f202ebf7ac5aff8f633417d9fd8a53818a977 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width