Protoc Gen Go Mcp
@redpanda-data
About Protoc Gen Go Mcp
Go protobuf compiler extension to turn any gRPC service into an MCP server
Config
No standard config provided
This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.
RepositoryTools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Protoc Gen Go Mcp?
Protoc Gen Go Mcp is a Protocol Buffers compiler plugin that generates Model Context Protocol (MCP) servers for gRPC or ConnectRPC APIs. It auto-generates JSON Schema for tool inputs and is MCP-library-agnostic, supporting both the official Go SDK and mark3labs/mcp-go.
How to use Protoc Gen Go Mcp?
Add the plugin to your buf.gen.yaml, then run buf generate to produce *.pb.mcp.go files. In your Go server code, import the adapter for your chosen MCP library (gosdk or mark3labs), create a server, and register handlers using generated Register*Handler functions. Forward tool calls to gRPC or ConnectRPC clients with generated ForwardTo*Client functions.
Key features of Protoc Gen Go Mcp
- Auto-generates MCP handlers from
.protoservices - Outputs JSON Schema for method inputs
- Wire up to gRPC or ConnectRPC servers/clients
- Easy integration with
bufbuild tool - Runtime LLM provider selection (Standard/OpenAI)
- MCP library agnostic (official SDK and mark3labs)
Use cases of Protoc Gen Go Mcp
- Expose existing gRPC APIs as MCP tools for AI assistants
- Forward MCP tool calls to remote gRPC clients with zero boilerplate
- Namespace multiple service instances (e.g., different databases) via tool name prefixing
- Use with
bufto generate MCP servers alongside standard.pb.gofiles
FAQ from Protoc Gen Go Mcp
Which MCP Go libraries are supported?
Both the official modelcontextprotocol/go-sdk and mark3labs/mcp-go are supported through adapter packages; no regeneration needed to switch.
How are MCP tool names generated?
Tool names default to the full proto method name with dots replaced by underscores. Names longer than 64 characters are truncated using a 10-character hash as prefix, preserving the most specific part.
Can I use custom tool names?
Yes, set the mcp.v1.tool_name method option in your .proto file. The value must match ^[a-z_][a-z0-9_-]{0,63}$; duplicates within a service cause a fallback to the derived name.
How do I migrate from versions before v0.2?
Replace direct mark3labs/mcp-go imports with the adapter package, use WithNamePrefix instead of manual AddTool, and update HandleError return type to *runtime.CallToolResult.
What is the difference between Standard and OpenAI schema modes?
Standard mode supports full JSON Schema (additionalProperties, anyOf, oneOf) and maps as objects. OpenAI mode restricts JSON Schema, converts maps to key-value arrays, and encodes well-known types as JSON strings.
Frequently asked questions
Which MCP Go libraries are supported?
Both the official `modelcontextprotocol/go-sdk` and `mark3labs/mcp-go` are supported through adapter packages; no regeneration needed to switch.
How are MCP tool names generated?
Tool names default to the full proto method name with dots replaced by underscores. Names longer than 64 characters are truncated using a 10-character hash as prefix, preserving the most specific part.
Can I use custom tool names?
Yes, set the `mcp.v1.tool_name` method option in your `.proto` file. The value must match `^[a-z_][a-z0-9_-]{0,63}$`; duplicates within a service cause a fallback to the derived name.
How do I migrate from versions before v0.2?
Replace direct `mark3labs/mcp-go` imports with the adapter package, use `WithNamePrefix` instead of manual `AddTool`, and update `HandleError` return type to `*runtime.CallToolResult`.
What is the difference between Standard and OpenAI schema modes?
Standard mode supports full JSON Schema (additionalProperties, anyOf, oneOf) and maps as objects. OpenAI mode restricts JSON Schema, converts maps to key-value arrays, and encodes well-known types as JSON strings.
Basic information
More Developer Tools MCP servers
FastAPI-MCP
tadata-orgExpose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!
Serena
oraiosA powerful MCP toolkit for coding, providing semantic retrieval and editing capabilities - the IDE for your agent
MCP Inspector
modelcontextprotocolVisual testing tool for MCP servers
Deepwiki MCP Server
regenrek📖 MCP server for fetch deepwiki.com and get latest knowledge in Cursor and other Code Editors
TranscriptFetch MCP Server
TranscriptFetchModel Context Protocol (MCP) server for TranscriptFetch: fetch YouTube transcripts, search, channels, and playlists from any MCP client.
Comments