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.

By Kevin O'Connor

Published Last reviewed 10 min read

An MCP connection joins at least two authority models: the client's decision to invoke a tool and the server's permission to reach a downstream system. The threat model needs to follow both. A narrowly worded tool description does not help if the implementation forwards requests with an unrestricted service credential.

This review is pinned to MCP 2026-07-28, the current revision listed by the official versioning page on September 9, 2026. Record the versions your deployment actually supports. Older handshake and session behavior remains relevant only where the implementation supports those earlier revisions.

Why MCP Needs Its Own Threat Model

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

MCP introduces a protocol client and server into the path:

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

For protected HTTP servers, distinguish the token issued for the MCP server from credentials the server uses with a downstream API. The 2026-07-28 authorization specification requires intended-audience validation and forbids accepting or forwarding unrelated tokens. OAuth scope still does not establish access to a particular tenant document.

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. Separate current request handling from legacy sessions

The 2026-07-28 transport overview defines a request-oriented protocol and describes backward compatibility with earlier connection-scoped sessions. Do not apply an old session diagram to a new deployment without checking its supported revisions.

The following checks apply to application session state and to legacy MCP session/event paths that the deployment still exposes. An application session or resumable event must never substitute for current authorization.

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 commandsReview executable, arguments and working directory; pin and verify package origin and version.
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.

Turn each trust boundary into a test

Choose one representative call and trace the authenticated user, MCP audience, downstream identity, resource policy and returned fields. Repeat it with the wrong tenant, insufficient scope and revoked authorization. For a local stdio server, inspect the launched process's filesystem, network and credential access instead of assuming the HTTP OAuth flow applies.

The MCP review checklist adds a credential-lifecycle walkthrough and a local revoked-token check. Keep the threat model beside that inventory and update both when a server, tool schema, credential or protocol revision changes.

Sources