Skip to content

Update MCP Go SDK to v1.8.0 and support protocol 2026-07-28 #784

Closed

Description

@jeffreyaven

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.SupportedProtocolVersions for controlling advertised/negotiated versions
  • improved downgrade behavior when a stateful endpoint receives a 2026-07-28 request
  • 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-sdk to v1.8.0.
  • Add a CLI/configuration option such as --mcp-version to select:
    • 2026-07-28
    • 2025-11-25
    • automatic negotiation/default SDK behavior
  • For Streamable HTTP using 2026-07-28, configure StreamableHTTPOptions.Stateless = true.
  • Use ServerOptions.SupportedProtocolVersions to 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-28 client 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; HTTP DELETE is not treated as session teardown.
  • A 2025-11-25 client continues to connect and call tools successfully.
  • Automatic negotiation selects the highest mutually supported protocol revision.
  • A stateful endpoint presented with 2026-07-28 returns 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

Activity

  1. self-assigned this
    on Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions