Skip to content

Decouple Go SDK minimum version from runtime binary #8

@msilverblatt

Description

@msilverblatt

Problem

The Go SDK (sdk/go/protomcp) currently requires Go 1.25+ in its go.mod, but the SDK code itself only uses standard Go features that would compile with Go 1.21+.

The 1.25 requirement is inherited because:

  1. sdk/go/go.mod has replace github.com/msilverblatt/protomcp => ../..
  2. The root module requires Go 1.25 (because modelcontextprotocol/go-sdk v1.4.1 requires it)
  3. Go's module system requires the child version >= the replaced module's version

The root module legitimately needs Go 1.25 (it uses range over iter.Seq from the MCP SDK). But the SDK module that users go get into their projects doesn't need any of that.

Proposed Solution

Decouple the SDK's protobuf dependency from the root module:

  • The SDK currently imports gen/proto/protomcp from the root module for protobuf types
  • Instead, the SDK should have its own copy of the generated types (or a shared lightweight proto module with a lower Go version requirement)
  • Remove the replace directive from sdk/go/go.mod
  • Set the SDK's go directive to the actual minimum version its code requires

Impact

Users running Go 1.22-1.24 would be able to use the protomcp Go SDK. The pmcp binary (distributed via Homebrew) is unaffected since users never compile it themselves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions