Repository navigation
mcp-go-sdk-1.8.0-and-protocol-version-pin - #796
Merged
Merged
Conversation
general-kroll-4-life
approved these changes
Sep 27, 2026
…ribe_method The MCP describe_resource tool wrapped DESCRIBE provider.service.resource, which reports the schema of one select method resolved without WHERE parameters, while a SELECT routes by its parameters and can land on a method with a different shape. describe_method is the exact contract (inputs with param_type, output fields) for the method a query routes to, so it is now the single column source. - Remove the tool registration, Backend.DescribeResource and its implementations, the interrogator SQL builder and the description file. The SQL DESCRIBE statement is unchanged. - Rewrite the discovery instructions as a numbered drill-down ending in describe_method; sharpen the describe_method and list_methods descriptions; repoint dialect rules, error recovery, prompts and the deploy-stack resource at describe_method output fields. - Docs: drop the tool from docs/mcp.md, the package README and the bundle README; the docs tool table now also lists the query library tools. - Tests: unit test asserting the tool is not published; robot list-tools scenario asserts its absence and describe_method's presence; the describe-resource robot scenario is removed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #784.
Summary
github.com/modelcontextprotocol/go-sdkv1.7.0 to v1.8.0. The build and every existing MCP unit test pass on the new SDK with no code changes.server.protocol_versioninmcp.config, overridden by a new--mcp.protocol.versionflag (same pattern as--mcp.log.format).auto(default, or absent): unchanged behaviour, every SDK revision is advertised and negotiated per client.2026-07-28: only that revision is advertised (ServerOptions.SupportedProtocolVersions) and stateless Streamable HTTP is implied, since the SDK serves that revision over HTTP only without sessions. A legacyinitializeis answered with2025-11-25, the SDK's cue for the client to disconnect.2025-11-25(or any older revision): that revision and everything before it. A2026-07-28request gets the SDK's-32022UnsupportedProtocolVersionerror listing the advertised revisions so the client can renegotiate; older handshake clients keep their own revision.NewServerpanic is never reached.docs/mcp.mdgains "Pinning the revision (--mcp.protocol.version)" and "Transport limits and deprecated features (SDK v1.8.0)", and the Streamable HTTP notes now describe the v1.8.0 stateful rejection (JSON-RPC-32022on a 400 instead of a plain-text 400) and the 405 onGET/DELETEin stateless mode.Design choices
Config/ServerConfigDTO (deserialised from JSON/YAML, so a public field is consistent with its neighbours such asstateless); the mapping to SDK options is behindConfig.AdvertisedProtocolVersions()andConfig.IsStateless(), soserver.goonly reads accessors.2026-07-28stands alone rather than acting as a ceiling over everything, because a ceiling of the newest revision would be identical toautoand the option would have no meaning..robotfile;stackql_context.pyis untouched.Test plan
TestProtocolVersionConfig(ceiling mapping, implied stateless, validation of unknown values, wire form beside the legacyread_onlyshim);TestPinnedLegacyRevision_RejectsCurrentRevisionWithDowngradeError,TestPinnedCurrentRevision_ServesCurrentAndAnswersLegacyWithNewestHandshake,TestAutoRevision_ServesBothLifecyclesover the raw JSON-RPC connection.Mcpsuite): two new servers, 9928 pinned to2026-07-28via the flag with nostatelesskey (safe mode) and 9929 pinned to2025-11-25viamcp.config(stateful), plus six new scenarios:server/discoverlists only2026-07-28, no session id,DELETEis 405, gated write via the input-required round tripinitializeon 9928 answered with2025-11-25, no session issued-32022downgrade error on 9929 for a current-revision request, while a2025-06-18client keeps its revision on a sessionMCP HTTP Stateful Server Negotiates Current Client Downscenario now asserts the-32022payload.mcp_stdio_client.pygains aprotocol_versionpin, decodes JSON-RPC error bodies on HTTP 400, and probesDELETE.golangci-lint(CI-pinned 2.5.0) clean, Mcp robot suite 76/76 in WSL.Also in this PR:
describe_resourceretired as an MCP toolThe
describe_resourcetool wrappedDESCRIBE provider.service.resource, which reports the schema of the one select method resolved without WHERE parameters (GetSelectableObjectSchema), while a SELECT routes by its parameters and can land on a method with a different response shape.describe_methodis the exact contract for the method a query routes to (inputs withparam_type,outputfields), so it is now the single column source and the tool set islist_providers/list_services/list_resources/list_methods/describe_method/run_*. The SQLDESCRIBEstatement is unchanged; only MCP tooling is touched.Backend.DescribeResourceand its implementations, the interrogator SQL builder and the tool description file.describe_method, sharpened thedescribe_methodandlist_methodsdescriptions, and repointed the dialect rules, error recovery, prompts and the deploy-stack resource atdescribe_methodoutput fields.docs/mcp.md(the tool table now lists 15 tools, including the query library pair it was missing), package README, bundle README.TestRegistration_DescribeResourceRetired; the robot list-tools scenario asserts the tool is absent anddescribe_methodpresent; the describe-resource robot scenario is removed. Unit tests, lint and the Mcp robot suite are green locally; CI covers the combined branch.Compatibility: clients holding a cached tool list get a tool-not-found error for
describe_resource; anenabled_toolsallowlist naming it is ignored.Not in this PR
describe_resourceas a tool.packaging/mcpb/gois a separate client-only module and still pins go-sdk v1.6.1.--mcp.protocol.versionrows.🤖 Generated with Claude Code