Skip to content

Migrate from mark3labs/mcp-go to the official MCP Go SDK #219

Open

Description

@danbarr

mkp is built on github.com/mark3labs/mcp-go. The official SDK, github.com/modelcontextprotocol/go-sdk, is maintained alongside the MCP specification, and gofetch already uses it. Moving to the official SDK keeps us on the reference implementation as the spec evolves and aligns our MCP servers on one SDK.

mkp has the largest mcp-go surface of our servers, so this needs more than swapping tool builders:

  • Tool definitions and handlers for all five tools (pkg/mcp/*_resource.go, tools.go, annotations.go), plus the mcp.ParseString/GetInt-style argument parsing in each handler.
  • Middleware. The timeout wrapper (pkg/mcp/middleware.go) and the rate limiter (pkg/ratelimit/ratelimit.go) are mcp-go ToolHandlerMiddleware. They need equivalents in the go-sdk middleware model.
  • Identity propagation. Impersonation extracts the JWT through WithHTTPContextFunc/WithSSEContextFunc (pkg/mcp/server.go). The go-sdk needs a way to get request headers into tool handlers.
  • Resources. Resource templates and the cluster resources registered at startup (pkg/mcp/read_resource.go, server.go).
  • Transports. Stateless Streamable HTTP and SSE. This would be a good time to decide whether to keep SSE at all, since the spec deprecates it.
  • Tests. Most of pkg/mcp and pkg/ratelimit tests construct mcp-go request types directly.

Acceptance: same tools, schemas, annotations, and rate-limit/impersonation behavior, verified against both 2026-07-28 and older protocol clients.

Activity

  1. added
    needs-triage
    on Nov 19, 2026
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

    needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions