Architecture
MCP vs API: what is the difference, and which should you build?
"Should we build an MCP server or just use our API?" is one of the most common questions we hear from teams adding AI to their product. The short answer: it is not either/or. MCP usually sits on top of an API.
If you are new to MCP, start with What is MCP? first.
Two different audiences
An API (usually REST or GraphQL) is a contract for developers. A human reads the docs, picks the endpoints, writes the code and decides when to call what.
MCP is a contract for AI models. The model discovers what is available at runtime, reads each tool's description and schema, and decides on its own which one to call.
Same underlying system, different consumer.
Side by side
| API | MCP | |
|---|---|---|
| Built for | Developers writing code | AI apps and agents |
| Discovery | Read the docs ahead of time | Asked at runtime (tools/list) |
| Shape | Many endpoints, HTTP verbs, status codes | A few named tools with JSON Schema inputs |
| Integration cost | One client per app per API | One server, usable by any MCP client |
| Who decides to call it | Your code | The model, within limits you set |
| Transport | HTTP | JSON-RPC over stdio or Streamable HTTP |
Same task, two ways
Say you want open issues from your tracker.
With the API, your code makes the call:
curl -H "Authorization: Bearer $TOKEN" \
"https://api.example.com/v1/issues?state=open&limit=20"
You chose the endpoint, the parameters and when to run it.
With MCP, the model sees a tool like this:
{
"name": "list_issues",
"description": "List issues in the tracker. Use state='open' for unresolved work.",
"inputSchema": {
"type": "object",
"properties": {
"state": { "type": "string", "enum": ["open", "closed", "all"] },
"limit": { "type": "integer", "maximum": 50 }
}
}
}
When a user asks "what is still open this sprint?", the model calls list_issues with { "state": "open" }. Behind the scenes, the MCP server makes that same API request.
MCP wraps your API
In practice the stack looks like this:
- Your database and business logic.
- Your API, which exposes it to your web app, mobile app and partners.
- An MCP server, which exposes a curated, AI-friendly slice of that API.
The MCP server is a thin adapter. It should not duplicate business rules. Its job is to pick the operations that make sense for a model, describe them clearly and enforce the right permissions.
A simple rule for choosing
- Only your own code calls it, on fixed logic? Use the API directly.
- An AI agent needs to decide when and how to use it? Put an MCP server in front of the API.
- Partners or customers want to plug your product into their AI tools? Ship an MCP server, the same way you once shipped an SDK.
Design tips for a good MCP server
- Fewer, task-shaped tools beat one tool per endpoint.
find_customeris easier for a model than five search endpoints. - Write descriptions for the model. Say when to use the tool, not just what it returns.
- Keep outputs small and focused. Return the fields that matter, not the whole payload.
- Keep auth and guardrails in the server. The model should never see raw credentials.
The takeaway
Your API is still the foundation. MCP is the layer that lets AI agents use it safely and without custom glue. Most teams that are serious about AI end up with both.
Building something like this? Talk to us about designing an MCP server for your product.