Estimate Project

MCP vs API: what changes when an AI model calls your product

A laptop and a smiling chat bubble holding tool cards plug cables into one socket box with data icons, while a black cat watches.

An API is an interface that developers write code against: their code decides which endpoint to call and when. MCP (Model Context Protocol) is an open standard through which AI applications such as Claude, ChatGPT, and Cursor find a product's tools and let a language model decide which one to call. The two do not compete. Most MCP servers call an existing API underneath, so the decision to make is whether AI applications outside your code should use your product.

For the basics of hosts, clients, and the three kinds of capability a server offers, see our explanation of what an MCP server is.

MCP vs API at a glance

Most differences come from one fact: an API is called by code that a developer wrote, and an MCP tool is called by a model while it works on a user's request. The table compares a typical REST API with a remote MCP server on seven points.

AspectREST APIMCP server
Who decides what to callCode that a developer wrote before the releaseThe language model, at the moment it handles a request
Message formatHTTP methods, resource URLs, status codes, JSON bodiesJSON-RPC 2.0 messages such as tools/list and tools/call
TransportHTTPstdio for a local server, Streamable HTTP for a remote one
How features are foundDocumentation, often an OpenAPI description, read by a developerA tool list that the client requests at run time and the model reads
AuthorizationYour choice: API keys, OAuth 2.0, mutual TLSOptional; a remote server that uses authorization follows a flow based on OAuth 2.1, a local server reads credentials from the environment
StateStateless by REST conventionStateless since the 2026-07-28 revision; earlier revisions use sessions
TestingContract and integration tests with fixed inputsThe same tests, plus checks that a model picks the right tool from its description

Who makes the call: your code or the model

With an API, a developer reads the documentation and writes code that calls specific endpoints in a specific order, so every call path exists before the release. With MCP, the AI application gives the model a list of tools, and the model chooses a tool and its arguments while it handles a user's request. The MCP specification calls tools model-controlled for this reason.

This changes what counts as the interface. For an API, the contract is the endpoint and its schema. For an MCP tool, the description is part of the contract too: the model reads it to decide, so a vague description leads to a wrong call even when the code behind it is correct. Testing changes too: on top of the usual contract and integration tests, you check that a model picks the right tool from its description.

A model making the call also changes where mistakes come from. A bug in API client code is a bug in code you can read and fix. A wrong tool call can come from a request the user phrased loosely or from text the model read in a document. For this reason, the specification recommends that a person can always deny a tool call.

Protocol: JSON-RPC 2.0 vs REST

A REST API spreads its features across URLs and HTTP methods: a GET request to /orders/1042 reads an order, a POST request to /refunds creates a refund, and the status code tells the client what happened. MCP encodes every message in JSON-RPC 2.0, and the method name and arguments travel in the message body. Here is the same lookup both ways:

GET /api/orders/1042
Authorization: Bearer <token>
POST /mcp
Authorization: Bearer <token>

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "get_order",
    "arguments": { "order_id": "1042" }
  }
}

The MCP request is shortened: the specification also requires protocol metadata, such as the protocol version, in every request.

Errors work differently as well. A REST API answers a failed request with a 4xx or 5xx status code. An MCP server reports a failed tool run inside a normal result with an error flag, and the specification asks clients to pass such errors to the model so it can correct its next call.

Transports and state

MCP defines two standard transports. A local server runs as a process that the AI application starts on the user's computer, and the two exchange messages through standard input and output (stdio). A remote server uses Streamable HTTP: every message is an HTTP POST request to one MCP endpoint.

Since the 2026-07-28 revision, MCP is stateless: the opening handshake and protocol sessions are gone, and every request carries the protocol version and the client's capabilities. A server handles each request on its own and should not require a client to reuse the same connection or process. Clients and servers built on earlier revisions still open a session, so check which revision the AI applications you target support.

Discovery: documentation vs a tool list at run time

An API is found through documentation. An OpenAPI description lets both people and programs see what an HTTP API can do, but a developer still writes and releases code before a new endpoint gets used. An MCP client asks the server for its tools with a tools/list request at run time. Each tool comes with a name, a description, and a JSON Schema for its inputs, and the model works from that list.

