The creation of AI agents is the new gold rush. But every developer knows the biggest hurdle: getting AI to actually communicate with your data. Today, travel giant Reservations is tackling this problem head-on. They have officially launched APIAgentAn open-source tool designed to transform any REST or GraphQL API into a Model Context Protocol (MCP) server 0 code And 0 deployment.
Problem: ‘integration tax’‘
Until recently, if you wanted your AI agent to check flight prices or look at a database, you had to write a custom tool. When Anthropic released Model Reference Protocol (MCP)This created a standard way for large language models (LLMs) to connect to external tools.
However, even with MCP, the workflow is tedious. A developer must:
- Write a new MCP server in Python or TypeScript.
- Define each device and its parameters manually.
- Deploy and maintain that server.
- Update code every time the underlying API changes.
The agoda team calls this the ‘integration tax’. For a company with thousands of internal APIs, writing thousands of MCP servers is not realistic. APIAgent Their answer to this scaling problem.
What is APIAgent?
APIAgent is a universal MCP server. Instead of writing custom logic for each API, you use APIAgent as a proxy. It sits between your LLM (like cloud or GPT-4) and your existing API.
The tool is built on a specific technology stack:
- FastMCP: MCP powers the server layer.
- OpenAI Agent SDK: The language model handles orchestration.
- DuckDB: Used for an in-process SQL engine SQL post-processing.
The ‘magic’ lies in its ability to understand API documentation. You provide a definition of your API—by using a openapi Specification for REST or a schema for it graphql-And the APIAgent handles the rest.
how it works?
The architecture is simple. APIAgent acts as a gateway. When a user asks a question to an AI agent, the flow looks like this:
- Prayer: The user asks, ‘Show me the top 10 hotels in Bangkok with the most reviews.’
- Schema Introspection: APIAgent automatically inspects the API schema to understand the available endpoints and fields.
- SQL Layer (DuckDB): This is the secret sauce. If API returns 10,000 unsorted rows, APIAgent uses duckdb Filtering, sorting and aggregating that data locally via SQL before sending the summary results back to the LLM.
- feedback: The JSON data goes back through the APIAgent, which formats it for the AI to read.
This system uses Dynamic Tool Discovery. You can point APIAgent to any URL, and it automatically generates the necessary tools for LLM without manual mapping.
Key Feature: Learning ‘Recipes’
One of the key features learning recipes. When a complex natural language query executes successfully, APIAgent can extract the trace and save it as a ‘recipe’.
- these are prescriptions parameterized template.
- The next time a similar question is asked, the APIAgent uses the recipe directly.
- This skips the expensive LLM reasoning step, which significantly reduces latency and cost.
key takeaway
- Universal Protocol Bridge: APIAgent serves as a single, open-source proxy that transforms any REST or GraphQL API in the Model Context Protocol (MCP) server. This removes the need to write custom boilerplate code or maintain separate MCP servers for each internal microservice.
- Zero-Code Schema Introspection: The tool is ‘configuration-first’. By simply pointing to the APIAgent OpenAPI Specification Or graphql endpointIt automatically introspects the schema to understand the endpoints and fields. It then exposes these in the LLM as a functional tool without manual mapping.
- Advanced SQL Post-Processing: it integrates duckdbAn in-process SQL engine to handle complex data manipulation. If an API returns thousands of unsorted rows or lacks specific filtering, APIAgent uses SQL sort, collect or combine Data at the local level before giving a concise answer to AI.
- Demonstration through ‘Recipe Learning’: To solve high latency and LLM costs, the agent features learning recipes. It records the successful execution trace of a natural language query and saves it as a parameterized template.
- Security-First Architecture: the system is ‘Secure by default,‘ is working in read-only state. Any ‘transformative’ actions (e.g.
POST,PUTOrDELETErequests) are strictly blocked by the proxy unless a developer explicitly whitelists them in a YAML configuration file.
check it out Here PR. Also, feel free to follow us Twitter And don’t forget to join us 100k+ ml subreddit and subscribe our newsletter. wait! Are you on Telegram? Now you can also connect with us on Telegram.

Michael Sutter is a data science professional and holds a Master of Science in Data Science from the University of Padova. With a solid foundation in statistical analysis, machine learning, and data engineering, Michael excels in transforming complex datasets into actionable insights.