
Production Go MCP Server Template
Production-ready, dual-transport, zero-trust Model Context Protocol server starter template in Go.
🌟 The Five Production Pillars
Section titled “🌟 The Five Production Pillars”- Dual-Transport Ingress: A single HTTP multiplexer endpoint (
/sseand/) serves both modern Streamable HTTP and legacy Server-Sent Events (SSE). - Stateless Serverless Mode:
Stateless: trueinStreamableHTTPOptionsensures requests survive Cloud Run cold starts and container recycling without404 session not founderrors. - Zero-Trust OAuth 2.1: Supports RFC 7591 Dynamic Client Registration (DCR), Client ID Metadata Documents (CIMD), and PKCE S256 with an SSRF-safe connection dialer.
- Granular Access-Scoped Tools: Tools declare specific required scopes (
tools:read,admin:access). Generic type-safe decorators enforce authorization boundaries per tool before execution. - Sub-Millisecond Execution: Ephemeral auth codes use TTL stores during handshakes, while active tool queries validate stateless signed HMAC-SHA256 JWTs locally in memory.
📐 Ingress & Security Architecture
Section titled “📐 Ingress & Security Architecture”
🔌 Supported AI Assistants
Section titled “🔌 Supported AI Assistants”- Cursor (IDE): Connect over SSE with Bearer header authentication.
- Claude Desktop: Remote MCP configuration with auto-reconnect.
- OpenCode: Native OAuth 2.1 + CIMD dynamic login flow.
- Gemini Spark: Auto-registers via RFC 9728 and RFC 7591 DCR seamlessly.
- Antigravity Desktop (AGY 2.0): Native desktop MCP client with stream multiplexing.
- Antigravity CLI (
agy): CLI tool execution over stateless Streamable HTTP.