Trpc MCP Go
Go implementation of the Model Context Protocol (MCP) with comprehensive Streamable HTTP, STDIO, and SSE support.
What is Trpc MCP Go?
Trpc MCP Go is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to go implementation of the model context protocol (mcp) with comprehensive streamable http, stdio, and sse support.
Go implementation of the Model Context Protocol (MCP) with comprehensive Streamable HTTP, STDIO, and SSE support.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Go implementation of the Model Context Protocol (MCP) with c
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx trpc-mcp-goConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Trpc MCP Go
trpc-mcp-go is a production-ready Go library from Tencent's tRPC team that implements the Model Context Protocol (MCP), enabling Go developers to build MCP servers and clients with full support for Streamable HTTP, Server-Sent Events (SSE), and STDIO transports. It provides type-safe schema generation, middleware support, progress notifications, and both stateful and stateless operation modes. Go backend developers and platform teams use it to build scalable MCP services that expose tools, resources, and prompt templates to AI models.
Prerequisites
- Go 1.21+ installed with a configured Go module workspace
- Basic familiarity with Go modules and the go get command
- An MCP client for testing (e.g., Claude Desktop, or the built-in MCP client in the library)
- Understanding of MCP concepts: tools, resources, and prompts
Add the library to your Go module
Install the trpc-mcp-go package into your Go project using go get.
go get trpc.group/trpc-go/trpc-mcp-goCreate a basic MCP server
Initialize a server with a name, version, and listening address, then start it. The server handles MCP protocol negotiation automatically.
package main
import (
"context"
"fmt"
mcp "trpc.group/trpc-go/trpc-mcp-go"
)
func main() {
s := mcp.NewServer(
"my-mcp-server",
"1.0.0",
mcp.WithServerAddress(":3000"),
mcp.WithServerPath("/mcp"),
)
s.Start(context.Background())
}Register a tool on the server
Define a tool with a name, description, and parameter schema, then register a handler function that the MCP client will invoke.
greetTool := mcp.NewTool("greet",
mcp.WithDescription("Greet a user by name"),
mcp.WithString("name", mcp.Description("The name to greet")),
)
s.RegisterTool(greetTool, func(ctx context.Context,
req *mcp.CallToolRequest) (*mcp.CallToolResult, error) {
name := req.Params.Arguments["name"].(string)
return mcp.NewTextResult(fmt.Sprintf("Hello, %s!", name)), nil
})Connect an MCP client to your server
Create a client instance pointing at your server's HTTP endpoint. The client can discover and call any registered tools.
client, err := mcp.NewClient(
"http://localhost:3000/mcp",
mcp.Implementation{Name: "my-client", Version: "1.0.0"},
mcp.WithProtocolVersion(mcp.ProtocolVersion_2025_03_26),
)
if err != nil {
panic(err)
}Enable STDIO transport for MCP client integration
For integration with MCP clients like Claude Desktop, run the server with STDIO transport instead of HTTP. Pass --transport=stdio when launching the binary.
s := mcp.NewServer(
"my-mcp-server",
"1.0.0",
mcp.WithStdioTransport(),
)Trpc MCP Go Examples
Client configuration
Claude Desktop config for a Go MCP server binary built with trpc-mcp-go running in STDIO mode.
{
"mcpServers": {
"my-go-mcp-server": {
"command": "/usr/local/bin/my-mcp-server",
"args": ["--transport=stdio"]
}
}
}Prompts to try
Example interactions once a trpc-mcp-go server is connected to an MCP client.
- "List all tools available on this MCP server"
- "Call the greet tool with the name 'Alice'"
- "Fetch the resource at uri://my-resource/data"
- "Use the summarize prompt template with the text 'Go is a statically typed language'"
- "Call the process_data tool and stream progress updates back to me"Troubleshooting Trpc MCP Go
go get fails with 'module not found' for trpc.group path
The module uses the trpc.group domain as its import path. Ensure you have internet access and no Go proxy is blocking external modules. If behind a corporate proxy, set GOPROXY=https://goproxy.io,direct or configure your proxy to allow trpc.group.
Client receives 'protocol version mismatch' error
Set the protocol version explicitly on the client using mcp.WithProtocolVersion(mcp.ProtocolVersion_2025_03_26). Ensure the server and client are using compatible versions. Check the library's changelog for supported protocol versions.
Tool handler panics when accessing Arguments map
Arguments values are interface{} and require type assertions. Always check if the key exists before asserting the type: if v, ok := req.Params.Arguments["name"]; ok { name := v.(string) }. Consider using the library's typed parameter helpers to avoid runtime panics.
Frequently Asked Questions about Trpc MCP Go
What is Trpc MCP Go?
Trpc MCP Go is a Model Context Protocol (MCP) server that go implementation of the model context protocol (mcp) with comprehensive streamable http, stdio, and sse support. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Trpc MCP Go?
Follow the installation instructions on the Trpc MCP Go GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Trpc MCP Go?
Trpc MCP Go works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Trpc MCP Go free to use?
Yes, Trpc MCP Go is open source and available under the NOASSERTION license. You can use it freely in both personal and commercial projects.
Trpc MCP Go Alternatives — Similar Developer Tools Servers
Looking for alternatives to Trpc MCP Go? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Trpc MCP Go in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Trpc MCP Go?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.