[go-fan] Go Module Review: modelcontextprotocol/go-sdk #6222
Closed
Replies: 2 comments 1 reply
-
|
/plan |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
⚓ Avast! This discussion be marked as outdated by Go Fan. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
🐹 Go Fan Report: MCP Go SDK
The Model Context Protocol Go SDK is gh-aw's most critical dependency, and excellent news - we're using the latest version (v1.1.0) which was updated yesterday with significant improvements! This official SDK, maintained in collaboration with Google, is the foundation of gh-aw's entire MCP integration architecture.
Module Overview
The MCP Go SDK provides the core APIs for building MCP servers and clients in Go. It's an official, actively maintained SDK with:
Current Usage in gh-aw
gh-aw makes extensive use of the MCP SDK across multiple components:
Key APIs Used
NewServer,AddTool,NewStreamableHTTPHandlerNewClient,Connect,CallTool,ListToolsStdioTransport,CommandTransport,StreamableClientTransportArchitecture Pattern
gh-aw uses a clever subprocess isolation pattern where the MCP server spawns CLI subprocesses for each tool invocation, ensuring GitHub tokens and secrets remain isolated from the MCP server process.
Research Findings
Recent Updates (v1.1.0 - Released Oct 30, 2025)
The SDK just received major updates yesterday (Dec 12, 2025) including:
New Capabilities API (Hello from Claude #713 - merged yesterday!)
ServerOptions.CapabilitiesandClientOptions.CapabilitiesListChanged: falseForward-Compatible API ([claude-test] Multi-commit test from Claude #718)
CloseSSEStreamnow uses args struct for future extensibilityPerformance & Reliability
Security
Operational Features
ServerOptions.Loggerfor server-side loggingStreamableHTTPOptions.Loggerfor HTTP transport loggingStreamableHTTPOptions.SessionTimeoutfor idle session cleanupStreamableHTTPOptions.EventStorefor stream resumption controlIOTransportfor flexible I/O scenariosBreaking Changes
Best Practices from Maintainers
Improvement Opportunities
✨ Feature Opportunities
🏃 Quick Win #1: Adopt New Capabilities API
Priority: HIGH
Files:
pkg/cli/mcp_server.go:105,pkg/gateway/gateway.go:85Current:
Improved:
Benefits:
🏃 Quick Win #2: Add Server-Side Logging
Priority: MEDIUM
Files:
pkg/cli/mcp_server.go,pkg/gateway/gateway.goImplementation:
Benefits:
🏃 Quick Win #3: Configure Session Timeouts
Priority: MEDIUM
Files:
pkg/cli/mcp_server.go:666,pkg/gateway/gateway.go:94Current:
Improved:
Benefits:
📐 Best Practice Alignment
✅ Stream Resumption (Already Aligned!)
gh-aw correctly uses
nilforStreamableHTTPOptions, which now properly disables stream resumption by default in v1.1.0. No action needed!Tool handlers could benefit from checking
ctx.Done()before long-running operations to properly handle client disconnections.🔧 General Improvements
1. Test Latest API Changes
Priority: HIGH
Action items:
nilServerOptions still works2. Monitor SDK Evolution
Recommendations
Immediate Actions (This Sprint)
Near-Term Actions (Next Sprint)
Long-Term Actions
Testing Notes
Key areas to test:
niloptions (default behavior)Security Considerations
Next Steps
The gh-aw team should:
Module summary saved to: specs/mods/modelcontextprotocol-go-sdk.md
Module Version: v1.1.0 (Latest - Up to date!)
Last SDK Update: December 12, 2025 (yesterday!)
Review Date: December 12, 2025
Beta Was this translation helpful? Give feedback.
All reactions