MCP vs REST API for AI Agents: Which to Use

A builder who already runs a REST API has to decide whether to also expose an MCP server, or wrap the same endpoints in a tool-calling schema for one agent. Here is how to choose.

Carlo Zuercher
Carlo Zuercher
Staff Engineer, Platform
16 August 20261 min read

If you already have a working REST API and you are deciding whether to also build an MCP server for it, the short answer depends on how many different AI clients need to call it. A thin tool-calling wrapper that maps a handful of REST endpoints to a function-calling schema is less work and ships faster when you are integrating with one specific agent product. MCP earns its cost when you want your API usable, without custom glue code, by any MCP-compatible client, whether that is Claude Code, Cursor, or whatever ships next year. This is not really a protocol-versus-protocol question. It is a question about how many places you are willing to write the same integration logic. If you have not exposed that REST API publicly yet, our guide on adding a public API to an AI-built app walks through the setup first.

This Is Not Really MCP vs REST

REST is how your backend already talks to clients. MCP does not replace that. In almost every real implementation, an MCP server sits in front of your existing REST API and translates protocol calls into the same HTTP requests your API already handles. So the actual decision is narrower than the title suggests: do you write a translation layer between your REST API and an AI agent, and if so, do you write it once against an open standard, or once per agent product? If you have not read the basics yet, our plain explanation of what MCP is covers the protocol itself. This post assumes you already know what MCP does and are trying to decide whether to build one.

What Each Approach Actually Gives You

A Tool-Calling Wrapper Over REST

You write a JSON schema for each function you want the model to be able to call, using the format your model provider expects for tool calling. Your application code intercepts the model's tool call, translates the arguments into an HTTP request against an endpoint you already run, and feeds the response back as text or JSON. There is no new protocol, no new transport, and no new auth scheme. You are extending code you already maintain.

An MCP Server Over REST

You implement an MCP server, over stdio for a local process or over HTTP with server-sent events for a remote one, that exposes tools, and optionally resources and prompts. The server's handler for each tool still calls your existing REST endpoints internally. What changes is that any MCP-compliant client can ask the server what it offers at connection time through the protocol's own discovery mechanism, instead of you writing and maintaining a separate integration guide for every client that wants access.

The Comparison, Point by Point

Both columns assume the REST API underneath is identical. The difference is entirely in the layer you build on top of it.

Dimension

Thin tool-calling wrapper

MCP server

Discovery / introspection

None built in. Each agent integration needs its own hand-written schema and docs.

Built into the protocol. A client calls tools/list and gets names, descriptions, and argument schemas at runtime.

Auth model

Whatever your REST API already uses, passed straight through. Nothing new to design.

The spec layers its own conventions on top, OAuth 2.1 for remote HTTP servers, which is extra plumbing if your existing auth does not map cleanly.

Statefulness

Stateless by default, matching REST's request and response model. Simplest to reason about and debug.

Supports persistent sessions and server-initiated messages, useful for long-running tasks and progress updates, but that persistence has to be built and kept correct.

Standardization across agents

Rebuilt per agent product, since tool-calling schemas are not identical across model providers.

One server definition works for any MCP-compliant client. This is the entire point of the protocol.

Implementation cost, small team

Hours. A thin HTTP-to-function translation over an API you already operate.

Days at minimum: the handshake, tool listing, error handling per spec, a transport, then upkeep as the spec changes.

When a Thin Wrapper Wins

  • You are building for one specific agent product, an in-house assistant or a single vendor's app, not a general audience of AI clients.

  • The tool surface is small, a handful of endpoints, and unlikely to grow into dozens.

  • You want to ship this week, not spend it on protocol plumbing.

  • You are building an internal tool with AI for your own team, where the only client that will ever call these functions is the one you are writing right now.

When MCP Earns Its Cost

  • Multiple AI clients need the same functionality and you do not want to write and maintain a one-off integration for each.

  • You are building a product or platform meant to be an ecosystem citizen, where outside developers or agents connect to your API without asking you for a custom wrapper.

  • You want tool descriptions to live in one place, discoverable by any compliant client, instead of duplicated across integration docs that drift out of sync.

  • You expect the tool surface to keep growing and want a stable, self-describing interface pattern instead of renegotiating a schema with every new client.

The Decision Rule

If you are building for one specific agent product, build the thin wrapper. It is less code, less to maintain, and it uses the auth and error handling you already have.

If you want your API usable by many different AI clients without custom integration work per client, build the MCP server. That reuse is the only reason MCP's extra plumbing pays for itself.

If you genuinely cannot tell yet which situation you are in, ship the wrapper first. The REST calls it makes are the same calls an MCP server's tool handlers would make internally, so none of that work is wasted. Once you know which tools actually get used and by whom, wrapping the proven logic in an MCP server later is a much smaller lift than building the protocol layer speculatively and finding out nobody outside your own agent ever connects to it.

What the Two Actually Look Like

The tool schema itself barely changes between the two approaches. Here is a wrapper's function definition for a single endpoint:

json
{
  "name": "get_order_status",
  "description": "Look up the status of a customer order by ID",
  "parameters": {
    "type": "object",
    "properties": {
      "order_id": { "type": "string" }
    },
    "required": ["order_id"]
  }
}

The handler behind it calls GET /api/orders/{order_id} on your existing REST API and returns the JSON body to the model. An MCP server registers a near-identical tool definition, but the server around it also has to implement the protocol's initialize handshake, a tools/list handler that returns this definition (and every other tool's) to any connecting client, and a tools/call handler that dispatches to the same internal REST request. The schema is not the hard part in either case. The protocol scaffolding around it is what MCP asks you to build once so nobody else has to rebuild it per client.

If you are still weighing which AI coding tools in your stack support MCP natively versus which expect a custom tool-calling integration, that is worth checking before you commit engineering time either direction, since a tool that already speaks MCP removes the wrapper option entirely.

It also helps to be clear on the shape of what you are exposing. If the thing behind your API is closer to a fixed sequence of steps than something that reasons about which tool to call next, the distinction between an AI agent and a scripted workflow matters more than MCP versus REST does. A workflow with a fixed call order rarely needs either agent-style tool discovery.

Frequently Asked Questions

Does MCP replace my REST API?

No. MCP is almost always a layer in front of or alongside your REST API, translating agent tool calls into the same requests your backend already handles. You still need the API and the backend logic behind it.

Can I run both a REST API and an MCP server at the same time?

Yes, and most teams that adopt MCP do exactly this. The REST API keeps serving normal clients, web apps, mobile apps, other services, while the MCP server handles agent access, and both can call the same underlying business logic.

Is MCP specific to one AI vendor?

No. It is an open protocol, and client support has spread beyond the vendor that originally published it. Check current client support before assuming any specific product does or does not speak MCP.

Does MCP handle authentication for me?

The spec defines OAuth-based patterns for remote HTTP servers. Local servers that run over stdio typically just inherit whatever permissions the host process already has, which is simpler but only works when the server and client run on the same machine.

I only need to expose two or three endpoints to one chatbot. Which should I use?

A thin tool-calling wrapper. MCP's standardization only pays off once there is more than one consumer of the same tools, or a tool surface large enough that hand-maintained per-client docs become a real cost.

How did this land?

About the author

Carlo Zuercher
Carlo Zuercher

Staff Engineer, Platform

Carlo works on the platform that turns prompts into running apps. He writes the engineering deep dives and the changelog notes worth reading.

Share

Get the next post in your inbox

One email a month. Product updates, engineering posts, and the best of Built with Swarmz.

I agree to receive emails about AI building tips and Swarmz product news. Unsubscribe any time.