Trpc MCP Go

v1.0.0Developer Toolsstable

Go implementation of the Model Context Protocol (MCP) with comprehensive Streamable HTTP, STDIO, and SSE support.

trpc-mcp-gomcpai-integration
Share:
59
Stars
0
Downloads
0
Weekly
0/5

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

Build MCP servers in Go with tRPC support.
Implement HTTP, STDIO, and SSE transports.
Create scalable AI integrations using Go.
trpc-group

Maintainer

LicenseNOASSERTION
Languagego
Versionv1.0.0
UpdatedMay 18, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx trpc-mcp-go

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-go
2

Create 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())
}
3

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
})
4

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)
}
5

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.

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.

Quick Config Preview

{ "mcpServers": { "trpc-mcp-go": { "command": "npx", "args": ["-y", "trpc-mcp-go"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides