Skip to content

[REQ] New generator type for MCP server generation #22001

@StephenFlavin

Description

@StephenFlavin

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: integer

Generate 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

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions