MCP vs API: what decides which one you need
Last reviewed 7 October 2026
What an API is, and what MCP is
AWS defines APIs as mechanisms that let two software components talk to each other using a set of definitions and protocols, and calls the interface a contract of service between two applications. The program that sends the request is the client and the one that answers is the server. AWS lists four common styles: SOAP, RPC, WebSocket and REST.
The MCP documentation defines the Model Context Protocol as an open-source standard for connecting AI applications to external systems. Its own analogy is a USB-C port: one agreed plug between an AI application and the data sources, tools and workflows it needs to reach.
So the two words sit at different levels. "API" names any programmatic interface, built for any caller. MCP is one specific protocol with a published specification, official SDKs and a fixed set of message types, and it is designed for one kind of caller: an AI application acting for a user.
| Dimension | A web API (for example REST) | MCP |
|---|---|---|
| Who calls it | Code a developer wrote for that API | An AI application through an MCP client, often on the model’s decision |
| How you learn what it offers | Read the vendor’s documentation | Ask the server: tools/list returns names, descriptions and input schemas |
| Message format | Varies: AWS lists SOAP (XML), RPC, WebSocket and REST styles | JSON-RPC 2.0 over stdio or Streamable HTTP |
| What it exposes | Endpoints and operations the vendor defines | Three server primitives: tools, resources and prompts |
| Authentication | API keys and tokens, per AWS | Over HTTP: bearer tokens, API keys or custom headers, with OAuth recommended |
| Built for | Any software talking to any other software | Connecting AI applications to data, tools and workflows |
How an MCP connection works
MCP has three participants. The host is the AI application, such as Claude Desktop or Visual Studio Code. The host creates one MCP client for each MCP server it connects to, and each server is a program that provides context. A server can run locally over standard input and output (stdio) or remotely over Streamable HTTP.
Messages are JSON-RPC 2.0 on both transports. A client asks a server what it offers: the tools/list request returns each tool’s name, description and a JSON Schema for its inputs. The client then runs a tool with tools/call. Under the protocol version dated 2026-07-28, every request carries the protocol version and the client’s capabilities, which is why the documentation calls MCP stateless.
- Tools: functions the model can call, for example a database query or a call to another API. The documentation lists the model as the party that controls them.
- Resources: read-only context such as file contents or a database schema, controlled by the application.
- Prompts: reusable templates that a user invokes on purpose, for example from a slash command.
A worked example: the same ticket lookup both ways
A support team wants an assistant that can look up a customer’s open tickets. The ticketing system already has a REST API with an endpoint that returns tickets by customer, protected by an API key. A developer can call that endpoint from a script, and the script keeps working for as long as the endpoint does not change.
To let an AI application use the same lookup, the developer writes a small MCP server with one tool, get_open_tickets, whose input schema asks for a customer ID. Inside the tool, the server calls the existing REST endpoint. Any MCP host the team uses can now list the tool, show its description to the model and call it, with no code written for that particular host.
The REST API did not go away. MCP added a layer that describes the API in a form a model can discover and call, and it moved the decision about when to call it from the developer’s script to the model. The host decides whether a person must approve each call.
When to build an MCP server and when a plain API call is enough
A plain API call fits when the caller is ordinary code with a fixed sequence: a nightly sync, a webhook handler, a payment capture. The developer knows which endpoint runs and when, and a model would add cost and uncertainty for no gain.
An MCP server earns its place when an AI application has to choose among actions at run time, when several hosts (a chat client, an editor, an agent runtime) should share one integration, or when you want tool descriptions and input schemas to travel with the integration instead of being rewritten for each host.
Where each one goes wrong
APIs fail in familiar ways: a breaking change to an endpoint, an expired key, a rate limit. An MCP server inherits all of those from the APIs it wraps and adds its own. Because the model picks the tool, a vague tool description leads to the wrong call, and a tool that writes data can act on a misread request.
The MCP security guidance names further risks for server authors: token passthrough, where a server accepts tokens that were not issued to it (the guidance says servers MUST NOT do this), confused deputy attacks through OAuth proxies, and scopes that grant far more than a task needs. The server concepts page suggests hosts offer approval dialogs for individual tool calls and activity logs of every execution. Treat both as requirements for any tool that changes data.
How Swfte relates to MCP and APIs
Built in the product
Swfte Connect is an API: one OpenAI-compatible endpoint in front of many model providers, with your own provider keys, routing and fallback, budgets and audit events. Agents built in Studio can act as MCP clients and call tools on external MCP servers.
Swfte also runs an MCP gateway. Today it checks that each call carries an API key scoped to that MCP server and workspace, and it logs the workspace, the server, the JSON-RPC method, the status code and the latency. It does not record the calling person, the tool arguments or the result. Per-tool allow and deny rules and per-call rate limits are designed for, not shipped, and Swfte does not currently expose your own agents as an MCP server.
Common questions
- Is MCP a replacement for REST APIs?
- No. MCP standardises how an AI application finds and calls capabilities, and most MCP servers call ordinary APIs inside their tools. The REST API stays the interface to the underlying system. MCP adds a description layer that a model can read and a common message format that any MCP host understands.
- Does an MCP server have to run remotely?
- No. The MCP architecture page describes local servers that use the stdio transport and usually serve a single client, and remote servers that use Streamable HTTP and usually serve many clients. The same JSON-RPC messages flow over both, so the choice is about where the data lives and who needs access.
- What message format does MCP use?
- MCP uses JSON-RPC 2.0. Requests carry an id and get a matching response, and notifications carry no id and expect no reply. Each request also carries the protocol version and the client’s capabilities in a metadata field, so a server can handle any single request on its own.
- Can a model call any endpoint of an API through MCP?
- Only the tools the MCP server chooses to expose. Each tool has a name, a description and a JSON Schema for its inputs, and the server decides what the tool actually does upstream. Exposing a few narrow tools is safer than one tool that forwards arbitrary requests to the API.
- Which AI applications support MCP?
- The MCP introduction names Claude, ChatGPT, Visual Studio Code, Cursor and MCPJam among the clients that support it. Support differs by product and version, for example in which transports and features are available, so check each product’s own documentation before you plan around a feature.
Sources
Facts about other vendors and about the terms on this page were read on the pages below on 7 October 2026. Vendor plans, names and menus change, so check the vendor’s page before you rely on a detail.
- MCP documentation, introduction to the Model Context Protocol (read 2026-10-07)
- MCP documentation, architecture overview (participants, layers, primitives) (read 2026-10-07)
- MCP documentation, understanding MCP servers (who controls tools, resources and prompts) (read 2026-10-07)
- MCP documentation, security best practices (read 2026-10-07)
- AWS, what is an API (read 2026-10-07)
Related reading
More plain answers are on the learn page, and definitions are in the glossary.