-
- Notifications
You must be signed in to change notification settings - Fork 7.3k
Description
Is your feature request related to a problem? Please describe.
I have OpenAPI specs for my APIs, but to use them with AI tools (Claude, ChatGPT, etc.) I need to manually write MCP servers. This means duplicating all my API definitions and maintaining two codebases.
Describe the solution you'd like
Add a Spring Boot MCP Server generator to OpenAPI Generator.
Input: My existing OpenAPI spec
Output: A working Spring Boot MCP server that AI tools can connect to
Example - from this OpenAPI operation:
/pets: get: summary: List all pets parameters: - name: limit in: query schema: type: integerGenerate this Spring Boot code:
@Service public class PetStoreService { @McpTool(name = "list_pets", description = "List all pets") public List<Pet> listPets( @McpToolParam(description = "Maximum number of pets to return") Integer limit ) { // Call my existing API return restTemplate.getForObject("/pets?limit=" + limit, Pet[].class); } } @Configuration public class McpConfig { @Bean public ToolCallbackProvider tools(PetStoreService service) { return MethodToolCallbackProvider.from(service); } }Then I can connect Claude Desktop or VS Code to my API with zero manual work.
Describe alternatives you've considered
- Manual coding: Writing all the
@McpToolmethods by hand (tedious and error-prone) - custom generator: write one myself
- existing implementations: e.g. harsha-iiiv/openapi-mcp-generator OR rmcp-openapi
Additional context
MCP (Model Context Protocol) is how AI tools connect to external APIs. Spring Boot already has full MCP support through Spring AI. This generator would just convert OpenAPI specs into the Spring Boot MCP format automatically.
Every popular language probably needs this - I'm focusing on Spring Boot because that's what I use, but Python/FastAPI, Node.js, etc. would benefit too.