The Three Roles: Host, Client, Server¶
A developer adds a few lines to a configuration file, and an AI assistant gains a new connection to company data. Behind those lines sit a host, a client and a server. Each holds a different share of the security work, and the MCP architecture assigns most of it to the host.
Who Does What¶
| Role | What It Is | Its Security Job In The Specification |
|---|---|---|
| Host | Your developers open the host every day. It's the AI application itself, a chat interface or an AI code editor for example, and it creates one client for every server they connect. | Most of the load sits here. A host enforces security policies and consent requirements, controls each client's connection permissions and handles the user's authorization decisions. |
| Client | Three connected servers mean three clients. A client is a connector that lives inside the host and talks to exactly one server. | Maintains the security boundaries between servers. |
| Server | The program behind the tools. It runs as a local process on the user's machine or as a remote service, and it exposes resources, prompts and tools to the client. | Must respect security constraints. Where it offers tools, the specification says a server MUST validate all inputs, implement access controls, rate limit invocations and sanitize outputs. |
MCP's design principles state that a server should not be able to read the whole conversation or see into other servers. The full conversation history stays with the host, and the host process enforces the boundaries.
There's a limit to that promise. The specification adds that MCP cannot enforce its security principles at the protocol level, so your protection depends on how the host your developers chose was built.
Local And Remote Servers¶
A server runs either as a local process on the user's machine or as a remote service. Local servers usually communicate over stdio, the standard input and output streams of a process the client launches. Remote servers use Streamable HTTP, and the older HTTP+SSE transport is deprecated.
A Local Server Runs With The User's Access
OWASP's MCP Security Cheat Sheet notes that stdio avoids a listening endpoint. It does nothing to restrict the server process's access to files, the network or credentials. MCP's own security guidance asks clients to warn that a local server runs with the same privileges as the client.
What A Server Can Offer¶
Functions for the AI model to execute. A tool can query a database, call an API or perform a computation.
Context and data, for the user or the AI model to use.
Templated messages and workflows for users.
The specification singles out tools. It states that they represent arbitrary code execution and must be treated with appropriate caution.