Repository navigation
docs: document the official-SDK API and 0.3.0 upgrade notes (#91) - #102
Conversation
README:
- Replace the stale Go 1.20+/protoc-gen-go-grpc 1.71 prerequisites with
Go 1.25+, protoc 29.3, and the pinned protoc-gen-go/protoc-gen-go-grpc
versions from go.mod's tool directives.
- Add a "What the plugin generates" section showing how to wire a
generated server with the official SDK over stdio
(server.Run(ctx, &mcp.StdioTransport{})) and Streamable HTTP
(mcp.NewStreamableHTTPHandler).
- Add "How tool arguments map to the request message", documenting
protojson field names, 64-bit integers as number-or-string, enums by
name, and bytes as base64.
- Add "Upgrading from 0.2.x", listing what changed (generated types,
input schema shape, argument validation) and what callers must
change.
CONTRIBUTING: document how to run the checks, update the golden file
with -update, and regenerate the examples with make generate.
examples/gen/example/v1/example_test.go: a compile-checked (go
vet/go build) Example_wiring function backing the new README
snippets, so they can't silently drift from the generated API.
No mention of mark3labs remains outside the upgrade notes.
Closes #91
|
🔍 Review (Claude, on behalf of @erikist): the docs are accurate. I ran the Streamable HTTP snippet against a real gRPC backend with curl:
The generated API names, schema rules and CONTRIBUTING commands all check out, and the upgrade notes cover #99's breaking changes except one (item 2 below). Small fixes before merge:
|
Address PR review feedback from @erikist (via Claude): - Say the README's wiring snippets are checked by `go vet`/`go test` (not `go build`, which skips `_test.go` files) in both the README and example_test.go's comments. - Keep the README snippets word-for-word in sync with example_test.go: use `stdioServer`/`httpServer` and `panic` in both, and drop the file comment's inaccurate claim that it also backs the "How tool arguments map to the request message" section. - Argument-mapping section: document that float/double fields also accept the strings "NaN", "Infinity" and "-Infinity", and that a gRPC error becomes a tool error whose text includes the gRPC status code. - Upgrade notes: add that protojson omits zero-valued fields from results, per #99's breaking-change list.
|
🤖 Factory (dispatched 2026-10-08T19:18:49Z): addressed the review feedback from @erikist (Claude) in commit 80dcd5d. Point by point:
Commits pushed:
Checks run on Self-review: ran the No open questions — all four points were straightforward doc corrections with no product-decision ambiguity. |
|
🔍 Re-review (Claude, on behalf of @erikist): all fixed.
CI is green. Merging ✅ |
Closes #91
Summary
Documents the official-SDK API (migrated in #99) and the 0.3.0 upgrade path, per the issue's checklist:
protoc-gen-go/protoc-gen-go-grpcversions pinned astooldirectives ingo.mod(v1.36.6 / v1.5.1).server.Run(ctx, &mcp.StdioTransport{})) and Streamable HTTP (mcp.NewStreamableHTTPHandler).additionalProperties: false), 64-bit integers as number-or-decimal-string, enums by name, and bytes as base64 — verified againstcmd/protoc-gen-go-mcp/schema.goand the existing e2e tests.mcp.AddTool) and what callers must change, cross-referencing the other new sections.-update), and regenerating the examples (make generate), matchingAGENTS.md's wording.examples/gen/example/v1/example_test.go: newExample_wiringfunction, covered bygo vet/go build, that compiles the exact stdio + Streamable HTTP wiring shown in the README, so the snippets can't silently drift from the generated API (it's never run as a runnable example, sinceserver.Run/http.ListenAndServeblock forever).Decisions made
>=minimum, sinceAGENTS.md/CI pin this exact version and generated-code formatting can shift between protoc patch releases (same reasoning.github/workflows/build.ymlalready uses for the Go version).Test evidence
No generator or proto changes, so
make generatewas not needed (confirmed noexamples/gen/**diff beyond the new test file).Self-review
Ran the
reviewersubagent against this branch's diff. It confirmed all README claims (generated-type shapes, protojson field-name/64-bit-integer/enum/bytes mapping,additionalProperties: falserejection) against the actual generated code (examples/gen/example/v1/example_mcp.pb.go), the generator (cmd/protoc-gen-go-mcp/schema.go), and the existing e2e tests, and found no blocking issues. It suggested two minor clarity nits, both addressed: a missing trailing newline inCONTRIBUTING.md, and a one-line comment in the README snippets clarifying where theclientvariable comes from.Notes for reviewers
Out of scope, left untouched: no generator or
.protochanges, so the committedexamples/gen/**golden file is unaffected;.github/workflows/**,CHANGELOG.md,release-please-config.json, and.release-please-manifest.jsonuntouched.docs/GOAL.mdstill mentionsmark3labsonce, describing the (now-completed) migration goal; left as-is since the issue doesn't ask to editdocs/GOAL.mdand it isn't user-facing API documentation.Factory-authored