FromOpenAPI: project an OpenAPI spec as a urfave/cli tree + MCP server #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally filed by @coilysiren on 2026-05-13T14:23:23Z - https://github.com/coilysiren/cli-mcp/issues/38
FastMCP ships
FastMCP.from_openapi(spec, client)which converts an OpenAPI spec into MCP tools. Configurable via orderedRouteMapobjects,route_map_fncallback for complex logic,mcp_component_fnfor post-creation modification (tags, descriptions). Default rule: "All routes become tools".Proposal:
climcp.FromOpenAPI(spec []byte, opts) (*cli.Command, error)or similar. Returns a urfave/cli v3 command tree that can beapp.Run()directly or projected to MCP via the existingNewServer. Two-projections-for-the-price-of-one is the cli-mcp angle.Adjacent prior art on Kai's side:
coilyco-ai/scripts/openapi-to-coily.pyalready does OpenAPI → static Go codegen for coily'sops modio/discord/sentry/trello/forgejowrappers. cli-mcp's version could be runtime-shaped instead of codegen-shaped, and it could power the same workflow from a single binary.Open questions:
Options.HTTPClientinjection?--bodyflag, or expand schema properties into individual flags?operationId, fall back toMETHOD_/pathcollapse?Sibling feature request: a
FromFastAPI-style helper isn't applicable in Go, butFromOpenAPIis the substrate.