Skip to content

Parity with protoc-gen-go-mcp v0.3.0 (Topeka Go → Rust) #2

Open
13 of 14 issues completed
Open

Description

@erikist

Port Topeka's Go plugin, stablekernel/protoc-gen-go-mcp v0.3.0 (reference commit 9e072f9), to Rust. Parity means that, for the same .proto, the Rust plugin generates an MCP server exposing the same tools with the same names, descriptions and input schemas, and the server behaves the same on tools/call: argument and result encoding, error handling and validation.

Decisions (from @erikist, 2026-10-09)

  • Protobuf/gRPC stack: prost + tonic + pbjson. The generated MCP code sits next to the output of protoc-gen-prost, protoc-gen-tonic and protoc-gen-prost-serde. pbjson's protojson-compatible serde is the counterpart of Go's protojson.
  • MCP SDK: the official Rust SDK, rmcp (3.5.x).
  • Argument validation: rmcp, unlike the Go SDK, does not validate tool arguments against inputSchema. The generated code validates them itself with the jsonschema crate before decoding, so invalid arguments become a tool error and never reach the backend, as they do in Go.

Plan (sub-issues, in dependency order)

The sub-issues are listed under this issue, with blocked by links between them. Roughly:

  1. Scaffold: Cargo workspace, plugin skeleton, example crate, CI basics.
  2. In parallel: comment and naming helpers; JSON Schema builder; release-please and release binaries.
  3. Codegen: tool definitions and the server skeleton, then the golden test and the CI regeneration check, then the handlers.
  4. The end-to-end test with a cross-implementation parity fixture, and the mcp-vibe example.
  5. README parity.

Out of scope (matches Go 0.3.0)

  • Streaming RPCs (skipped by the generator, as in Go).
  • MCP resources and prompts.
  • Publishing to crates.io, and a build.rs (prost-build/tonic-build) integration API. Possible follow-ups.

Supersedes #1.

Activity

  1. erikist commented on Oct 10, 2026

    @erikist
    ContributorAuthor

    🔍 Status 2026-10-10: the parity milestone is implemented. Every factory issue is merged:

    Issue Change PR
    #3 scaffold #16
    #4 comment helpers #19
    #5 JSON Schema #18
    #6 tool definitions and server API #21
    #7 handlers #25
    #8 golden test #24
    #9 e2e test and Go parity fixture #26
    #10 mcp-vibe #27
    #11 CI regen check #23
    #12 release #17
    #13 README #30
    #20 FieldMask #29
    #22 fixtures and formatting #28

    Parity was verified against a live Go 0.3.0 mcp-vibe. For the same stdio session:

    • serverInfo matches.
    • tools/list (all 5 tools) is JSON-identical.
    • tools/call result texts, including the gRPC error text, are identical.

    Documented differences (README → Differences from protoc-gen-go-mcp):

    • Any is pbjson-shaped.
    • Non-finite floats in results are null.
    • There's no editions support (prost-reflect and protoc-gen-prost don't support editions).

    Left for a human:

    The sf-rmcp factory is drained (idle, nothing dispatching).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions