OpenAPITools / OpenAPITools/openapi-generator

[REQ-22001] Add MCP server support to apiService.mustache - Fix

Open
#22,552 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Refactor apiService.mustache to include MCP server support and enhance operation methods.

The goal is to directly generate a MCP server in quarkus.

Two extensions are used :

x-enable-mcp-server : (default is false) at the root of the spec, states that mcp server is enabled. It should be set to true in order to be enabled
x-enable-mcp-operation : (default is false) On each operation that should be accessible from MCP clients. It states if an specific operation can be accessible from MCP client
The main intent is to transform our REST APIs as GEN-AI ready APIs.

Known Limitations

UUID in parameters ar not supported yet
SecurityContext parameters is not supported yet
See also

An example of usage can be found here : https://github.com/thibautrety/quarkus_mcp/tree/main

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the apiService.mustache template and review how the x-enable-mcp-server root extension and x-enable-mcp-operation operation extension are represented in generated Quarkus services. Use the linked quarkus_mcp example as a reference, and verify that enabled specifications generate an MCP server while disabled or unmarked operations remain unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.