How Model Context Protocol Connects AI
Transcript
Made automatically from the audio, so it may contain mistakes. Click a line to play from there.
Imagine this scenario. You're you're sitting at your computer looking at just this massive tangled code base.
Yeah, we've all been there.
Right. And you ask your AI assistant to debug a particularly nasty memory leak. Think about what actually has to happen next, like under the hood, for that AI to give you a useful answer.
It's a lot more complicated than people realize.
Exactly. I mean, it needs to read a highly secure file living exclusively on your local C drive.
Mm-hmm.
Then it needs to instantly cross-reference that code with a live crash report database hosted on, say, a server in Tokyo.
Right, halfway across the world.
And then after that, it needs to check the current server loads in an AWS cluster just to see if the issue is replicating in production.
All in the blink of an eye.
Yeah. We expect the AI to do all of this in milliseconds securely without breaking any network protocols or you know, requiring you to manually copy and paste text for three hours.
We really do take it completely for granted. I mean, we treat the AI like a human sitting next to us with infinite access. Right. When in reality, an AI model by itself is it's basically just a brain in a jar.
Just floating there.
Exactly. It has absolutely no hands, no eyes, and no inherent way to reach out into the physical or digital world.
Spot on. And today we're tearing open the invisible plumbing of the AI world to understand how that brain actually gets its hands.
It's gonna be a fun one.
For you listening, if you have ever been curious about how modern AI applications actually talk to the outside world, you know, how they step out of their isolated sandboxes to pull in real world data, this deep dive is for you.
Definitely.
Whether you're an engineer prepping for an integration meeting or just someone who's intensely curious about the hidden architecture of the tools we use every day, we are gonna unpack the mechanics of it all.
We are getting into the weeds.
We really are. Specifically, we're diving into the model context protocol or MCP, and we're focusing on the 2026 7 28 version. Consider this year's shortcut to being incredibly well informed on the standard that makes modern AI actually useful.
It really is a logistical miracle that it works at all.
Let alone so fast.
Right. Let alone seamlessly across so many different platforms and operating systems. But before we get deep into the technical weeds of this protocol, we need to set the stage with a very firm boundary.
Okay, what kind of boundary?
Well, the source documentation we're analyzing today makes one thing incredibly clear, and it is a crucial distinction. This protocol focuses solely on the context exchange.
Right. It's the delivery mechanism and absolutely nothing else.
Precisely. It explicitly does not dictate how AI applications actually use their underlying large language models.
It's not the brain.
Exactly. It doesn't tell the LLM how to think, how to reason, or you know, how to interpret the context once it arrives. It is simply the rigorous standardized method for how the data moves securely from point A to point B.
Okay. Let's unpack this. If we use a physical analogy, MCP is like the postal service.
Oh, I like that.
Right? It defines how the envelope is sized, how the address is written, and what roads the mail truck can drive on.
Mm-hmm.
But it is not the person reading the mail. And it doesn't care what the letter actually says. The letter could be a love poem or a tax bill. The protocol just delivers it.
Exactly. And having that strict separation of concerns is what allows the protocol to be adopted universally.
Because it's not trying to do too much.
Right. The creators of MCP aren't trying to build a better AI. They're trying to build a better road network for the AI to drive on.
So before we can truly understand how the data moves on those roads, we need to establish exactly who is doing the talking.
The participants.
Yeah. We need to move from the abstract idea of a protocol to the literal participants in this ecosystem. And according to the architecture overview in our sources, there are three main actors here. It's basically a trinity. The host, the client, and the server.
The holy trinity of the model context protocol, yes. And honestly, if you don't understand the specific roles of these three entities, the rest of the documentation will just look like a wall of jargon.
Well, then let's start at the top with the MCP host. The text defines the host as the AI application itself.
Right, the overarching program.
Yeah, the program that the user's actually looking at and interacting with. It is the environment coordinating everything.
Like a central hub.
Exactly. The documentation gives examples like Claud Code, the Claude Desktop app, or even an IDE like Visual Studio Code that has an AI assistant integrated right into it.
Which makes perfect sense from an architectural standpoint. The host is the orchestrator.
It's running the show.
Yeah. It manages the user interface, it holds the API keys for the language model, and it's the entity that ultimately decides when the AI needs to reach out for more information.
So the user talks to the host, and the host figures out the rest.
Exactly.
Then we step down a level to the MCP client. Now, this is where the terminology can, you know, trip people up a bit if they're used to traditional web development.
Oh, absolutely. It's a very specific definition here.
Right. In MCP, a client is a dedicated one-to-one connection manager. It is instantiated, like literally spun up into existence by the host for every single server it wants to talk to.
Just for that one server.
Exactly. It's not one giant client talking to a hundred servers, it is one client per server.
That one-to-one mapping is a crucial detail for process isolation and security, which we will definitely get into later.
For sure. And finally, we have the MCP server itself. The text defines the server simply as the program providing the actual context data.
The source of the information.
Right. That could be a program exposing your local files, a program querying a SQL database, or you know, a program scraping live weather data.
Whatever you need.
Yeah. And the most interesting note here is that this server can run locally on your exact same machine, or it can run remotely on the cloud.
Which is a huge distinction.
It really is. So as I was reading this breakdown of host, client, and server, I tried to visualize it mechanically. Now I want to run a metaphor past you to see if it holds up.
I am always ready for a good mental model. Let's hear it.
Okay, let's use a high-end restaurant as our baseline.
Okay. Make me hungry, but go on.
Well, the MCP host, the AI application like VS Code, is the restaurant manager. The manager is talking to the customer, taking the order, orchestrating the whole dining experience.
Right. The front of house.
Exactly. But the manager doesn't actually cook the food. And they don't even go into the kitchen to get it. Instead, they hire waiters.
Okay.
Those waiters are the MCP clients. And here is the crucial architectural part. The manager hires a completely dedicated waiter for every single kitchen they source food from.
I see where you're going.
And those kitchens are the MCP servers.
Okay. I am following. One waiter, one kitchen.
Right. So you might have one waiter, let's call him client A, whose sole existence, his only job is to walk through the swinging doors to the local prep kitchen in the back of the restaurant to grab the bread.
So that local kitchen is a local MCP server.
Exactly. Exactly. Like a program reading your local file system. But at the exact same time, the manager has another waiter, client B, whose entire job is to get on a bicycle, ride down the street, and pick up a specific cake from a remote specialty bakery.
And that bakery is a remote MCP server.
You got it.
Does that accurately capture the architecture?
It absolutely does.
But what I love about that analogy is that it perfectly illustrates why the architecture is designed this way in the first place. Which is scalability and isolation.
Right.
A single host application might need to spin up a dozen clients simultaneously. Imagine VS Code, right? One client is talking to your local file system server to read the Python script you're writing.
Getting the bread.
Getting the bread. At the exact same time, a completely separate client instance is connecting to a remote sentry server to pull in crash reports, while you know, a third client is hitting an internal corporate wiki to pull documentation.
So they're all operating independently.
Exactly. By keeping a one-to-one waiter to kitchen ratio, if the waiter going to the remote bakery gets a flat tire, meaning the network connection to sentry drops, it doesn't affect the waiter bringing the bread from the back room.
Oh wow.
Yeah, the local file system server keeps running perfectly. The manager, the host application, just logs that the remote server is down, but the rest of the application doesn't crash.
Complete modularity. It prevents a single point of failure in data retrieval.
Exactly.
But there's another specific detail in the documentation that really struck me regarding the kitchens, the servers. It makes a very explicit point that the word server just refers to the program serving context data, regardless of where it physically runs or what hardware it is on.
Yes. That hardware agnostic definition is a massive paradigm shift.
Why is that such a big deal for developers though? Why does the protocol make such a point to define server so broadly? Well Because in traditional tech, a server is like a glowing rack of blades in a data center. Here, it could just be a tiny Python script running in the background of my laptop.
It's a big deal because it allows for a completely unified mental model for the AI developer.
How so?
Historically, in software development, you have to write entirely different code depending on where the data lives.
Okay, yeah.
If you're trying to open a local file on your hard drive, you use standard library file system commands. You deal with file paths, read-write permissions, and local memory buffers.
It's very localized.
Right. But if you want to get data from a cloud platform, you have to write network request code. You deal with HTTP headers, JSON parsing, API authentication, network latency.
It's completely different.
Exactly. You have two totally different mental models and two completely different sets of error handling. By defining server simply as the program providing context, the MCP architecture abstracts away the location entirely.
So to the AI, there is literally no difference between a local drive and a cloud drive.
Conceptually, zero difference.
Wow.
Yeah, whether Cloud Desktop launches a local file system server right there on your laptop, or it connects to the official corporate MCP server hosted on Amazon Web Services. The host application asks for the data in the exact same way.
So the kitchen is just a kitchen, whether it's through the swinging doors or across the city.
The AI doesn't need to learn a new language to talk to the cloud.
Which brings us perfectly to a massive question. If the AI is asking for data in the exact same way, how do these waiters actually travel to these different kitchens?
Right, the logistics of it.
Because riding a bicycle down the street is mechanically very different from walking through a swinging door. We need to talk about the communication pathways.
Mm-hmm.
Which the documentation describes as a two-layer cake. You have the transport layer and the data layer.
The outer envelope and the letter inside. This is where the engineering gets really, really elegant.
Let's start with the outer envelope, the transport layer. This layer is solely responsible for managing the raw communication channels and the authentication.
It's the road.
It's the road. And the text outlines two specific transport mechanisms. The first one is called the STDIO transport. This stands for standard input output. The documentation says this is used for direct process communication when the client and the server are on the exact same machine.
Right.
And it notes that this provides optimal performance with absolutely zero network overhead.
STDIO is fascinating because it's actually one of the oldest concepts in computing. Really? Yeah. It's essentially just two programs on the same computer talking directly to each other's memory streams.
Oh wow.
Instead of formatting a message into a network packet, sending it to a router and having the router send it back to the computer, STDIO just pipes the text directly from one program's output to the other program's input.
So it skips all the middleman.
Entirely. It is blisteringly fast.
But then if you need to talk to a remote server, if you need to actually leave the machine, you use the second transport mechanism.
Right, the streamable HTTP transport.
Exactly. This uses standard HTTP post requests for the messages going from the client to the server, and it uses something called server sent events or SSE for the stream of responses coming back.
Mm-hmm.
And because it relies on standard HTTP, it supports all the standard web authentication methods. The text mentions bearer tokens and API keys, though it highly recommends using OAuth for security.
Makes sense.
So that is the transport layer, the two different roads.
And nested inside that transport layer is the inner layer, the data layer.
Right. The data layer is the actual message structure, the language written on the letter inside the envelope. And MCP mandates that this inner layer is based on a specific protocol called JSON-RPC 2.0.
Yes.
This is what dictates the semantics of the conversation. It structures how the AI discovers what a server can do, how it asks for tools, and how it receives notifications.
It is the universal language of MCP.
Okay, but here is where I am going to push back on the architecture a bit.
Oh, let's hear it.
Because as I was reading this, it felt a little over-engineered.
Okay, how so?
Why build this rigid separate two-layer system at all? Why not just hard code HTTP for absolutely everything?
I see.
I mean, think about it. HTTP obviously works for remote servers, but you can also run a local web server on your own laptop in about five seconds.
Sure, with local host.
Developers do it all the time with local host. So if HTTP can handle remote communication and it can handle local communication via localhost, why bother building out an entirely separate STDIO transport layer?
It seems redundant.
Exactly. Why maintain two different roads? Just make everything a web request and be done with it.
That is a very common initial reaction, honestly. But what's fascinating here is that forcing everything over HTTP would actually be a massive performance bottleneck for AI applications.
But LUPAC HTTP on localhost is incredibly fast today. We are talking milliseconds here.
True.
Are we really saving that much compute to justify building an entirely separate architecture for STDIO?
We are, because you have to think about the scale at which AI operates. Let's dig into the mechanics of what an HTTP request actually is. Okay. When you make an HTTP request, even just a localhost, your computer has to do a tremendous amount of invisible work. It has to encapsulate your message into a TCPIP packet. Right. It has to attach headers, calculate checksums for error verification, and route it through the operating system's network stack.
That does sound like a lot.
And that's just sending it. Then the receiving local server has to unpack that packet, read the headers, strip them away, and finally read the payload. And then it has to do the whole process in reverse to send a response.
So it's like putting a letter in an envelope, writing the address, putting a stamp on it, and handing it to the mailman just to have the mailman turn around and hand it to your roommate sitting on the same
couch. That is exactly what it is. Wow. That is a perfect analogy. The network stack overhead is the mailman.
Wow. Okay. I see.
Now, if an AI is reading a single text file, maybe those extra two milliseconds don't matter. But what if the AI is recursively searching through a directory of 10,000 local log files?
Man.
What if it's executing a local search tool hundreds of times a second? Suddenly encapsulating and unpacking 10,000 TCP IP packets on localhost causes a massive CPU spike in real latency.
It adds up fast.
Fast. SCDIO entirely bypasses the network stack. It's like just turning to your roommate and speaking to them directly. It is a zero copy direct memory pipe.
Oh, okay. So the sheer volume of microtransactions an AI might perform necessitates the most frictionless local path possible.
Precisely. And this is why the strict separation between the transport layer and the data layer is the secret sauce of the whole protocol.
Because the data layer doesn't care.
Exactly. Because they're separate, the exact same JSON RPC 2.0 message format works seamlessly regardless of the transport. The inner language never changes.
So going back to our restaurant, the waiter speaks the exact same dialect whether they're communicating directly through the nervous system to the local kitchen via SDIO, or using a radio walkie-talkie to talk to the remote kitchen via HTTP.
Exactly. The AI application, the host, doesn't have to write custom logic for different environments.
It's convenient.
It just formats a JSON RPC request and hands it to the client. The client looks at the connection and says, Oh, we're using STDIO today and shoves it down the memory pipe.
Or it says we're using HTTP today and wraps it in a network packet.
Right. The AI itself remains blissfully unaware of the plumbing.
I want to touch on something you mentioned earlier about the data layer language itself, JSON RPC 2.0. For anyone who has dabbled in web development, REST API is usually the default assumption, right?
Yeah, REST is the industry standard for most things.
REST is everywhere. It is based on resources. You get a user, you post a comment, you delete a file. Why did the architects of MCP choose RPC, remote procedure call, instead of a RESTful architecture?
That is a brilliant question. And it comes down to the fundamental nature of what AI needs to do.
Okay.
REST is fantastic when your world is purely made up of nouns, resources like users, documents, or products. But AI needs to perform actions. It needs verbs.
Verbs.
Think about a tool an AI might use, like calculate orbital trajectory, or restart server. Those aren't resources you can simply get or post to in a traditional Rest sense.
They're functions.
Exactly. They are procedures.
They're actions that need to be executed.
Right. Remote procedure call or RPC is an architecture designed specifically to execute actions on a different machine as if they were local functions.
That makes perfect sense.
And JSON RPC just wraps that concept in a lightweight, human readable JSON format. It allows the AI to say, execute this specific method name with these specific parameters and give me the result.
So it's very direct.
It maps perfectly to how an AI thinks about tool use. Whereas forcing that into a restful paradigm would require a lot of awkward, unnatural endpoints.
Okay, so the foundation is rock solid. We have the host managing the experience, the clients acting as dedicated connection managers, and the servers providing the data. We know they are communicating over either zero overhead standard I.O. pipes or streamable HTTP rows. And we know they're speaking the action-oriented language of JSON RPC.
The stage is set.
But this brings up a very human problem. Let's say we spin up a new client to talk to a remote server. They have never met, they're complete strangers.
Right.
How do they actually initiate a safe, productive conversation? Because if the AI just starts screaming commands at JSON RPC, the server might not have any idea what to do with them.
It would be chaos.
Right. We need to talk about the handshake, which leads us to the concepts of statelessness and discovery.
This is a critical design choice, and it dictates the entire rhythm of the protocol.
The documentation is incredibly firm on this point. MCP is fundamentally a stateless protocol.
Yes.
Every single request from a client to a server is entirely independent. There is no ongoing memory of the conversation state baked into the connection itself.
None at all.
If I ask the server for data at 1 p.m. and then ask for more data at 101 p.m., the server treats the second request as if it has never met me before in its life.
It is the ultimate live in the present moment architecture.
Which sounds very zen. Because of this strict statelessness, the text outlines that every single request must carry a specific metadata field, literally a JSON object called Meta. And inside that metadata, the client has to constantly reintroduce itself. It has to include the protocol version it is using, a list of its own client capabilities, and an identifier for who it is.
Which means the server can process every request entirely in a vacuum. It doesn't have to allocate memory to remember what happened five minutes ago.
But obviously, before they start firing off heavy data requests, there has to be an initial greeting.
Right.
The documentation outlines an optional but highly recommended first step called the discovery request. The JSON RPC method is called server.
Right. The handshake.
The client essentially walks up to the server and asks, hey, I speak these versions and I can do these things. What do you support?
What's on the menu?
Exactly. And the server responds with a standardized manifest. It's supported protocol versions, a list of its own capabilities and its identity. And to make this efficient, the response includes a TTLMS, a time to live defined in milliseconds, and a cache scope.
Which is very important.
This means the handshake result can be cached. The client doesn't have to introduce itself and ask for a menu every single time. It asks for Chrome of data.
Right. It can hold that cache capability map in memory for, say, an hour based on that time-to-live variable.
But wait, I'm looking at the logic here, and I have a question about efficiency.
Okay, shoot.
If the protocol is truly stateless, and the documentation mandates that every single data request has to carry the protocol version and the capability metadata in that meta field anyway.
Yeah.
Why bother with a formal discovery phase at all?
Oh, I see what you're asking.
I mean, if I'm a client and I want to use a weather tool, can't I just blindly fire a request for the weather tool? Attach my meta field, and if the server doesn't support my version or doesn't have the tool, it just throws an error. And I handle the error then. Why do an explicit handshake if every request is basically a mini handshake anyway?
This raises an important question about the hidden costs of network communication. You're all right on a purely theoretical level. Okay. Because every request carries the meta field. A client could just guess. It could blindly fire a complex tool execution request. And if the server doesn't understand the protocol version, the server will simply reject it with a standardized unsupported protocol version error.
Right. So why not just do that? It saves an entire round trip request at the start of the session.
Because relying on error handling for your primary control flow is an architectural sin.
Oh wow. Strong words.
And it is a massive waste of computational resources, especially over remote networks.
Okay, let's go back to the restaurant analogy then. It's like walking into a restaurant, sitting down without looking at a menu, loudly ordering a massive, complicated steak dinner, and then waiting 20 minutes for the waiter to come back and tell you that you are sitting in a vegan bakery.
That is exactly what it is. You wasted your time ordering, the waiter wasted their time walking to the kitchen, the kitchen wasted time processing the impossible order, and then you had to wait for the error message to travel all the way back to your table.
That sounds exhausting.
The server discover handshake prevents that entire scenario. It allows the client to know instantly, right up front what features to avoid asking for entirely.
So it's about mapping the boundaries of the relationship before any heavy lifting occurs.
Precisely. Okay. It doesn't allow any executable tools for security reasons. During the discovery phase, the server responds and its capability manifest simply omits tools. It says, I don't support tools.
Just flat out.
Right. Because of that one quick handshake, the AI host application knows immediately for the next hour, never to even bother trying to execute a function on that server. It removes the capability from the AI's internal interface.
Which saves everyone time.
Without discovery, the AI might hallucinate a tool, format a massive JSON payload, encrypt it, send it over the HTTP transport, only for the server to reject it. Discovery prevents network spam.
Okay, that makes perfect sense. The initial round trip cost of discovery pays for itself by preventing a thousand erroneous requests later on.
Exactly.
So they've shaken hands, they've swapped their capability manifests, they know exactly what versions they are speaking. Now, what are they actually offering each other?
What's the actual meal?
What is on that menu? This brings us to the absolute core of the model context protocol. The concept that the documentation calls the most important part of the entire architecture.
The primitives.
The primitives.
The primitives are the actual payload. If the transport layer is the road and JSON RPC is the language, the primitives are the actual goods being traded. They are the definitions of what context can be shared.
Let's break these down in detail, because the architecture splits them into two distinct categories. And client primitives, which are the capabilities the AI client offers back to the server.
Right. It goes both ways.
Let's start with the server primitives. The text defines three core types tools, resources, and prompts.
These three primitives represent completely different modalities of interaction.
Here's where it gets really interesting, because as I was reading the technical definitions, I found myself mapping them to human capabilities to understand how the AI actually uses them.
Okay, I like this.
The first one is tools. Tools feel like the AI's hands. The documentation defines them as executable functions. The AI can invoke a tool to actually do something in the world. It can perform a file operation, make a live API call to a payment gateway, or execute a query that alters a database.
Yeah, that's a great analogy.
Tools are active.
Right.
They change state or they trigger an external computation. When an AI uses a tool, it is reaching out and manipulating the environment. And the client discovers what tools exist using a list method and it uses them via a tools call method.
Exactly.
Then we have resources. If tools are the hands, resources feel very clearly like the AI's eyes.
Oh, that's good.
The text defines resources as data sources that provide contextual information. This is the AI reading the contents of a local file, pulling static records from a database, or looking at the current state of an API endpoint. Crucially, it is read-only context.
Correct. Resources are passive data. They don't change the world. They just allow the AI to ingest the current state of the world. Just observing. Right. It is the raw material the LLM uses to form its understanding before it decides to act.
And finally, we have prompts. This was the most fascinating one to me.
It's a game changer.
I thought of prompts as the AI's training manuals. The text defines them as reusable templates that help structure interactions with the language models. It gives examples like specific system prompts or few shot examples.
Right.
So if I understand this correctly, a server isn't just handing over data. It can actually hand the AI a template for how the AI should behave or how the AI should format its future requests back to that specific server.
Yes. And that is a profound feature.
It really is.
It is essentially the server saying to the AI, here is the data, and here is a set of instructions on how you should think about this data.
Wow.
It shifts a massive amount of configuration burden away from the user.
Can you give me a concrete example of how a single server might use all three of these primitives at the exact same time?
Absolutely. The brilliant part of this design is how dynamic and overlapping it is. Imagine you connect your AI host to a specialized PostgreSQL database server via MCP.
Okay. Tracking.
Through this single unified protocol, that server could expose all three primitives simultaneously to create a perfect environment for the AI.
How would that look?
Well, first it exposes a tool called execute SQL query. This allows the AI to actually run code against the database, the hands.
The hands. Okay.
It exposes a resource that contains the current read-only schema of the database, a massive text file showing all the tables, columns, and foreign keys. This allows the AI to see the structure, the eyes.
Yes. Got it.
And third, it exposes a prompt primitive. This prompt contains highly specific few shot examples of how to write optimized dialect specific SQL for this exact version of Postgre.
The training manual.
Exactly. The training manual.
That is incredibly powerful. It's like handing the AI the vehicle, the map of the roads, and a detailed driving manual all at the exact same time.
Exactly.
The AI doesn't have to guess how to format the SQL because the prompt primitive told it exactly how to do it.
Right. All of that context is categorized perfectly and delivered instantly to the AI application, making the LLM vastly more effective without the human user having to type a single instruction.
Now those are the server primitives, the things the kitchen offers the waiter. But the protocol also defines client primitives. This is what the waiter, the AI application, offers back to the kitchen.
Right, the reverse flow.
And the main active primitive here is something called elicitation.
Elicitation is a fascinating inversion of the usual dynamic. Usually the AI asks the server for things. Elicitation lets the server ask the AI for things.
Right. The documentation states that elicitation allows the server to request additional information from the user. So let's say the AI tries to use a tool to delete a production database table.
Always a scary moment.
Very scary. The server receives that request, but the server's internal logic requires human confirmation for destructive actions. Or maybe the server needs a specific two-factor authentication token that the AI didn't provide.
Right.
The server can use the elicitation primitive to essentially pause the transaction, reach back out to the AI host and say, hey, I can't do this yet. Use your user interface to go ask the human for this specific input.
It utilizes a pattern the text calls multi-round trip requests.
Multi-round trip. Okay.
It is a vital safety mechanism. It ensures the human remains in the loop when the server deems it absolutely necessary.
Because the server doesn't have a UI.
Exactly. The server doesn't have its own screen or keyboard. So it leverages the AI application's interface to get the input it needs to proceed.
Now I do want to take a moment to highlight something really specific in the documentation for anyone listening who might be a developer looking at older legacy MCP implementations.
Oh, this is important.
The version of the standard we are discussing today, 2026-7-28, explicitly notes some major deprecations in the client primitive section. Two huge features have been stripped out.
Yeah. They did some spring cleaning.
Big time. The first is sampling, which used to allow servers to request LLM completions directly from the client. And the second is logging, which used to allow servers to send their diagnostic log messages through the MCP client to the host. Both are deprecated. Why would they remove features?
Because the architects realized they were bloating the protocol with responsibilities that belong elsewhere.
How so?
Well, the text is very clear on the new best practices. Let's look at sampling. Previously, a server could say to the AI host, Hey, I need you to run this prompt through your LLM and give me the result.
Okay.
But that forces the MCP client to act as an LLM proxy, which complicates the security model and adds latency.
Right, because it has to route all that data.
The new documentation advises that if a server needs to use an LLM, it should just integrate directly with the APIs of providers like OpenAI or Enthropic itself. It shouldn't route that heavy workload back through the MCP connection.
It's about separation of concerns again. The protocol is for context exchange, not compute brokering.
Exactly. And the same logic applies to the logging deprecation.
Okay, tell me about that one.
Sending raw diagnostic logs over JSON RPC is incredibly inefficient. The text now advises servers to use standard operating system error streams like STDER if they are using local STDIO transports.
Which makes sense.
Or for remote servers, it advises using industry standard telemetry protocols like OpenTelemetry. They are streamlining MCP by removing features that are better handled by dedicated, robust external standards.
Clean up the protocol, keep it focused on its core mission.
Exactly.
Oh, and before we move off primitives, the text briefly mentions extensions. These are optional add-ons to the core protocol.
Right.
The primary example they give is the tasks extension. The documentation explains that this provides a durable handle for long running requests, allowing the client to just pull for the status later instead of keeping a connection open forever.
Which is absolutely vital for enterprise workloads.
What's that?
Imagine the AI uses a tool that triggers a massive hour long database aggregation or a complex video rendering job. Okay. You cannot keep a live HTTP request open for an hour. It will time out and fail.
Right, of course.
The task extension allows the server to instantly respond and say, I've started the job. Here is task ID 405. Go away and ask me about task 405 later. It prevents blocking operations.
Okay, so we've talked about these primitives in the abstract. We've defined the hands, the eyes, and the manuals. Let's ground this in reality.
Let's do it.
I want to walk step by step through a concrete execution example straight from the source text to see how all of this JSON RPC actually flows. We are going to look at the tool execution walkthrough.
The rubber meeting the road.
Exactly. Imagine a user types a simple prompt into their AI. What's the weather like in San Francisco?
The classic canonical test case for any AI tool system.
Right. Step one in the architecture is listing tools. The client doesn't magically know what the server can do.
No, it has to ask.
So it formats a JSON RPC request using the tools.list method and sends it over the transport layer. The server receives this and responds with an array of available tools. And this response isn't just a simple list of names like a text file. It is a highly structured payload. It has to be.arithmetic and a tool called weather.current.
I cannot emphasize enough how important that input schema is. It is the linchpin of the entire execution model.
Right, because that schema is the rule book for step two, which is execution. When the AI decides it needs to use the weather tool, the client sends a tools call request for the weather current tool. And to use it, it has to pass arguments.
Following the rules of the schema.
Exactly. The text shows that the JSON schema strictly dictates the parameters. It specified that location is a required stream parameter. In the example, the AI passes San Francisco.
Right.
And it specifies that units is an optional parameter. The AI chooses to pass imperial instead of the default metric. Once that request is sent, we hit step three, the response.
It's a result.
The server processes the parameters and returns a content array. In this example, it returns an object with a type.text field that literally says current weather in San Francisco, 68 degrees Fahrenheit, partly cloudy, and so on.
It is a beautifully clean, logically sound request and response cycle.
It is clean on paper. But here is my major pushback on this entire execution model.
Okay. Hit me.
We all know the dark secret of large language models. They hallucinate. They get creative. They make things up.
That they do.
Let's say the user asks for a highly detailed weather report. What if the LLM decides in its infinite creativity that it really wants to know the wind speed, but wind speed was not a parameter defined in that input schema?
I see the problem.
How strict is this JSON schema contract? What if the AI hallucinated an argument and blindly tried to pass wind speed dot true as a parameter to the weather tool?
It's a great question.
Does the request go through? Does the remote server just crash trying to parse a variable it doesn't recognize?
This is exactly why the input schema exists in the first place. And it is why MCP requires it to be formatted in standard JSON schema architecture.
Okay, so how does it handle it?
It is the ultimate programmatic shield. The input schema isn't just a polite suggestion for the AI. It is a rigid, mathematically verifiable contract.
So how does the validation actually work?
The validation happens before the request ever leaves the host machine. Really? This is a crucial efficiency gain. When the LLM generates the JSON payload containing the arguments, including the hallucinated wind speed, the AI host application locally checks that generated JSON against the input schema it cached during the tools list step.
Oh, I see.
It performs a local type validation routine. It sees that wind speed is not an allowed property in the schema.
And then what?
Because of this, the AI application catches the error instantly at the CPU level, without ever sending a network request. It rejects the LLM's generation and it can instantly feed an internal prompt back to the LLM saying schema validation failed. Wind speed is not allowed. Try again using only location and units.
Wow. Okay, so the host acts as an incredibly strict bouncer, checking IDs against the schema list at the door and refusing to let malformed requests out onto the network.
Exactly.
Okay.
If we didn't have that local validation, the client would encode the hallucinated request, push it through the TCP IP stack, send it across the internet to the remote server, force the remote server to parse the bad JSON, and then the server would have to construct a 400 bad request error and send it all the way back.
That is an enormous waste of time and compute just for a hallucination.
The input schema prevents bad traffic from ever hitting the wire.
That is brilliant. Now to manage all these schemas, the text mentions that the AI app builds a unified tool registry. It essentially pools the capabilities from every connected server into one giant list for the LLM to choose from. But I was thinking about scale.
Scale's always the tricky part.
What if you are connected to a massive enterprise federation of servers? What if one of those servers is an entire corporate AWS environment that exposes 10,000 distinct tools?
That's a lot of JSON to parse.
Right. Pulling all 10,000 schemas at once during the tools list phase would be an overwhelming data payload.
It would choke the connection and consume massive amounts of local memory, which is why the documentation explicitly notes that clients utilize a technique called progressive tool discovery.
How does that work mechanically?
It relies on standard pagination, much like a web search.
Oh, okay.
The client doesn't ask for all tools at once. It asks for a list, and the server returns the first 50 tools along with a next cursor string.
So you can just ask for the next batch.
Exactly. The client can then use that cursor to ask for the next 50 and so on. But practically, an AI host doesn't need to load all 10,000 tools into memory up front.
It can just search for what it needs.
Right. It can use progressive discovery to search or filter for tools dynamically as the user's prompt requires them, keeping the unified tool registry lightweight and manageable.
Okay, so we solved the execution. We've executed a tool perfectly. The AI checked the weather, you use the right schema, the local bouncer validated it, and everyone is happy.
A perfect transaction.
But the real world is messy and chaotic. Things break. What if that remote server loses access to its underlying weather API ten minutes after the cloud connects? The weather.current tool is suddenly broken, but the AI doesn't know that. It still has the tool in its unified registry.
Right. It thinks it's still available.
How does the AI know the tool is gone without constantly spamming the server every five seconds asking, are your tools still the same? Hey, are you tools still the same?
That kind of constant polling, asking over and over again would completely destroy network performance.
It would just be noise.
It would saturate the transport layer with useless chatter. Which brings us to the final major piece of the architecture required to make this whole thing viable. Real-time notifications.
The documentation outlines a system called opt-in subscriptions. The client doesn't just passively wait, it actively opens a stream using the subscriptions.listen method.
Right.
And it specifies exactly what events it cares about. It's granular. For example, it sends a payload setting the Boolean tool list changed to true.
It is explicitly telling the server, don't bother me about resource updates or prompt changes. Only tap me on the shoulder if the tool list changes.
So it's an opt-in model to conserve bandwidth.
Exactly.
Right. And when the server actually needs to notify the client, say, when that weather API goes down and the tools removed from the server's internal registry, it sends a JSON dash RPC notification back to the client. The example method given is notifications, tools, list changed. But as I was reading the JSON dash RPC spec for notifications, I noticed a fascinating mechanical detail.
Okay, what's that?
A standard JSON dash RPC request always has an ID field, like ID.1 or ID.42, so the response can match it. But these notifications have no ID field whatsoever.
Yes. That is a fundamental rule of JSON dash RPC 2.0 semantics.
Why is that?
If a message is sent without an ID field, it means it is strictly a notification. It means the sender does not expect and will not accept a response.
Oh wow.
It is a true one-way broadcast. Fire and forget.
But if it's a one-way broadcast with no standard JSON RPC ID, how does the client know what the notification is actually for?
That's the tricky part.
If it has five different subscriptions open, how does it route the incoming alert? The text explains the concept called correlation.
Yes.
Every notification carries a specific metadata property called IO.model context protocol subscription ID.
Mm-hmm.
That unique ID matches the ID generated during the original subscriptions listen request.
So they match up perfectly.
Right. So the client cross-references the metadata and knows exactly which subscription triggered the alert. And when the client receives this list change notification, the AI application immediately reacts.
It doesn't wait around.
It is triggered to refresh its tool registry by calling tools.list again to get the new updated menu. And crucially, the text notes, it notifies the LLM of its new capabilities, even if it happens right in the middle of an active conversation with the user.
That is the magic of the protocol. It allows the AI to adapt dynamically to a shifting reality.
Which is so cool.
If a corporate database suddenly goes offline for maintenance, the execute SQL query tool disappears from the AI's internal registry instantly. The AI won't try to use it, fail, and get confused. It simply knows the tool is gone.
That sounds great in theory, but wait. I found what seems like a massive contradiction, or at least a glaring architectural flaw.
Oh, okay. Let's hear it.
The text explicitly says these notifications are best effort. Right. Says there are absolutely no guarantees of delivery, especially if the transport layer reconnects or momentarily drops.
Mm-hmm.
If this protocol is supposed to be the ultra-reliable plumbing for enterprise AI, and the notification system can just drop critical capability updates into the void without throwing an error, isn't that incredibly dangerous?
It seems like it, right?
If the AI relies on this real-time data to know what it can and can't do, how can the architects justify a system that just loses messages?
That is a phenomenal catch. And it gets to the heart of distributed systems engineering.
Okay. You explain it to me.
If we connect this to the bigger picture, we see that this is not a flaw. It is an intentional, highly optimized trade-off. The architects of MCP prioritized a lightweight, event-driven design over a heavy, stateful one.
How does dropping messages make it optimized?
Think about what it takes to guarantee delivery across a network.
It takes a lot.
If they demanded guaranteed delivery for every single notification, they would have had to build heavy, stateful message cues into the core protocol, similar to Apache Kafka or RabbitMQ.
Well, that's heavy infrastructure.
Very heavy. Servers would have to store every single notification in memory or on disk. They would have to track acknowledgement receipts from every client.
That sounds like a nightmare.
It is. If a client disconnected for five seconds, the server would have to hold the message, wait for their reconnect, verify the identity, and resend it. That requires massive overhead and complex state management on the server side.
It would turn a lightweight context protocol into a clunky enterprise messaging broker.
Exactly. It would completely violate the core tenet of statelessness we spent so much time discussing earlier. It would ruin the efficiency.
So what's the solution?
So instead of burdening the protocol with state, they built a hybrid approach. The text explicitly tells developers that while they should use notifications, clients must also rely on periodic polling to preserve the freshness of results.
I see. So you don't rely entirely on the push notifications.
Right. You use notifications for speed, getting that instant update when the network is perfect and everything is working well.
But if there's a blip.
But you use periodic background polling for safety, ensuring eventual consistency, even if a notification packet gets dropped during a brief network hiccup. Right. If the notification drops, the client will still realize the tool is gone during its next background poll a minute later.
It's a pragmatic real world engineering solution.
It is. You use the notifications for the sprint and you use the polling for the marathon.
Okay, that makes perfect sense when you frame it around the cost of maintaining state. It's about balancing the desire for real-time speed with the necessity of protocol resilience.
And that balance is what makes MCP 20260728 such a mature piece of architecture.
Let's do a quick recap of the massive journey we've just taken through this architecture, because we have covered a lot of ground today.
We really have.
We started by establishing the core ecosystem, the AI host managing the user experience, the clients acting as dedicated one-to-one connection managers, and the hardware agnostic servers providing the actual context. The restaurant.0 data layer operating seamlessly over either lightning fast local STDIO pipes or remote streamable HTTP roads. We debated the necessity of the stateless handshake, proving how exchanging metadata and capability manifests through discovery prevents catastrophic network waste.
No ordering at the vegan bakery.
Exactly. We dove deep into the heart of the protocol, the primitives, equipping the AI with active tools, passive resources, and instructional prompts.
The hands, eyes, and manuals.
We walked through a tool execution, analyzing how the input schema acts as a local CPU level bouncer to block LLM hallucinations before they hit the wire.
Which is just a brilliant design.
And finally, we saw how opt-in notifications paired with hybrid background polling keep that entire complex ecosystem synchronized without bogging down the servers.
It is a brilliantly scoped standard.
By stubbornly focusing entirely on the rigorous transmission of context and completely ignoring how the LLM actually thinks or behaves, the protocol provides a robust universal adapter for AI.
It really does.
It allows developers to build tools once and have the work across any compliant AI application instantly. And for you listening, you now understand the exact standard that allows modern AI to finally step out of its isolated sandbox and securely reliably interact with the real world. You understand the invisible plumbing.
The roads are built.
But as we wrap up, I want to leave you with a thought. As I was pouring over the documentation, something really stuck with me about the future implications of this architecture.
I think I know exactly where you're going with this.
So what does this all mean? The text explicitly states over and over again that MCP focuses solely on context exchange. It blindly delivers the data. It does not dictate how AI uses the LLMs or manages that context. It just hands over the tools, resources, and prompts, exactly as defined by the server.
Right.
But if the AI host is ultimately responsible for evaluating those text descriptions, looking at the prompts, and choosing which tools to use based on the user's intent, it raises a wild, slightly terrifying future scenario.
The battleground shifts.
Exactly. If an AI host is connected to dozens of remote MCP servers simultaneously, say a massive marketplace of enterprise plugins. Will we soon see these servers actively competing for the AI's attention?
Oh, absolutely.
Are we gonna see the rise of context SEO? Will remote server developers start reverse engineering LLM behavior, crafting their tool descriptions and their prompts with highly specific, psychologically manipulative semantic language?
Just to get picked first.
Just to trick the host's LLM into prioritizing their weather tool or their shopping tool over a competitor's. If the protocol is just a blind, mathematically perfect delivery mechanism, it means the entire war for AI dominance moves to the semantic descriptions themselves.
The manual becomes the marketing.
Just something for you to mull over the next time you ask your AI to reach outside its box.