Repository navigation
Closed
Labels
Description
🐹 Go Fan Report: modelcontextprotocol/go-sdk
Module Overview
Official Go SDK for the Model Context Protocol (client, server, transports, auth).
Current Usage in gh-aw
- Files: 66 Go files (~33 in
internal/server, 11 ininternal/mcp, 10 ininternal/middleware, 8 intestutil/mcptest, 4 integration, 1 launcher) - Key APIs:
StreamableClientTransport,CommandTransport,StreamableHTTPHandler/StreamableHTTPOptions,ServerOptions.SupportedProtocolVersions,MaxEventSize,Server.AddTool(validation bypass).
Research Findings
Pinned v1.8.0 is the latest release (published 2026-09-14). go list -m -u could not be run in this sandbox (permission denied), so the "no tagged update" conclusion comes from the GitHub releases API.
Recent Updates (v1.8.0)
- Resource-exhaustion hardening: JSON nesting limit,
MaxEventSizeon SSE/streamable clients,StdioTransport.MaxLineLength. ServerOptions.SupportedProtocolVersionsandServerOptions.SetCacheable(per-resultttlMs/cacheScope).- Stateful handler returns a JSON-RPC
-32022error for 2026-07-28 requests.MCPGODEBUGflagsplaintextstatefulrejectionandblockingcancelnotifywill be removed in v1.9.0. - Leak, deadlock and teardown fixes (Client.Connect, ServerSession, streamable Close DELETE).
Improvement Opportunities
🏃 Quick Wins
- The project already adopts
MaxEventSize(16 MiB) andSupportedProtocolVersions. Nothing urgent. - Confirm no
MCPGODEBUGflags are set anywhere (they disappear in v1.9.0).
✨ Feature Opportunities
- Evaluate
ServerOptions.SetCacheableso the gateway sets explicitcacheScope(e.g. non-public for DIFC-filtered list/read results) rather than the defaultpublic. This is potentially security-relevant for a filtering proxy. - Check whether
CommandTransportininternal/mcp/connection.gocan bound frame size (MaxLineLengthequivalent) for stdio backends.
📐 Best Practice Alignment
- Keep tracking upstream for a supported argument-validation bypass (
tool_registry_helpers.go).
🔧 General Improvements
- Before v1.9.x, review the removed
MCPGODEBUGflags and the async cancel-notification behavior against launcher shutdown tests.
Module Summary
| Field | Value |
|---|---|
| Module | github.com/modelcontextprotocol/go-sdk |
| Version | v1.8.0 |
| Repository | https://github.com/modelcontextprotocol/go-sdk |
| Latest Release | v1.8.0 |
| Last Reviewed | 2026-11-04 |
References
Recommendations
- Stay on v1.8.0. Before any upgrade, run
go test ./internal/mcp/ -run TestMaxRetriesSentinelCanary -vandgo test ./internal/server/ -run TestArgumentValidationBypassCanary -v. - Evaluate
SetCacheablefor secrecy-aware cache scopes.
Next Steps
Open a follow-up to investigate SetCacheable and stdio frame limits.
Generated by Go Fan. Cache-memory was not readable in this run, so round-robin state was not used. The SDK was picked per the mandated check.
References: §41790439688
Generated by Go Fan · copilot · auto · ~24 AIC · ⊞ 6.2K · ◷
- expires on Nov 11, 2026, 7:14 AM UTC
Reacted by Copilot
Activity