Est.

MCP vs API

A REST API is an interface a developer reads and codes against. MCP is a protocol an AI agent can discover and call on its own. Most MCP servers sit in front of APIs, so the choice is rarely one or the other.

Updated · MCP Server Management, AI Agent Identity & Access

At a glance

MCP (Model Context Protocol)REST API
What it isOne open protocol for connecting AI applications to tools, data and prompts. Every MCP server speaks it the same way.An architectural style for web APIs. Each API defines its own resources, endpoints and payloads on top of HTTP.
Written forA language model, through an MCP client, that decides at runtime which tool to call and with what arguments.A developer who reads the documentation and writes code that calls specific endpoints.
DiscoveryThe client asks the server what it offers (tools/list). Each tool comes with a name, a description and a JSON Schema for its input.Documentation, often an OpenAPI description. It is read when the integration is built, not by the caller each time it runs.
Shape of the interfaceThe same small set of methods on every server: list and call tools, read resources, get prompts.Different on every API: its own URLs, HTTP methods, parameters, pagination and response formats.
Wire formatJSON-RPC 2.0, over stdio for a local server or Streamable HTTP, where each message is a POST to a single MCP endpoint.HTTP methods (GET, POST, PUT, DELETE and so on) on resource URLs. JSON is the most common body format.
AuthenticationOptional. Over HTTP, the specification uses OAuth 2.1: the MCP server is a resource server and accepts only tokens issued for it. Local stdio servers take credentials from their environment.Whatever the API chooses: API keys, OAuth 2.0 access tokens, mutual TLS or another scheme, described in its documentation.
ErrorsMalformed requests get JSON-RPC errors. A tool that fails returns a result marked isError, with a message the model can read and correct for.HTTP status codes, with an error body in whatever format the API defines.
When it changesA server can tell clients its tool list has changed; the model reads the new descriptions the next time it lists tools.The provider versions the API (in the path, a header or a date), and client code is updated to adopt the new version.

The short answer

An API is how one program talks to another. A REST API exposes a service's resources over HTTP, and a developer writes code against the specific endpoints it documents. MCP is a protocol for a different caller: an AI model that has to find out at runtime what it can do, pick a tool and fill in its arguments without anyone writing integration code for that one service.

The two are not competitors. Most MCP servers are thin layers over APIs that already exist: the server describes a set of tools in terms a model can use, and each tool call becomes one or more API requests behind it. The real question for a team is not MCP or API, but which APIs to put behind MCP servers, and how to govern the agents that call them.

What a REST API does

REST, described by Roy Fielding in 2000, models a service as resources identified by URLs and acted on with standard HTTP methods. Each request carries everything the server needs to handle it. An API's provider decides its resources, its parameters, its pagination, its error format and its authentication, and documents them, often as an OpenAPI description that tools can turn into client libraries.

That flexibility is the point: an API fits the service behind it. It also means every API is different, so each integration is code someone writes, tests and maintains for that API.

  • Good fit: service-to-service calls, applications and integrations where a developer knows in advance exactly which calls to make.
  • Predictable: the code decides which endpoint is called and when, so behaviour is fixed at build time.
  • Mature: gateways, rate limiting, caching and monitoring for HTTP APIs are well understood and widely deployed.

What MCP does

The Model Context Protocol fixes the interface instead of leaving it to each provider. An MCP server lists its tools; each tool has a name, a description written for a model and a JSON Schema for its input, and can declare a schema for structured output. The client hands that list to its model, the model chooses a call, and the server runs it. Because every server answers the same methods, any MCP client can use any MCP server without code written for that pairing.

Messages are JSON-RPC 2.0, over stdio for a server running on the same machine or Streamable HTTP for a remote one. The specification is published in dated revisions, and they change how a connection works: revisions up to 2025-11-25 opened a session with an initialize handshake, while from 2026-07-28 every request carries its own protocol version and client capabilities. Check which revision your clients and servers support.

  • Good fit: giving agents and AI assistants access to systems, where the model decides which action a task needs.
  • Model-facing: tool names, descriptions and schemas are what the model reasons over, so they are part of the interface's quality.
  • Human in the loop: the specification says applications should let a person see which tools are exposed and deny an invocation.

