Repository navigation
Closed
Description
Summary
Upgrade the official Model Context Protocol Go SDK to v1.8.0 and add/support the stable MCP protocol revision 2026-07-28, while preserving compatibility with 2025-11-25 clients.
The official Go SDK now provides production-ready support for the stateless/sessionless protocol model and explicit server-side protocol version controls.
Primary source: https://github.com/modelcontextprotocol/go-sdk/releases/tag/v1.8.0
Motivation
Go SDK v1.7.0 introduced full support for MCP 2026-07-28; v1.8.0 adds important transport and security hardening, including:
- bounded JSON, SSE, stdio frame, request-body, and OAuth discovery/DCR input handling
- fixes for session leaks, deadlocks, and teardown hangs
ServerOptions.SupportedProtocolVersionsfor controlling advertised/negotiated versions- improved downgrade behavior when a stateful endpoint receives a
2026-07-28request - stronger OAuth discovery metadata validation
This should allow StackQL MCP to adopt the new revision through the official SDK rather than maintaining custom compatibility logic.
Proposed implementation
- Upgrade
github.com/modelcontextprotocol/go-sdkto v1.8.0. - Add a CLI/configuration option such as
--mcp-versionto select:2026-07-282025-11-25- automatic negotiation/default SDK behavior
- For Streamable HTTP using
2026-07-28, configureStreamableHTTPOptions.Stateless = true. - Use
ServerOptions.SupportedProtocolVersionsto restrict advertised versions where explicitly configured. - Preserve legacy initialization and negotiation behavior for older clients.
- Review current MCP functionality for features deprecated by
2026-07-28, particularly roots, sampling, and logging.
Acceptance criteria
- StackQL MCP builds and passes existing tests using Go SDK v1.8.0.
- A
2026-07-28client can discover and call StackQL tools over stateless Streamable HTTP. - Each stateless request carries and validates the required protocol/client metadata.
- Stateless responses do not rely on
Mcp-Session-Id; HTTPDELETEis not treated as session teardown. - A
2025-11-25client continues to connect and call tools successfully. - Automatic negotiation selects the highest mutually supported protocol revision.
- A stateful endpoint presented with
2026-07-28returns a protocol error that permits client downgrade. - Tests cover explicit version selection, automatic negotiation, downgrade behavior, and unsupported versions.
- Transport/input size limits introduced by v1.8.0 are reviewed and configured where appropriate.
- Documentation describes supported MCP versions and the behavior of
--mcp-version.
References
- Go SDK v1.8.0: https://github.com/modelcontextprotocol/go-sdk/releases/tag/v1.8.0
- Go SDK v1.7.0 / full
2026-07-28support: https://github.com/modelcontextprotocol/go-sdk/releases/tag/v1.7.0 - MCP
2026-07-28specification changelog: https://modelcontextprotocol.io/specification/2026-07-28/changelog
Metadata
Metadata
Assignees
Labels
No labels
Activity