MCP Server Architecture in Plain Terms
An MCP server is one piece of a three-part setup. Here is what each part does, what a server offers, and how the conversation between them works.
- published
You do not need to write code to build agents. But you do need to know what you are plugging together. MCP server architecture sounds like a developer topic. It is really just three parts and a set of rules for how they talk. Once you see the shape of it, choosing a server gets much easier. A deeper look at the trade between the two sides is in what MCP clients and servers offer each other.
What an MCP server is
The MCP documentation says MCP is an open-source standard for connecting AI applications to external systems. It gives one standard way to make that connection. The same documentation says MCP servers expose your data and tools. So a server is the piece that sits between an AI app and the things you want the AI to reach.
The documentation also says MCP clients are applications that connect to MCP servers. That word, client, is where most of the confusion starts. The client is a connector inside the host app. It is a part of the setup with its own job, which the next section covers.
The three parts: host, client, server
The Model Context Protocol specification splits the work into three roles. Hosts, in its words, are LLM applications that initiate connections. Clients sit in the middle as connectors within the host application. Then come servers, which are services that provide context and capabilities.
Picture a chat app that can read your files. The chat app is the host. It starts the connection. Inside it, a client does the connecting. On the far end sits the server, which holds the files.
This is the MCP client server model. Each part has one job. The host runs the AI and starts things. The client carries messages. The server holds the data and the tools.
What a server offers: resources, prompts and tools
The specification says servers can offer resources, prompts and tools to clients. Those three words cover everything a server can hand over.
Tools are for the model. The specification says a server's tools are functions for the AI model to execute. The host must get the user's clear consent before it calls any tool.
Resources are for reading. The specification says a server's resources are context and data for the user or the AI model to use.
Prompts are for the person. The specification says a server's prompts are templated messages and workflows for users. A prompt is a ready-made message the user can pick up and fill in.
When you look at a server, check which of the three it offers. A server with only resources gives the AI things to read. A server with tools lets the AI act.
What the client offers back: sampling, roots and elicitation
The trade runs both ways. The specification says clients may offer sampling, roots and elicitation to servers. The word may matters. A client can offer all three, some, or none.
Of these, elicitation is the plainest to picture. Per the specification, elicitation is a server-initiated request for more information from users. Picture a server that lacks a detail it needs. Through the client, the server can ask the person for that detail.
So before you wire a client to a server, check what the client offers too.
How the parts talk: JSON-RPC messages and stateful connections
The specification says the protocol uses JSON-RPC 2.0 messages between hosts, clients and servers. JSON-RPC is a simple, standard message format.
The specification also says the protocol connections are stateful and servers and clients negotiate capabilities. Stateful means the connection remembers. When the two sides first connect, each one says what it can do.
The two sides agree on what each can do, and the connection keeps that state.
Consent and caution built into the design
A server that exposes tools and data is powerful, and the spec is plain about the risk. It says the protocol enables powerful capabilities through arbitrary data access and code execution paths. It says tools represent arbitrary code execution and must be treated with appropriate caution.
The spec puts the user in charge. It says users must explicitly consent to and understand all data access and operations. It says users must retain control over what data is shared and what actions are taken. It says hosts must obtain explicit user consent before exposing user data to servers, and before invoking any tool.
One more thing. The specification says MCP itself cannot enforce its security principles at the protocol level. The spec puts consent with the host and control with the user. That leaves the checking to you. Read what a server offers before you connect it.
Where to go from here
Now you know the shape of the parts. A few pages can take you further. To see the range of what servers do, look at MCP server examples. To run one on your own machine, read how to set up a local MCP server. If a client needs something custom, how to build an MCP server walks through the process.