Protoc Gen Go
Go protobuf compiler extension to turn any gRPC service into an MCP server
What is Protoc Gen Go?
Protoc Gen Go is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to go protobuf compiler extension to turn any grpc service into an mcp server
Go protobuf compiler extension to turn any gRPC service into an MCP server
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Go protobuf compiler extension to turn any gRPC service into
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx protoc-gen-goConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Protoc Gen Go
protoc-gen-go-mcp is a Go protobuf compiler plugin that automatically generates MCP server code from any gRPC or ConnectRPC service definition, turning every RPC method into an MCP tool with auto-generated JSON Schema for its input type. It integrates into the standard buf/protoc build pipeline and supports both the official Go MCP SDK and the mark3labs/mcp-go library via adapter selection at registration time — no code regeneration needed to switch. This lets Go teams expose existing gRPC services to AI assistants like Claude without writing MCP boilerplate by hand.
Prerequisites
- Go 1.21 or later installed
- buf CLI installed (https://buf.build/docs/installation) or protoc with Go plugins
- An existing protobuf/.proto service definition for your gRPC service
- The just task runner (optional, for using 'just install')
- An MCP client such as Claude Desktop to connect to the generated server
Install the protoc-gen-go-mcp plugin
Install the compiler plugin binary into your GOPATH/bin so that buf or protoc can find it. The 'just install' command is a convenience wrapper around go install.
go install github.com/redpanda-data/protoc-gen-go-mcp/cmd/protoc-gen-go-mcp@latestConfigure buf.gen.yaml to use the plugin
Add the plugin entry to your buf.gen.yaml so that running 'buf generate' produces MCP server code alongside your existing Go protobuf stubs.
version: v2
plugins:
- local:
- go
- run
- github.com/redpanda-data/protoc-gen-go-mcp/cmd/protoc-gen-go-mcp@latest
out: ./gen/go
opt: paths=source_relativeGenerate the MCP server code
Run buf generate to produce the MCP registration code for all RPC methods defined in your .proto files.
buf generateRegister the generated handler and start the MCP server
In your Go main.go, create an MCP server using one of the supported adapters (go-sdk or mcp-go), register the generated service handler, and start the stdio transport so an MCP client can connect.
package main
import (
"context"
gosdk "github.com/modelcontextprotocol/go-sdk/server"
"github.com/modelcontextprotocol/go-sdk/mcp"
mymcpgen "yourmodule/gen/go"
)
func main() {
ctx := context.Background()
raw, s := gosdk.NewServer("my-grpc-mcp", "1.0.0")
mymcpgen.RegisterMyServiceHandler(s, &MyServiceImpl{})
raw.Run(ctx, &mcp.StdioTransport{})
}Configure Claude Desktop to connect to the server
Edit claude_desktop_config.json to launch your compiled Go binary as the MCP server. Claude Desktop will start the process and communicate over stdio.
{
"mcpServers": {
"my-grpc-mcp": {
"command": "/path/to/your/compiled/mcp-server-binary",
"args": []
}
}
}Protoc Gen Go Examples
Client configuration
claude_desktop_config.json entry for a Go MCP server binary generated from a gRPC service using protoc-gen-go-mcp.
{
"mcpServers": {
"my-grpc-mcp": {
"command": "/Users/yourname/projects/myservice/bin/mcp-server",
"args": []
}
}
}Prompts to try
Example prompts once your gRPC service is exposed as an MCP server through the generated tools.
- "What RPC methods are available on this server?"
- "Call the GetUser RPC with user_id=42 and show me the result."
- "List all available tools and their required input fields."
- "Run the ListProducts RPC and filter by category='electronics'."Troubleshooting Protoc Gen Go
buf generate fails with 'plugin protoc-gen-go-mcp not found'
Ensure the plugin binary is in your PATH by running 'which protoc-gen-go-mcp'. If not found, run 'go install github.com/redpanda-data/protoc-gen-go-mcp/cmd/protoc-gen-go-mcp@latest' and add $GOPATH/bin to your PATH.
Generated code does not compile — import path errors
Verify that the 'out' path and 'opt: paths=source_relative' in buf.gen.yaml match your Go module structure. The generated package name must align with the proto package and the Go module declared in your go.mod.
Claude Desktop cannot start the MCP server binary
Ensure the binary is compiled for your host OS/architecture with 'go build -o bin/mcp-server .' and that the command path in claude_desktop_config.json is an absolute path. Check execute permissions with 'chmod +x bin/mcp-server'.
Frequently Asked Questions about Protoc Gen Go
What is Protoc Gen Go?
Protoc Gen Go is a Model Context Protocol (MCP) server that go protobuf compiler extension to turn any grpc service into an mcp server It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Protoc Gen Go?
Follow the installation instructions on the Protoc Gen Go GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Protoc Gen Go?
Protoc Gen Go works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Protoc Gen Go free to use?
Yes, Protoc Gen Go is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.
Protoc Gen Go Alternatives — Similar Developer Tools Servers
Looking for alternatives to Protoc Gen 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 Protoc Gen 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 Protoc Gen Go?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.