MCP Unplugged : Demystifying Model Context Protocol (MCP)

Introduction :
As AI agents gained more and more traction with LLM as a reasoning engine , it started to interact with more data sources with each one requiring its own custom implementation .
So Anthropic in late 2024 introduced Model Context Protocol ( MCP) , an open standard for connecting AI systems with data sources .
What is Model Context Protocol (MCP) ?
Model Context Protocol (MCP) in simple terms is an open standard for connecting AI applications with external systems.
With the advent of Model Context Protocol ( MCP ) it is giving the AI applications enhanced capabilities to talk to external systems be it file systems , databases , knowledge bases , development tools in a standardised manner reducing the development time and complexity while building or integrating with an AI agent.
As its popularly called out
Think of MCP as USB-C Port for AI applications , Just as USB-C provides a standardised way to connect electronic devices, MCP provides a standardised way to connect AI applications to external systems.
Image Source : https://modelcontextprotocol.io/docs/getting-started/intro
Before MCP :
After MCP :
How does MCP Work ?
MCP works on Host-Client-Server Architecture model with the three key participants in the protocol.
MCP Host : This will be typically an AI application that manages one or MCP clients . It integrates interactive tools to establish communication within the external servers . Examples : Claude Code Desktop , VS Code IDE, Cursor IDE , A custom AI agent
MCP Client : An MCP client acts an intermediary component within the host environment and is responsible for maintaining one to one connection to the MCP server and then fetching the context from the MCP server to be used by the MCP host.
MCP Server : MCP Server enables MCP host and client to access external systems and execute operations. MCP Server is responsible for providing primitives which is the key concept in the MCP as this defines what client and server can offer each other and specify the types of contextual information that can be shared with the AI applications and the actions that can be performed.
Understanding Primitives :
There are three core primitives MCP Servers expose
Tools : Executable functions that AI applications can invoke to perform actions (e.g., file operations, API calls, database queries)
Resources : Data sources that provide contextual information to AI applications (e.g., file contents, database records, API responses)
Prompts : Data sources that provide contextual information to AI applications (e.g., file contents, database records, API responses)
A Visual Snapshot explaining MCP Workflow with a Practical Example :
Example :
Let’s say I’ve developed a chat service as a backend API and I want to deploy it on an Azure container app using Visual Studio Code. I’d like to know the CLI syntax commands to create an Azure container app. With MCP, I can easily connect to the Microsoft Learn MCP server within the IDE to get the commands without needing to go outside.
Data Layer in MCP :
A core part of Model Context Protocol (MCP) is defining the schema and semantics between the MCP Client and Server . It is the part of MCP that defines the ways developers can share context from MCP servers to MCP clients.
MCP uses JSON RPC 2.0 as its underlying RPC protocol
What is RPC ?
By definition , a Remote Procedural Call (RPC) allows a programme to call a method or function on a remote server as if it were a local function. This abstracts networking, serialisation and transport mechanisms.
A simple analogy could be :
It’s like sitting at home pressing a button on your food delivery app to order a coffee. You’re not visiting a café, preparing the coffee or seeing how it’s made. You simply call a function to order it and it’s delivered back to you. You don’t manage the kitchen ingredients or delivery. In simple terms, that’s RPC.
What is JSON RPC 2.0 ?
By definition, it’s a lightweight RPC protocol using JSON for message encoding. It’s transport agnostic, meaning messages can travel over HTTP, WebSockets or raw TCP.
How does JSON RPC 2.0 work
It works on the client-server architecture model where the request is sent in a JSON format and the response is also returned in a JSON format using the RPC protocol.
Request Attributes :
jsonrpc : A String specifying the version of the JSON-RPC protocol . Must be 2.0
method : A String containing the name of the method to be invoked
params : A Structured value that holds the parameter values to be used during the invocation of the method
id : An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification.The Server MUST reply with the same value in the Response object if included . This member is used as a correlation identifier between the two objects
Response Attributes :
jsonrpc : A String specifying the version of the JSON-RPC protocol . Must be 2.0
result :
This member is REQUIRED on success.
This member MUST NOT exist if there was an error invoking the method.
The value of this member is determined by the method invoked on the Server.
error :
This member is REQUIRED on error.
This member MUST NOT exist if there was no error triggered during invocation.
The value for this member must be an error object
Error object consists of three attributes : code , message , data
id :
This member is REQUIRED.
It must be the same as the value of the id member in the Request Object.
If there was an error in detecting the id in the Request object (e.g. Parse error/Invalid Request), it must be Null.
Simple Request
{
"jsonrpc":"2.0",
"method":"sum",
"params":[1,2,3],
"id":1
}
Simple Response :
{
"jsonrpc":"2.0",
"result":7,
"id":1
}
Simple Representation of JSON RPC 2.0
Transport Layer in MCP
MCP typically uses one of two transport communication protocols during client - server interactions
stdio
streamable http
STDIO Transport :
MCP uses the stdio transport communication protocol, typically in scenarios where a MCP server runs as a child process on the same client machine. This protocol uses standard input and output streams for direct process communication, offering optimal performance with minimal network overhead.
A practical example can be the Visual Studio Code acting as the MCP client and it calls the local MCP server lets say a basic calculator exposed and registered as a tool .
Streamable HTTP Transport :
We’re all familiar with traditional HTTP transport. Streamable HTTP is an evolution of this, where responses are received in chunks over time rather than a single response for a request.
A simple restaurant analogy to explain streamable http
Think of normal http request as a typical process of ordering a food in restaurant i.e Place an order ---->Wait ----- > Receive the meal ----> Done . Now if you consider streamable http then you receive updates i.e place an order ---> chopping veggies ---> cooking in progress --- > dish ready ---> meal received ---> Done
A simple practical example could be Visual Studio Code acting as an MCP client and calling a calling a remote MCP server.
Conclusion
This concludes the first article in the MCP series, where I explained what an MCP is and how agents interacted with resources before and after MCP. I covered how MCP architecture works, the key primitives in MCP, how messaging functions in MCP interactions, and the various transport mechanisms available, as well as how it operates behind the scenes.
In the next blog, we will deep dive into lifecycle of an MCP server learning it by building an MCP server from scratch . We will also learn how to register a local MCP server for use in IDEs like VS Code and how to invoke remote MCP servers.
Drop a like or share your thoughts if you find it useful .
Key References :
MCP Documentation : https://modelcontextprotocol.io/docs
MCP White paper : https://arxiv.org/pdf/2503.23278
JSON RPC Documentation : https://www.jsonrpc.org/specification