Two consequences matter for planning:

  • New tools need no client release. A tool you add reaches users of every connected AI application. The specification also lets the list depend on the caller's authorization, so a server can show each user only the tools their access allows.
  • Every tool costs context. Each description takes space in the model's context. A server that exposes every endpoint as a separate tool makes the model choose among many similar options, and wrong choices become more likely. Thoughtworks put naive API-to-MCP conversion in the Hold ring of its Technology Radar in November 2025. Its reasons: fine-grained endpoints that a model chains together waste tokens and clutter the context, and internal endpoints can expose sensitive data or allow destructive operations that nothing reliably stops an agent from calling.

“An API can keep version one running while clients move to version two. A tool has no built-in version: every connected assistant works from the server's current tool list, so a renamed tool or a reworded description changes behavior for every user at once, unless you run a separate server for the new version. Change tool descriptions as carefully as an endpoint.”

Alexander Storozhevsky, Lead developer at Ronas IT

Authorization: your own scheme vs an OAuth 2.1 flow

An API leaves authorization to you: API keys for calls between servers, OAuth 2.0 when a third-party app acts for a user, mutual TLS between internal services. In MCP, authorization is optional, but the specification defines one flow for remote servers over HTTP, based on OAuth 2.1. Local servers that use stdio do not follow it and read credentials from the environment instead.

For a remote server on top of your API, three things change:

  • The MCP server is a protected resource. It must publish OAuth 2.0 Protected Resource Metadata, a small document that tells an AI application where to get a token, so the application can find your authorization server on its own.
  • Tokens are issued for the MCP server. The server checks that each token was meant for it and does not forward the client's token to your API. The official security best practices call that shortcut token passthrough and describe it as an anti-pattern. To call your API, the server uses a separate token issued for the API.
  • The caller can be misled. API client code does what it was written to do. A model also reads emails, tickets, and web pages, and that text can carry instructions aimed at it, an attack called prompt injection. Keep the permission checks in your API, and have the user confirm any action that changes data or spends money.

When to add an MCP server on top of your API

Add an MCP server when AI applications that you do not build should use your product. The server is usually a thin layer over the API you already have. It offers tools built around user tasks, calls your endpoints, and leaves the permission checks in the API.

  • Your customers work in AI assistants. They can look up an order or put together a report from Claude or ChatGPT, without opening your interface.
  • Internal teams need one assistant over several systems. If the CRM, the support ticket tool, and the knowledge base each have a server, an employee can ask one question instead of searching three tools.
  • Your product is a developer tool. Developers already work in Cursor, Visual Studio Code, and Claude Code, and an MCP server brings your product into those editors.
  • You want one integration for many AI clients. One server can serve many MCP clients, instead of a separate custom integration for each assistant.

The build itself runs from choosing the tasks and designing the tools to authorization, testing, and deployment. Our guide on how to build an MCP server walks through each step.

An example: our MCP server that calls the Open WebUI API

Open WebUI is a self-hosted AI chat platform with its own API and knowledge bases. Our open-source MCP server for Open WebUI does not replace that API: it calls it and gives AI applications such as Cursor and Claude Desktop tools to list the knowledge bases, search them, get details about each one, and read a file's full text. It does not follow the OAuth flow described above: in remote mode, every user supplies an Open WebUI API token of their own, which the server forwards to Open WebUI. A server open to outside users should not take this shortcut.

When the API is enough

An MCP server is one more layer to build, host, and secure, and it pays off only when AI applications outside your code need your product. In the following cases, it adds that work without the payoff, or has nothing to build on yet.

  • The AI feature lives inside your own app. If your app has a support chatbot that looks up orders, it can reach your backend through function calling, with no protocol layer in between.
  • Integrations between systems are fixed. Copying invoices from billing to the CRM should run the same way every time, so code should decide what to call, not a model.
  • The work is a bulk job. A nightly export or an import of many records runs faster and costs less as plain API calls than as a model choosing tools one call at a time.
  • Partners integrate through code. A payment or logistics partner writes code against your API and needs a stable, versioned contract.
  • There is no API yet. An MCP server wraps functions that already exist, so the API comes first.

MCP vs function calling

