
MCP specification for your protocol buffers
概览
One schema, every surface. mcp is a spec-first protoc plugin that generates fully compliant Model Context Protocol servers straight from your .proto files — for Go, Rust, and C++ — so the definitions that already describe your APIs expose them to AI clients too. This release brings full support for protocol version 2026-07-28 . Annotate your .proto files with MCP options and protoc-gen-mcp generates a Model Context Protocol server for each service — no hand-written glue, and no second schema to keep in sync. The definitions you already maintain become: - → callable functions for agents - → structured interaction templates - → retrievable context/data - → dynamic input flows - → incremental updates for long-running calls The generated server implements the MCP specification at protocol version 2026-07-28 and delegates to your service implementation — in-process, or forwarded to a remote gRPC server. Your API stays strongly typed, and the proto remains the single source of truth.
README
以下为原文 README 节选,完整内容请查看原文。
MCP
One schema, every surface. mcp is a spec-first protoc plugin that generates fully compliant Model Context Protocol servers straight from your .proto files — for Go, Rust, and C++ — so the definitions that already describe your APIs expose them to AI clients too.
This release brings full support for protocol version 2026-07-28.
Overview
Annotate your .proto files with MCP options and protoc-gen-mcp generates a
Model Context Protocol server for each
service — no hand-written glue, and no second schema to keep in sync.
The definitions you already maintain become:
- Tools → callable functions for agents
- Prompts → structured interaction templates
- Resources → retrievable context/data
- Elicitation → dynamic input flows
- Progress → incremental updates for long-running calls
The generated server implements the
MCP specification at protocol
version 2026-07-28 and delegates to your service implementation — in-process,
or forwarded to a remote gRPC server. Your API stays strongly typed, and the
proto remains the single source of truth.
Generated code builds on the official MCP SDKs — Go go-sdk v1.7+ and Rust
rmcp 3.1+ (which also backs the C++ bridge).
This repository ships the plugin and the annotation .proto files. The Go
runtime the generated code links against lives in
安装
npx @modelcontextprotocol/inspector -- go run .