mcp-go is a Go library for Model Context Protocol clients and servers. Its activity on November 2 and 3 adds request specific capability declarations and fixes how tool results and replayed events travel through the library. For engineers exposing catalog queries or ingestion controls through MCP, these changes deserve attention because they affect the contract between a caller and a data service.
Capability declarations follow the request context ¶
The captured window contains 14 commits on main, touching 51 files with 1,904 insertions and 148 deletions. The most recent change adds WithRequestClientCapabilities, which returns a context carrying a capability override. In client/protocol.go, request metadata construction reads that context and writes the supplied capabilities into _meta. The override replaces the client’s effective capabilities for requests using that context.
Replacement matters when a shared client acts for callers with different abilities. The added cases in client/protocol_negotiation_test.go start with a client declaring elicitation, then supply an override declaring sampling. The expected declaration contains the override alone, and an empty mcp.ClientCapabilities{} declares no capabilities. Without an override, the client keeps its existing declaration.
Consider a service that forwards requests from both an interactive operator and an unattended ingestion worker. The context now provides a place to describe the capabilities available for each request, provided the service passes it through to the client call. This behavior applies to protocol version 2026-07-28 and later; earlier versions declare capabilities during initialization. The tests explicitly check that a 2025-11-25 connection receives no capability metadata from the override, so callers need to account for the negotiated version. Handler availability still needs to match the declaration, since the new helper carries metadata through a context.
Structured results and reused values need precise contracts ¶
The schema validation change switches validators to RawArguments and RawStructuredContent. Both server/input_validation.go and server/output_validation.go appear among the changed files. For a data tool, these are useful places to review when the payload accepted by the handler and the payload checked against its schema appear to disagree. Exercise both directions with the actual JSON your adapter sends and returns.
A related tool result fix accepts structured results without a content field. A catalog lookup returning a structured object is a practical case to test, especially if application code assumes every result also carries content blocks. Review that assumption in the consumer alongside the library update, and keep assertions on the structured fields the next pipeline step requires. The activity puts mcp/tools.go at the top of the changed file list, with three commits touching it.
The notification decoding fix addresses another data correctness problem: omitted parameters when decoding into a reused value. A useful regression case decodes a notification with parameters, then one without parameters into the same Go value. The second notification must leave those parameters absent, rather than retaining data from the first message. Event consumers that reuse decode destinations should check this sequence, because stale fields can make a later event appear to carry data its sender never supplied.
Replay callbacks and transport wrappers preserve behavior ¶
The server now gives replay callbacks their own copy of each event. That change makes event ownership worth checking in code that annotates or transforms replayed messages. A focused application test can mutate an event inside its callback and inspect a subsequent replay for unintended changes. The commit summary establishes the copy behavior, but supplies no allocation measurements, so there is no basis here for a throughput claim.
Stream completion also gains an explicit regression check. The resumed stream test pins the expectation that a resumed stream closes after a live response. e2e/resumability_http_test.go is the relevant changed test file. For an integration test, assert both delivery of the response and completion of the stream; receiving the expected payload alone leaves the connection lifecycle unchecked.
Transport instrumentation receives a separate LoggingTransport forwarding fix. The wrapper now forwards RequiresLegacyProtocol and SetConnectionLostHandler, with the implementation in client/transport/logging.go. If production enables this wrapper while tests use the underlying transport directly, add coverage with logging enabled. Protocol selection and connection loss callbacks are behavior that the instrumented path needs to preserve.
What to watch ¶
- Confirm which release includes the commits before changing a dependency pin. This review covers captured activity on
main; the supplied snapshot does not identify a release containing the changes. - Test capability overrides against the protocol versions your callers negotiate. Include the default declaration, a replacement declaration, and an empty declaration. Keep the legacy initialization path in the same compatibility check.
- Prioritize regression fixtures for structured results without
content, reused notification values, and resumed streams that finish. These cases exercise the payload and lifecycle assumptions most likely to matter in a Go adapter serving data workflows.