Skip to content

Add proto2mcp to global extension registry (1179-1181)#28790

Open
brucearctor wants to merge 1 commit into
protocolbuffers:mainfrom
brucearctor:add-proto2mcp-extension
Open

Add proto2mcp to global extension registry (1179-1181)#28790
brucearctor wants to merge 1 commit into
protocolbuffers:mainfrom
brucearctor:add-proto2mcp-extension

Conversation

@brucearctor

Copy link
Copy Markdown
Contributor

Extension Registration Request

Project: proto2mcp
Website: https://github.com/protocgen/proto2mcp
Requested Extensions: 1179-1181

About proto2mcp

proto2mcp is a protoc/buf plugin that generates MCP (Model Context Protocol) servers from Protobuf service definitions. It enables existing gRPC/ConnectRPC services to be securely exposed as LLM tools with:

  • Automatic JSON Schema generation from proto messages
  • Multitenancy support via interceptor middleware
  • buf.validate constraint mapping for LLM input validation
  • ConnectRPC client forwarding

Extension Usage

proto2mcp uses custom options on three descriptor types:

Extension Number Purpose
google.protobuf.MethodOptions 1179 Per-method MCP tool configuration (name override, description, skip, hints)
google.protobuf.ServiceOptions 1180 Per-service MCP configuration (tool name prefix, description)
google.protobuf.FileOptions 1181 Per-file MCP configuration (skip entire file)

Example

import "protocgen/mcp/v1/options.proto";

service PatientService {
  option (protocgen.mcp.v1.service) = {
    tool_name_prefix: "Patient"
    description: "Patient management operations"
  };

  rpc GetPatient(GetPatientRequest) returns (GetPatientResponse) {
    option (protocgen.mcp.v1.method) = {
      description: "Retrieves a patient record by ID"
      read_only: true
    };
  }
}

Related

proto2mcp is part of the protocgen ecosystem, alongside proto2type.

proto2mcp is a protoc/buf plugin that generates MCP (Model Context
Protocol) servers from Protobuf service definitions. It uses custom
options on MethodOptions, ServiceOptions, and FileOptions to control
MCP tool generation.

Project: https://github.com/protocgen/proto2mcp
Extension: 1179-1181 (MethodOptions, ServiceOptions, FileOptions)
@brucearctor
brucearctor requested a review from a team as a code owner July 24, 2026 04:32
@brucearctor
brucearctor requested review from Logofile and removed request for a team July 24, 2026 04:32
brucearctor added a commit to protocgen/proto2mcp that referenced this pull request Jul 24, 2026
Update proto extension numbers from arbitrary 1052025-1052027 to
officially registered 1179-1181 per PR to protocolbuffers/protobuf:
protocolbuffers/protobuf#28790

- MethodOptions: 1179
- ServiceOptions: 1180
- FileOptions: 1181
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant