- The Model Context Protocol acts as an intelligent abstraction layer that wraps the REST APIs so that AI agents can discover and use them autonomously.
- While REST is designed for human developers and deterministic flows, MCP optimizes interaction with LLMs through runtime self-description.
- The evolution towards a stateless model in MCP allows for scalability similar to that of REST, while maintaining unique capabilities such as multiple round-trip requests (MRTR).
If you're involved in the current development landscape, you'll have noticed that the deployment of LLM-based agents has been a game-changer. Until recently, connecting an AI to external data was a major headache: you had to write custom code for each connection, wrestle with the documentation for each API, and pray that the model didn't get confused by the parameters. It was the infamous M×N problem, where each new model or tool exponentially increased the integration effort.
This is where the Model Context Protocol (MCP) comes in , a proposal that doesn't aim to discard what we already know, but rather to give it a smart twist. Instead of forcing the developer to be the constant bridge between the machine and the data, MCP tries to enable the AI itself to understand what tools it has at its disposal and how to use them without us having to give it step-by-step instructions with every request. It's essentially about moving from proprietary cables to a universal standard similar to what USB-C was for hardware.
Understanding REST APIs: The cornerstone of modern software
REST APIs have been the driving force of the internet for over a decade. Their success lies in their general-purpose nature, designed so that any system, whether a mobile app or a microservice, can interact with another in a standard and predictable way . A developer reads the documentation, obtains a key, and programs specific calls to endpoints like /users/123. Everything is deterministic: if you send A, you receive B.
This architecture is unbeatable when it comes to high performance and scalability . Because it's stateless, implementing caches, load balancers, and content delivery networks (CDNs) is incredibly easy. For a frontend engineer, the fact that the API doesn't "explain" itself in real time isn't a problem, because the code is written once and executed millions of times following a fixed logic.
Why does REST fall short with AI agents?
The problem arises when the client is no longer a programmer following a manual, but a language model making autonomous decisions. REST wasn't designed for AI, and that leaves several critical gaps. First, the lack of real-time self-description. Although OpenAPI schemas exist, they are static documents for humans; an AI cannot query a REST API to find out if a new feature was released yesterday without someone updating the client code.
Furthermore, REST is very rigid. If a request is missing a parameter, the API returns a 400 error and the connection is dropped. There's no native way for the server to say, "Hey, I'm missing some data. Can you ask the user for it and try the request again?" This forces developers to manually build complex error handlers . Finally, each REST API is unique in terms of formats and authentication, requiring the creation of custom adapters for each service that AI wants to access.
MCP: Designed specifically for artificial intelligence
The Model Context Protocol (MCP) is not a replacement for REST, but rather a wrapper layer . Its goal is to standardize how AI agents discover and execute tools. While REST exposes endpoints, MCP exposes capabilities . An agent using MCP can connect to a server and ask, "What can you do?", receiving a machine-readable catalog with natural language descriptions and JSON schemas.
To organize this, MCP uses three fundamental concepts: Resources , which are essentially readable data (like querying a document or database); Tools , which are actions with side effects (like sending a message via Slack or creating a ticket in Jira); and Prompts , which are predefined templates to guide the AI's reasoning. The power of this lies in the fact that, regardless of whether the server is GitHub or Spotify, the communication interface is exactly the same.
The evolution towards a stateless model
There was a time when MCP differed from REST primarily by being stateful, meaning it maintained an open session with an initial handshake. However, the July 2026 revision changed this to align with web best practices. Now, MCP is strictly request/response . Sessions and the initial handshake have been removed, and identity and capability information has been moved to the HTTP headers.
Despite this change, MCP retains a gem that REST lacks: Multi Round-Trip Requests (MRTR) . This feature allows a server to pause execution to request more information from the user before completing the action. Instead of failing and starting over, the tool indicates that it requires additional input and resumes the operation once it receives the response—a vital feature for preventing an AI from making costly or destructive mistakes on its own.
Technical synergy: How REST and MCP coexist
In practice, you don't have to choose between one or the other. The smartest architecture is to use both in layers. The MCP server acts as a translator: the AI communicates with the MCP server using JSON-RPC 2.0, and the server internally makes the REST API calls of the underlying service . For example, a GitHub MCP server receives a "list repositories" command, translates it into a GitHub API GET request, and returns the processed result to the AI.
A common mistake is turning every REST endpoint into an MCP tool. This is a huge error because it saturates the AI's context window and drives up token costs. The key is to design results-oriented tools . Instead of giving the AI three separate tools to retrieve user information, orders, and shipments, it's much better to create a single "track_order" tool that makes all three REST calls internally and delivers a consolidated and useful response.
Security and Authentication in the MCP ecosystem
While REST allows for almost any security method, MCP takes a more closed and secure approach: OAuth 2.1 with PKCE . This is crucial in enterprise environments where AI acts on behalf of a user. Thanks to tokens with defined scopes, the server can verify exactly what permissions the agent has before running a tool, preventing the AI from accessing sensitive data without explicit authorization.
Furthermore, MCP enhances privacy by preventing the AI from directly manipulating API keys or sensitive URLs. The model only sees the function name and its parameters; secret handling occurs on the MCP server, which is protected behind a firewall or in a controlled environment, drastically reducing the risk of credential leaks due to model hallucinations.
When to prioritize each technology
Continue using REST APIs for your traditional web and mobile applications, where the client is human-written code that knows exactly what to call. It's also the right choice for communication between microservices or when you need extremely low latency and massive data volumes where HTTP caching is critical.
On the other hand, implement MCP when your end user is an AI agent or a development co-pilot. If you want your service to be plug-and-play for tools like Claude or Cursor without having to write adapters each time, MCP is the way to go. It's especially useful in workflows where AI needs to orchestrate multiple tools and maintain a consistent flow without losing the context of the conversation.
The combination of both worlds allows REST APIs to continue doing the heavy lifting of business logic while the MCP ensures that this logic is accessible and understandable to artificial intelligence, transforming rigid endpoints into dynamic capabilities that any LLM can leverage without friction.
FAQ
Does MCP completely replace REST APIs?
No, MCP is a complementary layer that wraps existing APIs. Most MCP servers still use REST internally to perform the actual data operations.
What is the main advantage of MCP over REST for AI?
Runtime discovery capability, which allows AI to ask the server what tools are available and how to use them without prior coding.
Is the MCP protocol still stateful?
Since the July 2026 revision, MCP is stateless, eliminating sessions and the initial handshake to improve scalability and compatibility with web infrastructure.
What are Multi Round-Trip Requests in MCP?
It is a feature that allows the server to pause an action to request additional information from the user and then resume the task without losing progress.
How does the use of MCP affect the token consumption of an LLM?
If too many detailed tools are exposed, the token cost increases. Ideally, you should create results-oriented tools that consolidate multiple calls into one.
What security standard does MCP use?
The protocol adopts OAuth 2.1 with PKCE as the standard to manage authorization securely and granularly using tokens with specific scopes.
In what cases is it better to continue using only REST APIs?
In traditional applications for humans, communications between microservices, and very high-performance scenarios where autonomous AI agents are not involved.
Table of Contents
- 1 Understanding REST APIs: The cornerstone of modern software
- 2 Why does REST fall short with AI agents?
- 3 MCP: Designed specifically for artificial intelligence
- 4 The evolution towards a stateless model
- 5 Technical synergy: How REST and MCP coexist
- 6 Security and Authentication in the MCP ecosystem
- 7 When to prioritize each technology
- 8 FAQ




