Making REST APIs Agent-Ready: From OpenAPI to Model Context Protocol Servers for Tool-Augmented LLMs

📅 2025-07-21
📈 Citations: 0
Influential: 0
📄 PDF

career value

178K/year
🤖 AI Summary
MCP server development suffers from labor-intensive glue code and repetitive manual efforts in authentication and configuration. Method: This paper introduces AutoMCP, the first end-to-end compiler that automatically generates fully functional MCP servers directly from OpenAPI 2.0/3.0 specifications. It supports dynamic tool discovery, automatic schema registration, injection of authentication logic, and semantic interface mapping—eliminating the need for hand-crafted adaptation layers. Contribution/Results: Evaluated on 50 real-world APIs (>5,000 endpoints), AutoMCP achieves an initial call success rate of 76.5%, improving to 99.9% after lightweight fixes. The resulting corpus comprises 5,066 standardized, callable tools. This work substantially lowers the barrier to integrating external tools into LLM agents and advances scalability and protocol standardization within the MCP ecosystem.

Technology Category

Application Category

📝 Abstract
Large Language Models (LLMs) are evolving from passive text generators into active agents that invoke external tools. To support this shift, scalable protocols for tool integration are essential. The Model Context Protocol (MCP), introduced by Anthropic in 2024, offers a schema-driven standard for dynamic tool discovery and invocation. Yet, building MCP servers remains manual and repetitive, requiring developers to write glue code, handle authentication, and configure schemas by hand-replicating much of the integration effort MCP aims to eliminate. This paper investigates whether MCP server construction can be meaningfully automated. We begin by analyzing adoption trends: among 22,000+ MCP-tagged GitHub repositories created within six months of release, fewer than 5% include servers, typically small, single-maintainer projects dominated by repetitive scaffolding. To address this gap, we present AutoMCP, a compiler that generates MCP servers from OpenAPI 2.0/3.0 specifications. AutoMCP parses REST API definitions and produces complete server implementations, including schema registration and authentication handling. We evaluate AutoMCP on 50 real-world APIs spanning 5,066 endpoints across over 10 domains. From a stratified sample of 1,023 tool calls, 76.5% succeeded out of the box. Manual failure analysis revealed five recurring issues, all attributable to inconsistencies or omissions in the OpenAPI contracts. After minor fixes, averaging 19 lines of spec changes per API, AutoMCP achieved 99.9% success. Our findings (i) analyze MCP adoption and quantify the cost of manual server development, (ii) demonstrate that OpenAPI specifications, despite quality issues, enable near-complete MCP server automation, and (iii) contribute a corpus of 5,066 callable tools along with insights on repairing common specification flaws.
Problem

Research questions and friction points this paper is trying to address.

Automating MCP server construction from OpenAPI specs
Reducing manual effort in REST API tool integration
Addressing inconsistencies in OpenAPI contracts for LLM agents
Innovation

Methods, ideas, or system contributions that make the work stand out.

Automates MCP server generation from OpenAPI
Handles schema registration and authentication
Achieves 99.9% success after minor fixes