About protoc-gen-go-mcp
protoc-gen-go-mcp is a Go protoc plugin that generates MCP server implementations for gRPC services. It fits developers generating Go code from Protocol Buffer definitions.
Key features
- 01Generate MCP server code from proto files
- 02Support gRPC service definitions
- 03Integrate with protoc code generation
Use cases
- 01Generating an MCP implementation for a gRPC service
- 02Adding MCP output to a Protocol Buffer code-generation workflow
MCP support
The plugin generates MCP server implementations for gRPC services, allowing MCP clients to invoke the generated server.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEprotoc-gen-go-mcp
Getting started
brew tap juliendoutre/protoc-gen-go-mcp https://github.com/juliendoutre/protoc-gen-go-mcp
brew install protoc-gen-go-mcp
Usage
brew install protobuf
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
protoc ./example/api.proto --go_out=./example/ --go-grpc_out=./example/ --go-mcp_out=./example/
Run the example
cd example/cmd/mcp && go install .
cd ../../../example/cmd/server && go run .
Open your favorite IDE and add the MCP to your config. For instance in Cursor:
// ~/.cursor/mcp.json
{
"mcpServers": {
"example": {
"command": "mcp",
"args": [],
"env": {}
}
}
}
Then ask in the chat something along the lines of "My name is Julien, can you get a greeting for me please?". The LLM should request the example MCP server.
Development
Lint the code
brew install golangci-lint
golangci-lint run
Release a new version
git tag -a v0.1.0 -m "New release"
git push origin v0.1.0
Update the example generated code
go install .
protoc ./example/api.proto --go_out=./example/ --go-grpc_out=./example/ --go-mcp_out=./example/
References
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.