TKOResearch
Menu
Back to insights
MCP SecurityMCP SecurityThreat model

MCP Threat Model: Clients, Servers, Tools, Tokens, and Trust Boundaries

An MCP threat model for teams connecting LLMs and AI agents to tools, OAuth tokens, APIs, local servers, SaaS systems, and production workflows.

Last reviewed May 4, 20269 min read

The Boundary

The Model Context Protocol is not just an integration convenience. It is a new trust boundary between AI systems and the tools, data, identities, APIs, files, and workflows they can reach.

An MCP threat model should answer one central question:

If an MCP client, server, tool description, token, session, local runtime, or model context is manipulated, what can the agent read, write, delete, send, execute, or leak?

Official MCP security guidance calls for review around authorization flows, confused deputy risks, token passthrough, SSRF, session hijacking, local MCP server compromise, and scope minimization.

Why MCP Needs Its Own Threat Model

Traditional application threat models usually start with users, APIs, databases, trust zones, and authentication boundaries.

MCP adds a new layer:

User
  -> AI client / agent runtime
  -> MCP client
  -> MCP server
  -> tool implementation
  -> SaaS API / local resource / internal system

That chain matters because natural-language reasoning can now influence tool selection, parameter generation, authorization flow, and downstream business actions.

MCP threat modeling should focus on five assets:

AssetWhy It Matters
MCP clientsThey mediate the agent's access to tools and servers.
MCP serversThey expose capabilities and data to the AI system.
ToolsThey define what the agent can actually do.
Tokens and credentialsThey determine the real blast radius.
Tool output and contextThey can feed back into future model behavior.

If you only review the MCP server code and ignore the agent, tokens, tool descriptions, and downstream systems, the threat model is incomplete.

1. Identify The MCP Actors

Start by identifying every actor in the system.

ActorDescriptionThreat Model Questions
Human userPerson asking the agent to perform a task.What identity, role, tenant, and permissions apply?
AI clientThe application or assistant invoking MCP.Is it trusted? Is it enterprise-managed?
MCP clientThe protocol-facing component that talks to servers.How does it authenticate and authorize requests?
MCP serverThe service exposing tools/resources.What tools and data does it expose?
Tool implementationThe actual code/API call behind a tool.Does it enforce authorization independently?
Authorization serverOAuth or identity provider.Are scopes, redirect URIs, and consent enforced?
Downstream serviceSaaS app, database, filesystem, internal API.What business impact can actions have?
Attacker-controlled contentWebpage, email, PDF, RAG document, tool output.Can it influence the agent or tool call?

The most important threat-model shift is this: the attacker may never authenticate to the MCP server directly. They may instead influence content that the AI system later ingests.

2. Draw Trust Boundaries

Every MCP deployment should have a trust-boundary diagram.

[User / tenant]
    -> [AI application]
    -> [MCP client]
    -> [MCP server]
    -> [Tool runtime]
    -> [External API / internal service / local machine]

Then mark the flows:

FlowBoundary Concern
User promptUntrusted input entering model context.
System/developer instructionsHigh-trust instructions that must not be overridden.
Retrieved contentPotentially untrusted data entering context.
Tool metadataModel-facing tool descriptions and schemas.
Tool parametersModel-generated structured action.
Tool outputData that may influence the next model step.
OAuth tokensCredentials crossing between systems.
Session identifiersState that can be hijacked or replayed.
LogsArtifacts that may contain sensitive material.

The failure mode usually happens at a boundary where the system treats untrusted content as trusted instruction or allows model output to become action without deterministic controls.

3. Threat Model Confused Deputy Behavior

A confused deputy problem occurs when one component is tricked into using its authority on behalf of an entity that should not have that authority.

MCP security guidance specifically identifies confused deputy risk in MCP authorization flows and discusses conditions involving proxy servers, authorization servers, static client IDs, and missing per-client consent.

QuestionWhy It Matters
Does each MCP client receive explicit user consent?Prevents one client from riding another client's authorization.
Are redirect URIs exact-match validated?Prevents authorization-code theft or redirection.
Is OAuth state random, bound, and validated?Reduces CSRF and authorization-flow manipulation.
Are authorization decisions per-client and per-user?Avoids shared authorization across untrusted clients.
Are scopes narrowly defined?Reduces damage if authorization is abused.

The model should never be the party deciding whether a tool call is authorized. The model can request an action. The server must authorize it.

4. Threat Model Token Passthrough

Token passthrough is dangerous because it moves credentials into places they may not belong.

Token PatternRisk
Broad service tokenAgent gets organization-wide authority.
User OAuth token passed downstreamToken may reach systems outside intended trust boundary.
Long-lived API keyCompromise creates durable access.
Token visible to model contextSecret may be leaked or reused.
Token shared across usersActions lose attribution.
Token stored in local MCP configEndpoint compromise becomes cloud compromise.

A safer design uses short-lived, narrowly scoped, user-attributable credentials and keeps secrets out of model-visible context.

5. Threat Model SSRF And Network Reachability

MCP security guidance includes SSRF as a risk area and points implementers toward allowlist strategies, input validation, and network-level controls.

Review every tool that can fetch URLs, connect to hosts, inspect metadata endpoints, query APIs, or retrieve remote content.

Tool CapabilityReview Question
Fetch URLCan it access internal IPs, localhost, link-local metadata, or cloud metadata endpoints?
Query APIAre destination hosts allowlisted?
Browse webpageCan attacker-controlled pages influence later tool calls?
Read fileAre filesystem paths constrained?
Proxy requestCan headers, methods, or redirects be abused?
Connect socketAre internal services reachable?

A safe MCP server should assume that URLs, hostnames, file paths, and remote content are attacker-controlled unless proven otherwise.

6. Threat Model Session Hijacking And Event Injection

MCP security guidance describes session hijacking as a scenario where an unauthorized party obtains a session ID and uses it to impersonate the original client. It also describes risks in stateful HTTP servers where malicious events can be associated with an existing session and later delivered to a legitimate client.

ControlRequirement
Session IDsSecure, random, non-deterministic.
AuthenticationSessions must not replace authorization.
BindingSession state should bind to authenticated user identity.
ExpirationSession IDs should rotate or expire.
Event queuesEvents should bind to user/session and be validated.
Resumable streamsResumed events must be authorized and integrity-checked.

If a malicious event can alter tools, context, or model-visible state, session handling becomes part of the AI security boundary.

7. Threat Model Local MCP Servers

Local MCP servers are especially risky because they run near developer workstations, IDEs, local files, environment variables, browser sessions, source code, and secrets.

Official MCP security guidance warns that local MCP servers are binaries downloaded and executed on the same machine as the MCP client, and that attacks may include malicious startup commands, malicious payloads inside the server, or insecure local servers left running on localhost.

Local RiskExample Control
Filesystem accessPath allowlists and deny access to secrets.
Shell executionDisable by default or strict command allowlists.
Environment variablesPrevent exposure of tokens and .env content.
Startup commandsRequire signed/trusted configs.
Localhost exposureBind safely, authenticate, defend against DNS rebinding.
Developer credentialsSeparate agent tools from privileged developer secrets.
Supply chainVerify server origin, version, and integrity.

For enterprise use, local MCP servers should be treated like privileged endpoint software.

8. Threat Model Tool Descriptions And Schemas

Tool metadata is model-facing control surface.

FieldRisk
Tool nameAmbiguous or misleading names may cause wrong selection.
Tool descriptionCan steer the model toward unsafe use.
Parameter schemaLoose schema allows unsafe values.
DefaultsDangerous default behavior may be invisible.
Return dataTool output may contain sensitive or instructive text.
Error messagesMay leak secrets, IDs, paths, or policies.

The safest tools are narrow, typed, explicit, and independently authorized.

MCP Threat-Model Checklist

AreaQuestion
InventoryDo we know every MCP client, server, tool, token, and downstream system?
Trust boundariesDo we know where untrusted content enters model or tool context?
AuthorizationIs authorization server-side, scoped, and per-user/per-client?
TokensAre credentials short-lived, least-privilege, and not model-visible?
ToolsAre tool schemas narrow, validated, and action-specific?
SSRFAre fetch/connect tools constrained by allowlists and network controls?
SessionsAre sessions non-authenticating, bound, random, and expiring?
Local serversAre local filesystem, shell, and secret exposures constrained?
LoggingCan prompt, retrieval, tool, token, authorization, and action traces be reconstructed?
Kill switchCan risky MCP servers or tools be disabled quickly?

What A Useful MCP Threat Model Leaves Behind

The threat model should be concrete enough that an engineer can tighten permissions and an executive can understand residual risk without reading every line of code.

DeliverableDescription
MCP Architecture DiagramShows clients, servers, tools, auth flows, sessions, and downstream systems.
Trust-Boundary MapIdentifies where untrusted content, tokens, and tool outputs cross boundaries.
Tool Inventory MatrixLists tool capabilities, actions, permissions, and data touched.
Token Scope ReviewIdentifies overbroad OAuth scopes, service accounts, and token passthrough risks.
Local MCP Server Risk ReviewAssesses endpoint, filesystem, command, and configuration risk.
Blast-Radius Reduction PlanPrioritizes least privilege, sandboxing, auth hardening, and logging.

Final Thought

MCP makes AI systems more useful because it makes tools easier to expose. That is exactly why MCP needs threat modeling.

Before deploying MCP into production, teams should be able to answer:

Which client can call which server, using which token, to invoke which tool, against which data, with which authorization, and with what audit trail?

If that answer is unclear, the system is not ready.

What TKOResearch Reviews

TKOResearch performs MCP & Tool-Use Blast-Radius Reviews for teams connecting LLMs and AI agents to production tools, SaaS systems, local resources, APIs, and sensitive workflows.

Request MCP Security Review

Sources