Skip to content

Transition to Official Go Implementation #44

Closed
8 of 8 issues completed
Closed

Description

@erikist

https://github.com/orgs/modelcontextprotocol/discussions/224#discussioncomment-12730162 -- looks like the Go team is working on creating an official MCP implementation -- we will need to transition that when they are ready. Nothing is out yet, though

Activity

  1. erikist commented on May 15, 2025

    @erikist
    ContributorAuthor
  2. erikist commented on May 15, 2025

    @erikist
    ContributorAuthor

    Going to create a long term release branch for this -- official-go-mcp

  3. erikist commented on Oct 8, 2026

    @erikist
    ContributorAuthor

    🔍 Plan (Claude, on behalf of @erikist). The migration target is github.com/modelcontextprotocol/go-sdk v1.8.0, the stable official SDK (it requires Go 1.25). The work lands as small PRs on main, and release-please cuts 0.3.0. These sub-issues are in the "v0.3.0: official Go MCP SDK" milestone, and dependencies are set:

    # What Blocked by
    #85 Golden-file test for generated code
    #86 Remove the stale snapshot and hand-written example; mcp-vibe uses the generated code (part of #46)
    #87 End-to-end test: fake gRPC backend plus an in-process MCP client, written against today's output #86
    #88 JSON Schema from proto descriptors, protojson-compatible
    #89 The migration (feat!) #85, #87, #88
    #90 CI: fail when generated examples are out of date #85
    #91 Docs and 0.3.0 upgrade notes #89

    Key decisions:

    • Schemas from descriptors. The official SDK validates arguments against each tool's input schema, and mark3labs never did. Today's schemas nest arguments under the message name while the handler reads them from the top level, and they drop repeated, enum and most numeric fields. So schemas are built from the proto descriptors to match exactly what protojson.Unmarshal accepts (feat: generate JSON Schema for tool inputs from proto descriptors (protojson-compatible) #88).
    • Tests first. The tests land before the migration, so it can be checked against current behaviour.

    The work will be done by an sf-factory agent factory, with PRs reviewed and approved by a human. Draft #74 (against the pre-release x/tools/internal/mcp) is superseded; its typed-handler idea carries into #89.

  4. erikist commented on Oct 8, 2026

    @erikist
    ContributorAuthor

    🔍 Done (Claude, on behalf of @erikist). Generated servers now use the official github.com/modelcontextprotocol/go-sdk v1.8.0, and mark3labs is gone. Every PR was written by an sf-factory agent factory and reviewed before merge.

    Issue PR What
    #86 #94 Removed the stale snapshot and hand-written example; mcp-vibe runs on generated code
    #85 #96 Golden-file test of generated code (no protoc needed)
    #87 #95 End-to-end test: fake gRPC backend plus an in-process MCP client
    #90 #97 CI fails when generated examples are stale. The toolchain is pinned, including Go 1.27.1, which turned out to cause the comment-format drift
    #88 #98 JSON Schema from proto descriptors, protojson-compatible. Covers recursion, NaN/Infinity and Any, and was validated against a real go-sdk server
    #89 #99 The migration (feat!), with a BREAKING CHANGE footer
    #100 #101 Comment escaping in descriptions and schemas
    #91 #102 README and CONTRIBUTING: official-SDK wiring (stdio and Streamable HTTP), how arguments map, and 0.2.x → 0.3.0 upgrade notes

    Behaviour changes for users:

    • Schemas: tool input schemas now accurately describe the request message, and the SDK validates arguments against them.
    • Arguments and results: both are protojson (lowerCamel names).
    • Errors: gRPC errors come back as isError results, with the status code.

    The release PR, #84 (0.3.0), is ready for a human to cut. #93 tracks restoring 1 required approval on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions