The Model Context Protocol (MCP) architecture is designed to create a standardized, scalable way for AI “Hosts” (like chatbots) to interact with various “Servers” (tools and data sources).
The following documentation breaks down the architecture from its core entities to its technical layers, including a structural diagram representing the “working” system.
1. The Core Entities of MCP #
The MCP architecture is built on three fundamental pillars that interact to facilitate communication between an AI and external tools.
A. The Host (The AI Application)
The Host is the AI chatbot or interface that the user interacts with (e.g., Claude Desktop or a custom-built chatbot). It is connected to a Large Language Model (LLM) like GPT-4 or Gemini. When a user asks a question that requires external data, the Host realizes it needs a tool or server to find the answer.
B. The MCP Client (The Connector)
Crucially, a Host never speaks directly to a Server. It uses an MCP Client as a helper. The Client’s primary role is to translate high-level requests from the Host into the specific “MCP language” (JSON-RPC) that the server understands.
C. The MCP Server (The Tool)
A Server is a specialized entity with the capability to execute specific tasks, such as managing a GitHub repository, reading Google Drive files, or accessing a Slack channel
2. Working Architecture Diagram #
Based on the “final architecture” described in the sources, the system functions as follows:

3. The Relationship Model: One-on-One Scalability #
MCP follows a strict one-on-one relationship between a Client and a Server.
- One Client per Server: If a Host needs to connect to three different servers (e.g., GitHub, Slack, and Drive), it must use three separate clients.
- Decoupling: This architecture ensures a separation of concern. If the GitHub connection fails, the Slack and Drive connections remain unaffected, ensuring system safety.
- Parallelism: Because each communication line is independent, a Host can perform tasks across different servers parallelly, making execution faster.
4. Server Primitives (Offerings) #
Every MCP Server provides three types of offerings, known as primitives, which define what the AI can actually do with that server.
| Primitive | Description | Example |
|---|---|---|
| Tools | Dynamic actions the AI can perform. | Creating a GitHub issue or searching for a file in Drive. |
| Resources | Structured, static data sources the AI can read. | Fetching a README.md file or a database schema. |
| Prompts | Pre-defined templates to shape the AI’s behavior. | A template ensuring the AI generates a detailed, structured bug report. |
MCP also provides Standard Operations (e.g., list, call, read, subscribe) to interact with these primitives in a uniform way.
5. The Data Layer: JSON-RPC 2.0 #
The “language” spoken by the MCP ecosystem is based on JSON-RPC 2.0. This protocol allows the AI to call a function on a remote machine as if it were a local function, hiding the complex details of network communication.
Why JSON-RPC instead of REST APIs?
MCP uses JSON-RPC for several technical advantages:
- Lightweight: It lacks the heavy headers and metadata required by REST, making messages simpler to write, debug, and transport.
- Bi-directional: Unlike the one-way communication of REST, JSON-RPC allows both the Client and Server to send requests to each other.
- Batching: It supports sending multiple requests (e.g., listing both issues and pull requests) in a single message.
- Notifications: It allows for “fire-and-forget” notifications where a response is not required, which is useful for real-time updates.
6. The Transport Layer: STDIO vs. HTTP/SSE #
The transport layer is the mechanism that physically moves the JSON-RPC messages. The mode of transport depends on whether the server is local or remote.
A. Local Servers (STDIO) #
When a server is installed on the same machine as the Host, it is a Local Server.
- Mechanism: The Host launches the server as a sub-process, establishing a parent-child relationship. This gives the Host control over the server’s Standard Input/Output (STDIO) streams.
- Process: The Client sends a JSON-RPC message into the server’s input stream; the server processes it and sends the result back through its output stream.
- Benefits: This is extremely fast, highly secure (no network ports are opened), and simple to implement.
B. Remote Servers (HTTP + SSE) #
When a server is on the internet, it is a Remote Server.
- HTTP POST: The Host sends JSON-RPC messages as payloads within standard HTTP POST requests.
- SSE (Server-Sent Events): This extension of HTTP allows the server to stream incremental updates back to the client. This is ideal for long-running tasks or providing a “streaming” AI response experience.
7. Strategic Brilliance: Transport Agnosticism #
A key feature of MCP is that the Data Layer is decoupled from the Transport Layer. Because JSON-RPC is transport-agnostic, the way messages are written remains identical regardless of whether they are being sent via STDIO locally or HTTP/SSE remotely. This design makes MCP incredibly flexible and future-proof
MCP Architecture Quiz #
Q.1 In the context of Model Context Protocol (MCP), what is the primary role of the Host?
Managing the low-level communication protocol for each individual server.
Converting JSON-RPC messages into HTTP requests for remote access.
Acting as the AI chatbot interface that interacts with the user.
Providing the actual tool execution environment, like a GitHub API.
Explanation
The MCP Host is the AI application (such as Claude Desktop or ChatGPT) that interacts directly with the user and coordinates communication with MCP Clients.
Q.2 What kind of relationship exists between an MCP Client and an MCP Server during a session?
Stateless broadcast relationship.
One-on-one relationship.
One-to-many relationship.
Many-to-one relationship.
Explanation
Each MCP Client maintains a dedicated one-to-one connection with an MCP Server. Multiple servers require multiple client connections managed by the Host.
Q.3 Which MCP primitive provides predefined instruction templates to guide the AI's behaviour?
Tools.
Prompts.
Operations.
Resources.
Explanation
Prompts are reusable instruction templates supplied by the MCP Server to guide the AI toward consistent formatting, reasoning, or task execution.
Q.4 Why was JSON-RPC 2.0 selected as the foundation of the MCP Data Layer instead of REST?
It provides more complex metadata.
It requires strict HTTP headers.
It only supports synchronous communication.
It is transport-agnostic and supports bidirectional communication.
Explanation
JSON-RPC 2.0 separates the message format from the transport mechanism, allowing MCP to work over STDIO, HTTP, SSE, and other transports while supporting bidirectional communication.
Q.5 Which field in a JSON-RPC 2.0 message allows a client to match a response with its original request?
params.
method.
id.
result.
Explanation
The id field uniquely identifies a request so that the corresponding response can be matched correctly, especially when multiple requests are processed concurrently.
Q.6 In JSON-RPC 2.0, what is the main difference between a Request and a Notification?
Requests are only for local servers.
Requests can only be sent by clients.
A Request expects a response with a matching id, whereas a Notification does not expect any response.
Notifications use XML instead of JSON.
Explanation
A Request contains an id and expects a response. A Notification intentionally omits the id because no response is expected from the receiver.
Q.7 Which Transport Layer technology is commonly used for remote MCP servers to stream updates to the client?
HTTP GET.
Server-Sent Events (SSE).
Standard Input (stdin).
Batch Processing.
Explanation
Server-Sent Events (SSE) enable MCP Servers to continuously stream events and responses to remote clients without requiring repeated polling requests.
Q.8 What is a major architectural benefit of decoupling in the MCP ecosystem?
It merges all servers into one process.
It allows AI models to communicate directly with hardware.
It removes the transport layer.
A failure in one server connection does not affect other independent server connections.
Explanation
Because every MCP Server communicates independently, failures or crashes in one server do not interrupt communication with other connected servers.
Q.9 Which standard MCP operation is used to discover all tools provided by a connected server?
resources/read.
tools/list.
tools/call.
prompts/get.
Explanation
The tools/list operation returns the complete catalog of tools exposed by an MCP Server, including their names, descriptions, and input schemas.
Q.10 If an AI needs to read a static README file from a repository, which MCP primitive should be used?
Resources.
JSON-RPC 2.0.
Batching.
Tools.
Explanation
Resources provide read-only or static information such as documentation, README files, configuration files, and other content, whereas Tools are used to perform actions.