swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

mcp server codegen support

Open johlin opened this issue 8 months ago • 4 comments

Based on an OpenAPI 3.0 schema, can an MCP([Model Context Protocol] server be generated? If not currently supported, are there any plans or suggestions for support?

johlin avatar Apr 10 '25 13:04 johlin

I came here to suggest the same thing. It should be possible to generate a "starter" MCP server from an OpenAPI schema, and then the developer can just add more descriptive text optimized for LLMs.

amfred avatar Apr 10 '25 14:04 amfred

+1 This would be useful. Atleast some basic biolerplate.

sshaaf avatar Apr 10 '25 15:04 sshaaf

Something to consider - should the MCP server be a separate executable, or would it be better to add additional endpoints/routes to the same REST API server executable? If that over-complicates things, let's just make it a separate executable.

amfred avatar Apr 10 '25 15:04 amfred

+1

vazgen avatar Aug 17 '25 12:08 vazgen