feat: add protoc-gen-connect-openapi to codegen pipeline#88
Conversation
Adds the sudorandom/protoc-gen-connect-openapi buf plugin to generate OpenAPI v3.1 specs from proto definitions. Specs land in gen/openapi/ and match the Connect-RPC wire format, so mcp-openapi can consume them directly to produce MCP tool definitions. This unblocks evalops/platform#56 by auto-generating OpenAPI for all 22 proto packages — currently only 8 have hand-written specs. The 14 missing services (governance, approvals, objectives, prompts, traces, skills, etc.) become agent-visible through MCP without manual spec authoring. Ref: https://github.com/sudorandom/protoc-gen-connect-openapi Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR SummaryLow Risk Overview Commits the generated OpenAPI YAML outputs (e.g., Reviewed by Cursor Bugbot for commit 3ed6af8. Bugbot is set up for automated code reviews on this repo. Configure here. |
| - remote: buf.build/community/sudorandom-connect-openapi:v0.19.1 | ||
| out: gen/openapi | ||
| opt: | ||
| - path= |
There was a problem hiding this comment.
Empty path= option likely causes generation failure
High Severity
The opt for the OpenAPI plugin sets path= to an empty string. The path option in protoc-gen-connect-openapi specifies a single output filename (e.g., path=openapi.yaml). An empty value will either cause the plugin to attempt writing to an empty-named file (failing generation) or be a silent no-op, making the entire opt: block unnecessary dead configuration. If the intent was per-file output, the opt: section can be removed entirely. If a single merged file was intended, a filename is needed.
Reviewed by Cursor Bugbot for commit 1fedf36. Configure here.
There was a problem hiding this comment.
Bugbot Autofix determined this is a false positive.
The pinned protoc-gen-connect-openapi version treats path= as an empty Path, so buf generate succeeds and falls back to per-proto-file output.
You can send follow-ups to the cloud agent here.
Generated by `buf generate` with the newly added sudorandom-connect-openapi plugin. Produces OpenAPI v3.1 specs for all 22 proto packages in gen/openapi/. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.
Reviewed by Cursor Bugbot for commit 3ed6af8. Configure here.
| application/json: | ||
| schema: | ||
| $ref: '#/components/schemas/audit.v1.QueryEventsResponse' | ||
| /audit.v1.AuditService/ExportEvents: {} |
There was a problem hiding this comment.
Streaming RPC produces empty path item in OpenAPI
Medium Severity
The server-streaming RPC ExportEvents (defined as returns (stream ExportEventsResponse) in the proto) generates an empty path item {} with no HTTP operations. While technically valid per OpenAPI 3.1, this means mcp-openapi will silently skip this endpoint when generating MCP tool definitions — the audit export functionality becomes invisible to agents. This is the only streaming RPC in the proto definitions, and the empty path item could also confuse or break some OpenAPI tooling that doesn't expect operation-less paths.
Reviewed by Cursor Bugbot for commit 3ed6af8. Configure here.


Summary
sudorandom/protoc-gen-connect-openapi(269 stars, actively maintained) as a buf remote plugingen/openapi/mcp-openapifor MCP tool generationWhy
Currently only 8 of 22 proto packages have hand-written OpenAPI specs in
platform/openapi/. The 14 missing services — including governance, approvals, objectives, prompts, traces, skills — are invisible to agents through MCP.With this plugin,
buf generateauto-produces OpenAPI for all 22 packages. No more manual spec authoring.Follow-up
buf generateand verify output ingen/openapi/gen/openapi/specs intoagent-mcp'smcp-openapipipeline (may require a base template for auth/server info)platform/openapi/can be gradually retired as the generated ones are validatedprotovalidateconstraints to proto files — the plugin emits them as OpenAPIminimum,pattern,format: uuidetc.Related issues
🤖 Generated with Claude Code