MCP.so
Sign In
Servers

protoc-gen-go-mcp

@juliendoutre

A Go protoc plugin to implement MCP servers for gRPC services.

Overview

What is protoc-gen-go-mcp?

protoc-gen-go-mcp is a protoc plugin that generates Go Model Context Protocol (MCP) server code from protobuf service definitions. It integrates with the protobuf ecosystem and gRPC to produce MCP tools that can be used by LLM clients.

How to use protoc-gen-go-mcp?

Install via Homebrew (brew tap juliendoutre/protoc-gen-go-mcp and brew install protoc-gen-go-mcp), then run protoc with the --go-mcp_out flag after installing protoc, protoc-gen-go, and protoc-gen-go-grpc. An example invocation is provided: protoc ./example/api.proto --go_out=./example/ --go-grpc_out=./example/ --go-mcp_out=./example/. The generated MCP server can be run and configured in an IDE like Cursor by adding its command to the MCP configuration file.

Key features of protoc-gen-go-mcp

  • Generates Go MCP server code from protobuf definitions.
  • Integrates with protoc-gen-go and protoc-gen-go-grpc.
  • Includes an example protobuf service and MCP server.
  • Configurable via standard protoc command-line flags.
  • Supports Homebrew for cross‑platform installation.
  • Compatible with Cursor IDE’s MCP configuration.

Use cases of protoc-gen-go-mcp

  • Exposing a gRPC greeting service as MCP tools for an AI chat client.
  • Generating boilerplate MCP server stubs from existing protobuf service definitions.
  • Prototyping interaction between LLMs and backend services defined in protobuf.

FAQ from protoc-gen-go-mcp

What does protoc-gen-go-mcp generate?

It generates Go source code implementing a Model Context Protocol server that wraps gRPC services defined in a .proto file.

What runtime dependencies are required?

You need protoc, protoc-gen-go, protoc-gen-go-grpc, and protoc-gen-go-mcp installed. The generated code uses standard Go and gRPC packages; no additional MCP libraries are mentioned beyond the example.

How do I install protoc-gen-go-mcp?

On macOS you can use Homebrew: brew tap juliendoutre/protoc-gen-go-mcp then `brew install protoc-gen-go-m

More from Developer Tools