A simple and reusable MCP (Model Context Protocol) server framework written in Go with SSE and STDIO transport support
{
"mcpServers": {
"mcp-server-framework": {
"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.
A simple and reusable MCP (Model Context Protocol) server framework written in Go with SSE and STDIO transport support
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 15 days ago.
Will it work with my client?
Transport: stdio. 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.
Dynamic problem-solving through sequential thought chains
A Model Context Protocol server for searching and analyzing arXiv papers
An open-source AI agent that brings the power of Gemini directly into your terminal.
The official Python SDK for Model Context Protocol servers and clients
MCP Security Weekly
Get CVE alerts and security updates for Mcp Server Framework and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A simple, reusable Model Context Protocol (MCP) server framework written in Go. This framework supports multiple transport mechanisms including HTTP Streams (MCP-compliant), SSE (Server-Sent Events), and STDIO transports and can be used as both a library and a standalone executable.
# HTTP Streams transport (default)
go run cmd/mcp-server/main.go -addr=8080
# SSE transport
go run cmd/mcp-server/main.go -transport=sse -addr=8080
# STDIO transport
go run cmd/mcp-server/main.go -transport=stdio
package main
import (
"context"
"encoding/json"
"log"
"github.com/protobomb/mcp-server-framework/pkg/transport"
"github.com/protobomb/mcp-server-framework/pkg/mcp"
)
func main() {
// Create transport (HTTP Streams, SSE, or STDIO)
transport := transport.NewHTTPStreamsTransport(mcp.NewServerWithoutTransport(), transport.HTTPStreamsTransportOptions{})
// transport := transport.NewSSETransport(":8080")
// transport := transport.NewSTDIOTransport()
// Create server
server := mcp.NewServer(transport)
// Register a custom handler
server.RegisterHandler("greet", func(ctx context.Context, params json.RawMessage) (interface{}, error) {
var greetParams struct {
Name string `json:"name"`
}
if len(params) > 0 {
json.Unmarshal(params, &greetParams)
}
return map[string]string{
"message": "Hello, " + greetParams.Name + "!",
}, nil
})
// Start server
ctx := context.Background()
if err := server.Start(ctx); err != nil {
log.Fatal(err)
}
// Keep running...
select {}
}
package main
import (
"context"
"log"
"github.com/openhands/mcp-server-framework/internal/transport"
"github.com/openhands/mcp-server-framework/pkg/client"
"github.com/openhands/mcp-server-framework/pkg/mcp"
)
func main() {
// Create transport (STDIO or HTTP)
transport := transport.NewSTDIOTransport("./mcp-server")
// transport := transport.NewHTTPTransport("http://localhost:8080")
// Create client
client := client.NewClient(transport)
defer client.Close()
ctx := context.Background()
// Initialize connection
clientInfo := mcp.ServerInfo{
Name: "my-client",
Version: "1.0.0",
}
result, err := client.Initialize(ctx, clientInfo)
if err != nil {
log.Fatal(err)
}
log.Printf("Server: %s v%s", result.ServerInfo.Name, result.ServerInfo.Version)
// List available tools
tools, err := client.ListTools(ctx)
if err != nil {
log.Fatal(err)
}
log.Printf("Available tools: %d", len(tools.Tools))
// Call a tool
params := map[string]interface{}{
"message": "Hello from client!",
}
response, err := client.CallTool(ctx, "echo", params)
if err != nil {
log.Fatal(err)
}
log.Printf("Tool response: %v", response)
}
# Build everything
make build-both
# Test the client
make run-client
# Try the interactive demo
make demo
# Run all tests
make test
go get github.com/openhands/mcp-server-framework
docker pull ghcr.io/openhands/mcp-server-frame
... [View full README on GitHub](https://github.com/Protobomb/mcp-server-framework#readme)