- The paper introduces AutoMCP to automatically generate MCP servers from OpenAPI specs, significantly reducing manual coding efforts.
- It details a systematic process including specification normalization, authentication handling, and endpoint stub generation for RESTful APIs.
- AutoMCP achieved a success rate improvement from 76.5% to 99.9%, demonstrating its practical impact on tool-enabled LLM integration.
Automated MCP Server Generation from OpenAPI Specifications
The paper "Making REST APIs Agent-Ready: From OpenAPI to Model Context Protocol Servers for Tool-Augmented LLMs" (2507.16044) presents a mechanism to convert RESTful APIs into Model Context Protocol (MCP) servers, using OpenAPI specifications. This approach is designed to advance the automation of MCP server creation, thus streamlining the tool integration process for LLMs. This essay explores the paper's methodology, implementation strategies, and the broader implications of its findings.
Introduction to MCP and AutoMCP
MCP is a standardized protocol that facilitates dynamic tool discovery and invocation by LLMs, enabling these models to perform real-world tasks autonomously. Despite its benefits, manually constructing MCP servers remains labor-intensive, requiring repeated code scaffolding and schema configuration. AutoMCP is a compiler introduced to automate the creation of MCP servers directly from structured REST API definitions in OpenAPI 2.0/3.0 specifications. It automates schema registration, authentication handling, and server implementation generation without requiring manual coding.
Implementation and Evaluation
AutoMCP performs several automated steps to convert OpenAPI specifications into functional MCP server stubs:
- Input Parsing and Spec Normalization: AutoMCP parses the OpenAPI spec to detect the format and resolve all
$ref pointers, ensuring structural consistency.
- Authentication Handling: The compiler extracts declared authentication schemes and generates a
.env template for environment-based secret management. It also supports OAuth2 by emitting a login handler.
- Stub Generation: Each endpoint in the specification is transformed into a callable MCP tool, complete with parameter validation and authentication injection, adhering to MCP conventions.
- Tool Execution and Validation: AutoMCP was evaluated on 50 public APIs, totaling 5,066 endpoints, selecting a stratified sample of 1,023 tool calls. A success rate of 76.5% out-of-the-box following minor specification fixes resulted in a 99.9% successful execution rate.
Figure 1: End-to-end message flow for Trello card creation mediated by Trello MCP server ( created using AutoMCP).
Figure 2: Approach overview and addressed RQs (RQ1: Green arrows, RQ2: Blue arrows, and RQ3: Red arrows).
Results and Analysis
The evaluation of AutoMCP demonstrated that the OpenAPI specifications provide sufficient detail for automating MCP server generation, with minor specification corrections. The baseline of 76.5% success was increased to 99.9% after addressing issues like incomplete authentication metadata and malformed base URLs.
Out of 17 vendor-maintained servers analyzed, AutoMCP achieved or exceeded tool coverage in 82% of cases while reducing code size considerably, proving the capability of the proposed automated approach to match or surpass manual server implementations.
Figure 3: Incremental growth of MCP-related GitHub repositories (Oct 2024 – Apr 2025).
Implications and Future Work
The implications of AutoMCP are broad, offering a pathway to significantly reduce the engineering efforts needed for integrating REST APIs into LLM workflows. By ensuring the quality of OpenAPI specifications, developers can deploy MCP-compatible servers rapidly, facilitating the integration of external tools into LLM systems.
Future advancements may focus on refining AutoMCP to handle more complex specification flaws autonomously and expanding support to additional API documentation standards beyond OpenAPI. Furthermore, increasing the scope of automatic detection and correction for specification errors will bolster the reliability and efficiency of AutoMCP-driven server generation.
Conclusion
AutoMCP effectively automates the generation of MCP servers from OpenAPI specifications, addressing a significant bottleneck in the adoption and integration of tool-augmented LLMs. The study illustrates potential enhancements to scalability and flexibility, fostering a more seamless and efficient tool ecosystem for LLMs. With continued development and adoption, tools like AutoMCP herald a shift towards LLM-native environments, enhancing LLMs' capability to function as autonomous, tool-augmented agents.