In short
- An API is the interface a service offers. MCP is a protocol that lets an AI app ask a server which tools it has and call them, and most MCP servers call an ordinary API underneath.
- With an API, your code picks the call when you write it. With MCP, the model picks from a list it reads while it runs.
- MCP saves connector code when many applications meet many tools. It costs context tokens for every tool definition, and it adds a second place where permissions must be checked.
- Call the API directly when your code knows the call. Consider MCP when a model chooses among many tools, written by other people, that change over time.
They sit at different layers
Most comparisons of MCP and APIs are out of date in one detail. The Model Context Protocol has a current revision, 2026-07-28, and its changelog removed the initialize handshake and the protocol-level sessions that earlier revisions required. Every request now carries its protocol version and the client's capabilities with it. An article that calls MCP the stateful one and APIs the stateless one is describing revision 2025-11-25 or older.
So what is each one? An API is the interface a service offers to programs. The OpenAPI specification describes HTTP APIs so that people and tools can understand what a service can do without reading its source code. MCP is a protocol of JSON-RPC messages between an AI application and a server. The server lists tools, each with a name, a description and a JSON Schema for its input, and the specification calls tools model-controlled: the model can discover and call them on its own. Behind a tool there is very often an ordinary API. The tools page itself gives querying databases and calling APIs as examples.
Swipe sideways to see the whole figure
Switch the figure between the two. With a plain API, three of the four steps happen before the program ships: someone reads the documentation, writes the call and tests it. At run time the program makes the call it was written to make. With MCP, all of it happens while the agent runs. The app asks the server for its tools, the model picks one by reading the descriptions, and the app sends the call with the arguments the model filled in. Turn the revision switch to 2025-11-25 and a handshake step appears at the front. In the current revision it is gone.
Why a shared protocol exists at all
Suppose three AI applications each need four tools: a calendar, a CRM, a ticket system and a file store. If every application writes its own connector for every tool, that is 3 × 4 = 12 connectors to build and keep working. If each application speaks one protocol and each tool offers one server, it is 3 + 4 = 7. Anthropic's engineering team puts the problem this way: connecting agents to tools has meant a custom integration for each pairing, which is duplicated effort.
Swipe sideways to see the whole figure
Drag the sliders. The gap opens as either side grows: 6 applications and 8 tools is 48 connectors against 14. Look at the other end too. One application that calls four services has no pairing problem. It needs four API clients, it has them, and a protocol between them only adds a layer. The saving belongs to the case where many applications meet many tools.
The cost nobody draws: every tool definition is text the model reads
A model chooses a tool by reading its definition, so the definitions have to sit in front of it. Anthropic's engineering team describes this in its post on code execution with MCP. Most MCP clients load all tool definitions upfront into the context window, and an agent connected to thousands of tools may need to process hundreds of thousands of tokens before it reads the request. Results cost tokens as well. In the post's example, copying a two-hour sales call transcript from one tool to another sends the transcript through the model twice, an extra 50,000 tokens. A direct API call from your code has neither cost, because the model never sees a list and never carries the data.
Swipe sideways to see the whole figure
Set 60 tools at 400 tokens each, a made-up size, and the definitions take 24,000 tokens, 12% of a 200,000-token window, before the user has typed anything. Switch to loading only five at a time and it is 2,000 tokens. Anthropic reports a drop of the same kind in its own example: from 150,000 tokens to 2,000, a saving of 98.7%, when the agent loads only the definitions a task needs. That is one example from one post and no promise for your setup. The idea carries over: connect fewer tools to each agent, keep descriptions short, and load the rest on demand.
A server in the middle needs its own permission checks
An MCP server is a second front door to the same system. The API behind it already knows how to refuse a caller without rights. The server in front of it knows only what it was built to know. If the server calls the API with one powerful key of its own, the API sees the server on every request and never the person behind it.
The specification pushes the other way. An MCP server must validate that an access token was issued for it, and token passthrough, forwarding the token it received on to the downstream API, is explicitly forbidden. The tools page lists what a server must do: validate all tool inputs, implement proper access controls, rate limit calls and sanitize outputs. Authorization itself is optional in MCP, and a local server on stdio takes its credentials from the environment, so whether anyone checks who is calling depends on how it was set up.
Swipe sideways to see the whole figure
Flip the figure between the two settings. The rules are made up: support staff can read orders and refund up to 50 dollars, and the intern can only read. With one admin key on the server, all five requests succeed, including a 5,000 dollar refund and a full customer export from the intern's account. With the caller's own rights carried through, the API stops those two and 3 of 5 go ahead. Forwarding the received token is ruled out, so the server needs its own way to act for that user, and designing it is part of the work.
Which one to pick
Three questions decide most cases: who chooses the next call, how many services are involved, and who runs them. The figure turns the answers into a rule of thumb. It is my own rule, not part of the specification.
Swipe sideways to see the whole figure
The first answer usually settles it. If your code decides, call the API. If the model decides among two or three things you own, describe them as tools in your agent's code. A protocol starts to pay when many tools, written by other people, change over time, or when a vendor already publishes a server you want to use.
Start from an API that is already clean
An MCP server is a thin layer, so the API underneath has to be documented and have sensible limits first. This is the shape of one tool that wraps a refund call. The name says what it does, the description says when to use it, and the schema accepts only the fields the API needs.
{
"name": "refund_order",
"description": "Refund part or all of one order. Use only when the customer asked for a refund.",
"inputSchema": {
"type": "object",
"properties": {
"order_id": { "type": "string" },
"amount_cents": { "type": "integer", "minimum": 1 }
},
"required": ["order_id", "amount_cents"]
}
}Expose a few tools, not every endpoint
One tool for each endpoint turns a hundred-endpoint API into a hundred definitions in the prompt, and the context figure shows what that costs. Group the tools around what a user wants done and leave the rest out.
Act as the person, and say what went wrong
Check the caller's token on the server, call the API with that person's rights and log every call. When a call fails, return a tool error with isError: true and a clear message such as "amount is above this user's limit". The specification says clients should pass tool execution errors to the model so it can correct itself, and a bare failure gives it nothing to correct.
Where a startup's version of this goes wrong
- An MCP server is built for one internal script that could have called a function.
- The server holds an admin key because that was the quickest way to make the demo work.
- Every endpoint becomes a tool, so the agent starts each task with a long list to read.
- A server made for one laptop, with a key in an environment variable, ends up shared by the whole team.
- A third-party server is connected and nobody reads what its tools claim to do. The tools page tells clients to treat tool annotations as untrusted unless the server is trusted.
How this looked in a real product
In the parts of Aslam HQ, my own agency system, that its case study describes, the calls to Claude, LinkedIn, X and the email provider are ordinary API calls made from the app's own routes. My code decides each call, so there is no list for a model to choose from and no protocol layer in between.
The permission rule from this article is built in. Each route checks the person and their grant again before it uses the service key, and the AI features read the conversation through the caller's own session, so Claude only sees what that person is allowed to see. If I put a server in front of HQ for an agent to call, that is the rule the server would have to keep.
Questions to answer before you add an MCP server
- Who picks the next call in this feature, our code or a model?
- Would two or three tool definitions in the agent's own code do the job?
- How many tool definitions does the agent read before the first request, and how many tokens is that?
- Which key does the server use to call the API, and does it carry the caller's rights?
- Is every token checked as issued for this server, and is none of them forwarded downstream?
- What do we log for each call, and who reads it?
- Who wrote each third-party server we connect, and who has read what its tools say they do?
Sources
- Model Context Protocol, versioning (current revision 2026-07-28)
- MCP specification 2026-07-28, changelog (handshake and sessions removed)
- MCP specification 2026-07-28, Tools (model-controlled, tools/list, tools/call, errors, security)
- MCP specification 2026-07-28, Authorization (optional, token audience)
- MCP specification 2025-11-25, Lifecycle (the initialize handshake)
- MCP security best practices (token passthrough)
- OpenAPI Specification v3.2.1
- Anthropic Engineering, Code execution with MCP (4 November 2025)
The animated figures are simplified illustrations that use the numbers stated in the text. Where a figure is modelled on a real incident, the sources above are the full accounts.
