Agoda Open Sources APIAgent to Convert Any REST pr GraphQL API to MCP Server with Zero Code

Building AI agents is the new gold rush. But every developer knows the biggest bottleneck: getting AI to interact with your data. Today, travel giant Agoda is tackling this problem head-on. They have officially launched APIAgentan open source tool designed to turn any REST or GraphQL API into a Model Context Protocol (MCP) server with 0 codes again 0 submissions.
Issue: ‘Incorporation Tax‘
Until recently, if you wanted your AI agent to check flight prices or look up a website, you had to write a custom tool. When Anthropic releases i Model Context Protocol (MCP)created a common way for Large Language Models (LLMs) to connect to external tools.
However, even with MCP, workflow is a concern. The developer must:
- Write a new MCP server in Python or TypeScript.
- Explain all tools and their parameters in practice.
- Use and maintain that server.
- Update the code every time the underlying API changes.
The Agoda team calls this the ‘combination tax.’ For a company with 1000 internal APIs, writing 1000 MCP servers is not realistic. APIAgent their answer to this measurement problem.
What is APIAgent?
APIAgent is a universal MCP server. Instead of writing custom logic for the entire API, you use APIAgent as a proxy. It sits between your LLM (like Claude or GPT-4) and your existing APIs.
The tool is built on a specific technology stack:
- FastMCP: Enables the MCP server layer.
- OpenAI Agents SDK: It handles the orchestration of the language model.
- DuckDB: SQL engine used for performance SQL post-processing.
The ‘magic’ is in its ability to understand API documentation. You provide a description of your API—using the OpenAPI REST information or schema se GraphQL-and APIAgent handles the rest.
How It Works?
The architecture is straightforward. APIAgent acts as a gateway. When a user asks an AI agent a question, the flow looks like this:
- Application: A user asks, ‘Show me the top 10 hotels in Bangkok with the most reviews.’
- Schema Introspection: APIAgent automatically checks the API schema to understand the available endpoints and fields.
- SQL Layer (DuckDB): This is the secret sauce. If the API returns 10,000 unsorted rows, the APIAgent runs DuckDB filtering, sorting, and concatenating that data locally with SQL before sending the summary result back to LLM.
- Answer: The JSON data goes back through the APIAgent, formatting it for the AI to read.
This program uses Power Tool Discovery. You can point APIAgent to any URL, and it automatically generates the required LLM tools without manual mapping.
Key Feature: ‘Recipe’ Reading
One of the important features Recipe Reading. If a complex natural language query runs successfully, the APIAgent can extract the trace and save it as a ‘Recipe.’
- These recipes are parameter templates.
- The next time the same query is asked, the APIAgent uses the recipe directly.
- This bypasses the expensive LLM imaging step, which greatly reduces delays and costs.
Key Takeaway
- Universal Protocol Bridge: APIAgent works as a single, open source agent that converts any REST or GraphQL API to the Model Context Protocol (MCP) server. This removes the need to write custom boilerplate code or maintain individual MCP servers for every internal microservice.
- Testing Zero-Code Schema: The tool is ‘priority setting.’ By simply pointing APIAgent to OpenAPI definition or GraphQL endpointautomatically imports the schema to understand endpoints and fields. It then exposes these to LLM as active tools without manual mapping.
- Advanced SQL Post-Processing: It includes DuckDBan in-process SQL engine, for handling complex data manipulation. If the API returns thousands of unsorted rows or has no specific filtering, APIAgent uses SQL to arrange, assemble, or assemble data in the environment before delivering a short answer to the AI.
- Working with ‘Recipe Learning’: To solve the high delay and cost of LLM, the agent installs features Recipe Reading. It records a successful execution trace of a natural language query and saves it as parameterized template.
- Security-First Architecture: The program ‘I’m Safe By default,‘ which works in read-only mode. Any ‘transformation’ verbs (eg
POST,PUTorDELETErequests) are strictly prohibited by the proxy unless the developer explicitly authorizes it in the YAML configuration file.
Check it out PR Here. Also, feel free to follow us Twitter and don’t forget to join our 100k+ ML SubReddit and Subscribe to Our newspaper. Wait! are you on telegram? now you can join us on telegram too.
Michal Sutter is a data science expert with a Master of Science in Data Science from the University of Padova. With a strong foundation in statistical analysis, machine learning, and data engineering, Michal excels at turning complex data sets into actionable insights.




