What is an MCP host?
An MCP host is the user-facing application in the Model Context Protocol architecture that integrates the language model and creates and manages multiple MCP clients, each connected to one MCP server; examples include a chat app, a code editor or an in-house assistant.
Unlike an MCP client, a connection component inside the host talking to exactly one server, the host creates these clients and controls their permissions and lifecycle. An MCP server offers tools, resources and prompts but cannot see the whole conversation; the host guards that boundary.
- Topic
- Agents and protocols
- Also known as
- MCP host application
- Origin
- Model Context Protocol specification, 2024
How an MCP host works
- The host creates a client for each configured server and controls connection permissions.
- User or model actions reach the server through the relevant client.
- Steps needing security policy or user consent are decided in the host.
- Context from different servers is aggregated in the host and passed to the language model.
In more detail
Cross-server context isolation and protection against cross-poisoning
Because an MCP host aggregates context and tool definitions from multiple independent servers into a single LLM context window, it is the primary defence against cross-server attacks (such as tool shadowing or confused deputy flows). The host must isolate untrusted server outputs, for instance, preventing a document read from an external server from triggering a privileged write tool on an internal server without explicit policy checks or user confirmation.
Local stdio child process isolation and environment variable hygiene
When a host launches local MCP servers over the stdio transport, it spawns child OS processes directly on the host machine. Secure hosts sanitise inherited environment variables (stripping unrelated secrets), enforce process sandboxing (containers, read-only filesystems, restricted network egress) and pin executable paths or package hashes before startup.
Headless and autonomous MCP hosts
Not all MCP hosts are interactive chat or IDE apps; automated backend pipelines and autonomous agents also operate as headless MCP hosts. Where no human user is present to approve tool calls in real time, the host must replace interactive consent prompts with strict pre-approved capability scopes, deterministic input schemas and circuit breakers on high-impact actions.
Commonly confused terms
| Term | How it differs |
|---|---|
| AI agent framework | An AI agent framework orchestrates reasoning loops, memory and planning; an MCP host specifically implements MCP client management and consent boundaries; an agent framework often acts as an MCP host when consuming MCP servers. |
| MCP server | An MCP host runs on the consumer side (managing clients and holding the full conversation), while an MCP server exposes tools, resources and prompts to clients and has no visibility into the broader conversation or other connected servers. |
Why an MCP host matters for on-premises AI
The specification defines the host as container and coordinator: it creates and manages clients, enforces security policies and consent requirements, handles user authorisation decisions and aggregates context across clients. Under its design principles the full conversation stays with the host, servers receive only necessary context and the host controls cross-server interactions. In-house, security control therefore rests mainly with the host; a study of MCP threats distinguishes four attacker types, from malicious developers to plain security flaws.
An insurer configures its in-house assistant as an MCP host, connecting to claims and document search servers through separate clients and asking user consent before any record-changing tool call.
Common questions
How does an MCP host differ from an MCP client?
The host is the application users work in and manages several clients. A client is a component inside the host talking to one server.
Can servers see the whole conversation?
Not under the specification's design principles. The full conversation stays with the host; servers get only the context they need.
Related terms
Sources
- Model Context Protocol, Specification 2026-07-28: Architecture
- Hou et al., Model Context Protocol (MCP): Landscape, Security Threats, and Future Research Directions, 2025
In the glossary: Glossary, M to Q