MCP vs API for agents: when each one fits
MCP and a plain API both let an agent reach outside data. What the agent handles in each, when to pick which, and a prompt to test both on your job.
Walid Boulanouar · · 5 min read
On this page
People ask whether an agent should use MCP or call an API directly. The question mixes two levels. An API is how a service exposes its features. MCP is a standard way to package tools so an agent can find and call them. Many MCP servers call an API inside.
So the real choice is about who does the glue work. With MCP, the server author did it. With a raw API, your agent or your code does it.
What the agent has to handle
The clearest way to compare them is to list the jobs that land on the agent in each case.
| Job | Calling a raw API | Using an MCP server |
|---|---|---|
| Finding what exists | Read docs, or you paste them in | The server lists its tools and inputs |
| Building the request | Agent writes the HTTP call, headers and body | Agent fills named arguments |
| Authentication | You store a key and wire it into the code | Set once in the connection, often a browser sign-in |
| Reading the response | Agent parses whatever shape the API returns | Server may return trimmed, agent-friendly output |
| Errors and retries | Agent or your code handles rate limits and failures | Depends on the server, often partly handled |
| Context size | Raw responses can be long | Depends on how the server shapes output |
| Control | Full, you choose every field | Limited to the tools the server exposes |
None of these rows is a verdict. Each is a trade between effort and control.
When a raw API fits
Use the API directly when you need a field the MCP tools do not expose, when the job is a fixed script that runs the same way every time, or when you want exact control over retries and storage. A nightly script that pulls one report does not need an agent to discover anything. The code already knows what to call.
It also fits when you are building a product. You will want typed code, tests and logs you own.
When MCP fits
Use MCP when the agent chooses the work as it goes. You ask for something loose, such as finding the right contact at a company, and the agent has to pick a tool, read the result and decide what to do next. A tool list with plain descriptions is what makes that possible. Discovery is the point.
It also fits when you want to try a data source in ten minutes. Adding a server is quicker than reading docs and writing a client.
The costs people forget
- Every connected server adds tool descriptions to the agent's context. Many servers at once can crowd it.
- A server author decides what a tool returns. If it drops a field you need, you cannot get it back.
- Several MCP servers mean several accounts, keys and bills, unless one connection covers them.
- A raw API means you maintain the client when the provider changes something.
That third point is the one looot targets. One connection, one balance, many providers behind it. The agent searches the catalog, reads the endpoint's inputs and calls it. If you need a raw call, the same catalog is reachable over HTTP, so you can start with the agent and move a stable job into code later.
An honest recommendation
Start with MCP while you are exploring. You learn which calls you need fast. When a job becomes routine and you can name every input, move it to a script that calls the API. Keep MCP for the open-ended parts.
Test it on your own job
Reading a table only goes so far. Give your agent one real job and have it report what the work felt like.
Prompt for your agent
Prompt to compare both paths
The answer is specific to your stack, which is the point. For background on the protocol, read what is an MCP server. To see the tools behind one provider, open the Exa page.
Questions
Keep reading
What is an MCP server? A plain explanation
An MCP server gives an AI agent tools it can call. What a tool call looks like, and how one connection can reach many providers.
Walid Boulanouar · · 5 min read
Set up looot with one line: skill.md and llms.txt
Give your agent one URL and it can set up looot itself. What skill.md and llms.txt are, what each one tells an agent, and a prompt you can paste today.
The looot team · · 3 min read
Build your own CRM with an agent and Supabase
Let an AI agent build a small CRM in your own Supabase project. The five tables, the loop, seven rules, the exact prompt and one step not available yet.
Walid Boulanouar · · 5 min read
Try it with the agent you already use
Start your workspace, top up, and paste one prompt into your agent.