← Latest papers
💻 computer science

From REST to MCP: An Empirical Study of API Wrapping and Automated Server Generation for LLM Agents

This paper presents the first large-scale empirical study of Model Context Protocol (MCP) servers, revealing their heavy reliance on REST APIs and bare wrappers while introducing AutoMCP, an automated pipeline that significantly improves tool generation correctness and reduces complexity through specification repair and strategic tool-set transformations.

Original authors: Meriem Mastouri, Emna Ksontini, Amine Barrak, Wael Kessentini

Published 2026-04-08
📖 5 min read🧠 Deep dive

Original authors: Meriem Mastouri, Emna Ksontini, Amine Barrak, Wael Kessentini

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a super-smart robot assistant (an AI Agent) that can do amazing things, like book flights, analyze data, or manage your files. But this robot is blind; it doesn't know how to talk to the outside world on its own. It needs a translator to speak the language of different services like GitHub, Slack, or Trello.

For a long time, these services spoke a complex language called REST APIs. To let the robot talk to them, human developers had to build a custom "translator" for every single service. This was slow, expensive, and prone to errors.

Recently, a new standard called MCP (Model Context Protocol) arrived. Think of MCP as a universal "universal remote control" for AI agents. Instead of building a custom translator for every TV, you just plug the remote in, and it works.

But here's the big question the paper asks: How are these new "universal remotes" actually being built? Are they smart, custom-tailored interfaces, or are they just clumsy copies of the old complex languages? And can we build them automatically?

Here is the story of their findings, explained through a few simple analogies.

1. The "Copy-Paste" Reality (What are they doing?)

The researchers looked at 116 of these new MCP servers (the "remotes").

  • The Finding: 88% of them are just bare-bones wrappers.
  • The Analogy: Imagine you want to order a pizza. The pizza place has a complex menu with 600 items (the REST API). Instead of creating a simple "Order Pizza" button for the robot, the developer just gave the robot a photocopy of the entire 600-item menu.
  • The Result: The robot is overwhelmed. It sees 600 options when it only needs 50. The paper found that most MCP servers are just "translating" the complex menu directly, without simplifying it. They are "thin wrappers"—they pass the message through but don't add any smarts.

2. The "Curated Menu" (What should they be doing?)

The researchers then asked: "If we look at the real-world MCP servers that do work well, what are they hiding?"

  • The Finding: Good servers only expose about 19% of the available tools. They hide the scary stuff.
  • The Analogy: A good restaurant doesn't show the customer the "Delete Database" or "Change Password" buttons on the menu. They curate the menu. They show you the "Pepperoni Pizza" and "Garlic Bread" but hide the "Kitchen Fire Extinguisher" and "Chef's Secret Sauce Recipe."
  • The Pattern: They found a clear pattern:
    • Exposed: "Read" tools (looking at data, searching, listing items).
    • Hidden: "Dangerous" tools (deleting things, changing settings, managing passwords).
    • Hidden: "Boring" tools (technical settings, deprecated old features).
    • Grouped: Instead of having a button for "Get List of Users" and another for "Get User #123," they combine them into one smart button: "Get User" (which asks, "Which one?").

3. The "Broken Blueprint" Problem (Why can't we just automate it?)

The researchers tried to build an automatic machine (AutoMCP) that takes the complex menu (OpenAPI specification) and instantly builds the simple remote (MCP server).

  • The Problem: The blueprints (OpenAPI specs) provided by companies are often messy.
    • Sometimes the blueprint says "No password needed," but the door actually requires a key.
    • Sometimes the blueprint says the address is "The Pizza Place," but it doesn't say which city.
    • Sometimes the blueprint is missing the "secret sauce" instructions (headers) needed to open the door.
  • The Result: When the machine tried to build the remote automatically, it failed about 24% of the time because the blueprints were broken.

4. The "Auto-Repair" Solution (How they fixed it)

The team built a tool called SpecFix (Specification Fixer). Think of it as a spell-checker that also fixes the grammar of the blueprint.

  • How it works: It compares the messy blueprint against the company's official website documentation. If the blueprint says "No password" but the website says "Login required," SpecFix fixes the blueprint automatically.
  • The Result: After fixing the blueprints, the automatic builder succeeded 94% of the time! It went from "mostly broken" to "almost perfect."

5. The "Smart Filter" (Making it usable)

Even with a perfect blueprint, the machine would still generate 600 buttons for the robot, which is too many for the robot to handle.

  • The Solution: They applied the "Curated Menu" rules they discovered earlier.
    1. Filter: Automatically delete the "Delete Database" and "Settings" buttons (the dangerous/boring stuff).
    2. Group: Combine "Get List" and "Get Item" into one smart button.
  • The Result: They reduced the number of buttons by one-third. The robot now has a manageable, clean menu instead of a chaotic wall of options.

The Big Takeaway

This paper is like a detective story that solved a mystery in the world of AI:

  1. The Mystery: Why are AI agents struggling to use tools?
  2. The Clue: Developers are just copying complex menus instead of curating them.
  3. The Fix: We can build these tools automatically, but we need to:
    • Fix the blueprints (because they are often broken).
    • Curate the menu (hide the dangerous stuff and group similar items).

The authors released a tool called AutoMCP that does all of this. It takes a messy, complex API, fixes its errors, hides the dangerous buttons, groups the similar ones, and hands the AI agent a clean, simple, and safe "universal remote" to get the job done.

In short: We don't need humans to manually build every single tool anymore. We just need a smart machine to clean up the instructions and give the AI a simple, safe menu to work with.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →