Trust Boundaries
The boundary map
Section titled “The boundary map”Every arrow below crosses a trust boundary:
flowchart LR U[User] <--> H[Host] H <--> L[LLM] H <--> C[Client] <--> S[Server] <--> E[External system<br/>API / DB / filesystem]
- User ↔ Host: the user trusts the host to act on their behalf and honor consent
- Host ↔ LLM: model output is untrusted — it may be manipulated via prompt injection
- Client ↔ Server: servers are third-party code; their tool descriptions and annotations are untrusted unless they come from a trusted server
- Server ↔ External systems: servers hold credentials and act with real-world side effects
Core principles
Section titled “Core principles”- Servers are untrusted by default — treat tool descriptions, annotations, and results as potentially adversarial content unless the server is trusted
- Servers receive only necessary context — a server cannot read the whole conversation or “see into” other servers
- The host is the policy enforcement point — the host enforces security policies and user consent, controls permissions, and maintains isolation between servers (clients also maintain security boundaries between servers)
- Model output is data, not commands — a tool call proposed by the LLM is a request; the host must obtain explicit user consent before invoking any tool
Local vs remote servers
Section titled “Local vs remote servers”| Aspect | Local (stdio) | Remote (Streamable HTTP) |
|---|---|---|
| Runs as | Subprocess with your OS user’s privileges | Third-party service |
| Main risks | Supply chain (malicious package), broad filesystem access | Credential theft, data exfiltration, weak auth |
| Auth | Credentials from the environment (OAuth is not used over stdio) | OAuth 2.1-based authorization |
Key exam points
Section titled “Key exam points”- Anything a server sends (including tool descriptions) can carry injected instructions
- Isolation between servers is a host responsibility
- Remote servers require authentication; MCP specifies OAuth 2.1-based authorization for HTTP transports (authorization is optional in the protocol, but HTTP servers SHOULD support it)
- An MCP server must never forward tokens it receives to downstream APIs — token passthrough is explicitly forbidden
Check your knowledge
Section titled “Check your knowledge”📝 Check your knowledge