trpc -go
Go implementation of the Model Context Protocol (MCP) with comprehensive Streamable HTTP, STDIO, and SSE support.
claude mcp add --transport stdio trpc-group-trpc-mcp-go docker run -i trpc-group/trpc-mcp-go:latest \ --env MCP_PORT="Default port inside container (adjust if needed)" \ --env MCP_LOG_LEVEL="info"
How to use
This MCP server provides a Go implementation of the Model Context Protocol (MCP) with streaming HTTP support. It exposes a Streamable HTTP transport (recommended) that allows clients to send JSON-RPC requests over HTTP with optional Server-Sent Events (SSE) for real-time updates, as well as a legacy SSE transport for older MCP clients. Tools can be registered and invoked with structured parameters, and responses can come as JSON or streamed content depending on the request. The server supports session management, progress notifications, and resource handling (text and binary) via RESTful interfaces, making it suitable for web services, multi-client deployments, and integration with web frontends or other services.
To use, run the MCP server and connect a client (Go, TS, Python, etc.) using the Streamable HTTP transport. You can initialize the session, list available tools, and call a tool with the appropriate parameters. If you need long-running operations or real-time feedback, enable SSE streaming to receive progress updates and results as events rather than waiting for a single JSON payload.
How to install
Prerequisites:
- Docker or native Go tooling available on your system
- If using Docker, Docker daemon must be running
- Optional: Go installed if you plan to build from source instead of using a container
Installation steps (Docker-based):
-
Pull and run the MCP server container (example): docker run -i trpc-group/trpc-mcp-go:latest
-
If you prefer to build from source (Go):
- Ensure Go is installed (https://golang.org/dl/)
- Clone the repository or set up the module path
- Navigate to the repository root and install dependencies
- Build the server (example): go build ./...
- Run the server (example, adjust as needed for your module layout): go run ./...
-
Verify the server is listening on the expected port (default or configured via env).
Additional notes
Tips and common considerations:
- Streamable HTTP is the recommended transport for production; it supports JSON-RPC and optional SSE streaming for real-time updates.
- If you need backward compatibility with older MCP clients, you can rely on the SSE Transport (Legacy), though it is deprecated in favor of Streamable HTTP.
- Use environment variables to tune server behavior, such as port, log level, and session management options.
- When registering tools, provide clear descriptions and typed parameters to improve client experience and validation.
- Ensure proper error handling in clients to deal with streaming responses and potential network interruptions.
- For resource endpoints, confirm CORS settings if your clients are web-based.
- In container deployments, consider exposing the proper ports and securing endpoints when integrating with external networks.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go