Turning an API into an MCP server

Since most MCP servers wrap an API, the common first step is to generate one from the API's OpenAPI description, one tool per operation. That gets a server running quickly, but an API designed for developers rarely makes a good tool set for a model as it stands.

  • Fewer, task-shaped tools: a large API mapped one-to-one gives the model hundreds of similar tools to choose between. Group or curate them around what people actually ask agents to do.
  • Descriptions are instructions: rewrite operation summaries so a model knows when to use each tool and what each argument means.
  • Trim the output: return the fields a model needs rather than every field the API sends, so results fit in its context.
  • Errors the model can act on: turn API failures into tool results that say what went wrong and what to try instead.
  • Read and write apart: keep tools that only read separate from tools that change data, so they can be granted and approved separately.

What each means for security and governance

With an API, a developer chose every call when the code was written, and review happens there. With MCP, a model chooses the calls at runtime from whatever tools it can see, on behalf of whoever is using the agent. The controls move from code review to runtime policy.

  • Inventory: know which MCP servers exist, who runs them and which APIs sit behind each, including servers employees install themselves.
  • Scope per person: grant tools by role from your identity provider, so an agent can only reach what the person it acts for may reach.
  • No shared keys: a server that calls its API with one broad service key gives every user that key's access. Prefer delegated, short-lived credentials tied to the user.
  • Tokens stay put: the MCP specification forbids servers from accepting or passing on tokens that were not issued for them, so the server must get its own credentials for the API behind it.
  • Audit both layers: log each tool call with the person it was made for, and correlate it with the API requests it caused.

Which one do you need?

If you are building an application or integration and know which calls it makes, call the API directly: MCP adds a layer you do not need. If you want AI agents and assistants, yours or your employees', to use a system, put an MCP server in front of its API, design its tools for a model, and govern access to it centrally. Most enterprises end up with both: APIs as the systems of record, and MCP as the governed way agents reach them.

Frequently asked questions

Is MCP an API?

MCP is a protocol, not a particular API. An MCP server does expose an interface, but every server exposes the same methods (list tools, call a tool, read a resource), so one client works with all of them. A REST API's interface is specific to the service behind it.

Does MCP replace REST APIs?

No. Most MCP servers call existing APIs to do their work. MCP changes who the caller is, an AI model choosing tools at runtime, not how the systems behind it are built.

Can an agent call a REST API without MCP?

Yes. With function calling, a developer describes the API's operations as functions for one model and writes the code that makes the calls. MCP standardises that layer, so the same server works with any MCP client instead of one application.

Can I generate an MCP server from an OpenAPI description?

Yes, several tools do it, typically producing one tool per API operation. Review the result before rolling it out: curate the tool list, rewrite descriptions for a model and trim responses, or agents will struggle to pick the right tool.

Does MCP require OAuth?

Authorization is optional in MCP. When an HTTP-based server supports it, the specification's authorization section, built on OAuth 2.1, applies; servers running locally over stdio take credentials from their environment instead.

More comparisons

  • MCP vs A2A

    MCP connects an agent to its tools and data. A2A connects an agent to other agents. Most enterprise agent stacks will run both, and they need different controls.

Sources

The MCP specification changes often, and each API documents its own behaviour. Check the sources below, and the documentation of the API you are wrapping, before you build against a detail on this page.

  1. Model Context Protocol specification
  2. MCP specification: Tools
  3. MCP specification: Transports
  4. MCP specification: Authorization
  5. MCP architecture overview
  6. OpenAPI Specification
  7. Roy Fielding: Representational State Transfer (REST), dissertation chapter 5
  8. RFC 9110: HTTP Semantics