Golang implementation of the streaming MCP HTTP transport with sessions, auth and horizontal scaling
{
"mcpServers": {
"mcp-server-go": {
"command": "<see-readme>",
"args": []
}
}
}No install config available. Check the server's README for setup instructions.
Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Golang implementation of the streaming MCP HTTP transport with sessions, auth and horizontal scaling
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
MIT. View license →
Is it maintained?
Last commit 20 days ago. 2 stars.
Will it work with my client?
Transport: stdio, sse, http. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
No automated test available for this server. Check the GitHub README for setup instructions.
No known vulnerabilities.
This server is missing a description. Tools and install config are also missing.If you've used it, help the community.
Add informationHave you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Persistent memory using a knowledge graph
Privacy-first. MCP is the protocol for tool access. We're the virtualization layer for context.
Pre-build reality check. Scans GitHub, HN, npm, PyPI, Product Hunt — returns 0-100 signal.
Monitor browser logs directly from Cursor and other MCP compatible IDEs.
MCP Security Weekly
Get CVE alerts and security updates for Mcp Server Go and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Build Model Context Protocol servers that scale from a 20‑line stdio prototype to a horizontally scaled, OIDC‑protected streaming HTTP deployment — without rewriting business logic.
Go module: github.com/ggoodman/mcp-server-go
Add to your project:
go get github.com/ggoodman/mcp-server-go@latest
Browse documentation: https://pkg.go.dev/github.com/ggoodman/mcp-server-go
Minimum Go version: as declared in go.mod (currently 1.24). The module follows standard Go module semantic import versioning (no v2 path yet).
Below is a tiny CLI MCP server exposing a single vibe-checking tool. The tool demonstrates using sampling and elicitation. It also shows how a response can be constructed through a http.ResponseWriter-like API.
package main
import (
"context"
"fmt"
"log"
"github.com/ggoodman/mcp-server-go/mcpservice"
"github.com/ggoodman/mcp-server-go/sessions"
"github.com/ggoodman/mcp-server-go/sessions/sampling"
"github.com/ggoodman/mcp-server-go/stdio"
)
// Minimal args: none needed to start the interaction.
type VibeArgs struct{}
type VibePrompt struct {
Phrase string `json:"phrase" jsonschema:"minLength=3,description=How are you feeling?,title=Vibe"`
}
func vibeCheck(ctx context.Context, s sessions.Session, w mcpservice.ToolResponseWriter, r *mcpservice.ToolRequest[VibeArgs]) error {
el, ok := s.GetElicitationCapability()
if !ok {
return fmt.Errorf("elicitation capability not available in this session")
}
var prompt VibePrompt
// Below, the reference to prompt both documents the expected response shape
// and populates it when the user accepts the elicitation.
action, err := el.Elicit(ctx, "What's the vibe?", &prompt)
if err != nil {
return err
}
if action != sessions.ElicitActionAccept {
w.AppendText("the user is not feeling it")
w.SetError(true)
return nil
}
samp, ok := s.GetSamplingCapability()
if !ok {
return fmt.Errorf("sampling capability not available in this session")
}
// Sample host LLM for a single whimsical word (new ergonomic API).
res, err := samp.CreateMessage(ctx,
"Respond with short phrase, capturing the emotional vibe of the submitted message with a touch of whimsy.",
sampling.UserText(prompt.Phrase),
sampling.WithMaxTokens(50),
)
if err != nil {
return err
}
w.AppendBlocks(res.Message.Content.AsContentBlock())
if txt, ok := res.Message.Content.(sampling.Text); ok {
w.AppendText(txt.Text)
}
return nil
}
func main() {
tools := mcpservice.NewToolsContainer(
mcpservice.NewTool("vibe_check", vibeCheck, mcpservice.WithToolDescription("Herein lies the answer when the question is vibe.")),
)
server := mcpservice.NewServer(
mcpservice.WithServerInfo(mcpservice.StaticServerInfo("vibe-check-demo", "0.0.1")),
mcpservice.WithToolsCapability(tools),
mcpservice.WithInstructions(mcpservice.StaticInstructions("Your finger is on the pulse of the inter-webs. You can feel it. You can help others feel it too.")),
)
h := stdio.NewHandler(server)
if err := h.Serve(context.Background()); err != nil {
log.Fatal(err)
}
}
Upgrade path: swap the transport + host; your server value is unchanged and you layer in authorization.