OpenAPITools / OpenAPITools/openapi-generator
[REQ] New generator type for MCP server generation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
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: 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
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository files, tests, or entry points are named. Start by locating existing server generator implementations and the Spring Boot generation path, then review how their templates and tests are organized. Done means an OpenAPI spec can generate a working Spring Boot MCP server with tool definitions for its operations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- api, backend, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100