Repository navigation
v0.2.0
FlexMCP is a high-performance Go implementation of the Model Context Protocol, tuned for busy servers that answer many complex tool calls. It began as a fork of mark3labs/mcp-go v1.1.1 and has since been largely reworked. This is its first release with notes.
Highlights
- Both protocol eras. The 2026-07-28 revision first, and the earlier revisions a client may still open with
initialize. The server is stateless: sessions, the GET stream, resumption, the event store, server-initiated requests and the HTTP+SSE server transport are gone. - Closer to the specification. The server was checked against the 2026-07-28 specification requirement by requirement. Request ids are handled exactly,
Originis validated, and OAuth keeps the MUSTs: HTTPS-only authorization servers, PKCE on by default, and a token sent only to its own server. - Fast and lean.
_metaand a tool call's arguments are decoded in one pass, input is validated without a second decode, header bindings are read once, andServerTool.ArgumentsOnDemandlets a tool skip building the arguments map. In our benchmarks a single in-process tool call is served up to 3 times faster than with mcp-go and up to 14 times faster than with the official Go SDK, with less than half of mcp-go's allocations (benchmarks on two machines). - Hardened. Bounded request bodies, HTTP timeouts, DNS-rebinding checks, bounded task lifetimes, and a typed-nil handler error answered instead of a panic.
- Upstream fixes. Fixes from mcp-go are ported by hand, through upstream's
mainafter v1.3.0, each commit naming the pull request it ports.
Upgrading from mcp-go
- The module path is
github.com/pbednarcik/flexmcp; the OpenTelemetry adapter is its own module,github.com/pbednarcik/flexmcp/otel. - Some client APIs and behaviours changed: read Client changes and Request ids and progress tokens first.
- The default client name in
clientInfois nowflexmcp.
Install
go get github.com/pbednarcik/flexmcp@v0.2.0
go get github.com/pbednarcik/flexmcp/otel@v0.2.0