Function calling and MCP both let a model call tools; the difference is where the tools live. With function calling, your app describes its tools in each request to one model provider, the model returns the call it wants, and your application runs each call. Only your app can use those tools. With MCP, the tools live on a server that any MCP client can connect to. A product can use both: function calling for its own AI features, an MCP server for outside assistants.

What an MCP server costs when the API already exists

If your product already has an API, Ronas IT prices the MCP server for it as one AI feature, which is $3,000 and up per AI feature, with a timeline from one week. Hosting a remote server is a separate cost: we can run it in your own cloud account from $200 per month. If the API does not exist yet, building it is estimated separately.

The scope of custom MCP server development depends mainly on two things: the number of systems the server connects to and how fine-grained its access rules are.

Third-party systems add upkeep after launch, mostly in sign-in, and some failures look like success: Nango reports token endpoints that return HTTP 200 with the error in the body. If the MCP server passes such a response on as a normal result, the model may tell the user there is nothing to find, so the server has to check that its credentials still work and report a failed call as an error.

What to do next

  1. List the tasks people would ask an AI assistant to do in your product, and note who asks: users of your own app, customers in their own assistants, or employees.
  2. For each task, check that your API already has the endpoint and the permission check it needs.
  3. If the tasks come from assistants outside your app, plan an MCP server with a few tools built around those tasks. If they stay inside your app, use function calling against your API.

Not sure whether your product needs an MCP server or only its API? List the tasks you want an assistant to do, and we will recommend MCP, a direct API integration, or both, with a preliminary estimate.

Frequently Asked Questions (FAQs)

Is MCP an API?

In a broad sense, yes: it is an interface between programs, defined by an open protocol. In everyday use, "API" means a product's own interface for developers, such as a REST API, and MCP is a standard layer that AI applications use on top of it. An MCP server usually calls the product's API to do its work.

Will MCP replace APIs?

No. An MCP server needs something to call, and in most cases that is an API. Web and mobile clients, partner integrations, and data syncs between systems keep using APIs. MCP adds one more way to use the same features: through AI applications.

Is MCP the same as function calling?

No. With function calling, your app defines the tools in each request to the model provider and runs the calls itself; with MCP, the tools sit on a separate server that any MCP client, from a chat assistant to a code editor, can use.

Can I turn an existing REST API into an MCP server?

Yes, and that is the usual way to build one. A server can be generated from an OpenAPI description, but a server that copies every endpoint is hard for a model to use. Better results come from a few tools built around user tasks, each of which may call several endpoints, with clear descriptions and the permission checks your API already has.

Does MCP use REST?

No. A remote MCP server works over HTTP, but it does not follow REST conventions. Every message is a POST request to one endpoint, and the method name, such as tools/call, sits inside the JSON-RPC message instead of in the URL or the HTTP method.

Is MCP slower than calling an API directly?

The protocol adds one step: the MCP server receives the tool call and then calls your API. That step is small next to the time a model needs to choose a tool and read its result. The difference that matters is the model, not the protocol.

What is the difference between an MCP gateway and an API gateway?

An API gateway sits in front of APIs and handles routing, authentication, rate limits, and logging for HTTP calls from code. An MCP gateway does similar work for MCP servers: it puts several servers behind one address and applies access rules and logging to tool calls.

Which AI applications support MCP?

In its December 2025 announcement, Anthropic listed ChatGPT, Cursor, Gemini, Microsoft Copilot, and Visual Studio Code as products that had adopted MCP; Claude supports it through its connectors.

Related posts

A smiling chat bubble plugs one cable into a socket box wired to database, folder, calendar and wrench icons, while a black cat watches.
Tech
What is an MCP server? How it works and when your product needs one
2026-12-03 • 13 min read
A black cat tightens a stacked server box with a wrench on a workbench; a cable runs to a smiling chat bubble beside database, key and gear icons.
How to
How to build an MCP server: 7 steps from the first tool to production
2026-12-03 • 17 min read
A developer kneels with a wrench to assemble a robot, asking a question in a speech bubble while the robot answers with a smile
How to
How to build a custom AI agent: steps, architecture, and cost
2026-11-16 • 22 min read
Robot arms place cards, a light bulb and a chart around a window with a chat between two users and a robot
How to
AI business integration: how to add AI to the processes you already run
2026-11-17 • 14 min read