MCP Security

Model Context Protocol Roots: Security and Scoping

MCP Roots are a client-declared list of URI-based boundaries that tell a server which resources are relevant to a session. The specification treats Roots as guidance, not an enforced access-control mechanism, so a server can technically ignore or improperly validate them. Enterprises should treat Roots as a scoping signal that requires independent verification, combined with host-level permissions, sandboxing, and monitoring, rather than assuming a declared root guarantees restricted access.

What Roots Do and Do Not Guarantee

Declared, Not Enforced

Roots communicate intended scope, but the spec does not require servers to technically restrict operations to them.

Session-Level Scope

Roots are set at session start and can change via a list_changed notification during an active session.

Distributed Responsibility

Host, client, and server each hold partial responsibility for honoring declared boundaries.

Verification Required

Compliance with declared Roots must be tested, not assumed, on a per-server basis.

Technical Guide

What MCP Roots Are

Model Context Protocol Roots are defined in the MCP specification as a mechanism for clients to inform servers about relevant resources and their locations, typically expressed as URIs such as file:// paths. A client can expose a roots/list capability that a server queries to retrieve the current set of boundaries for a session. Roots sit alongside other MCP primitives, including Resources, Tools, Prompts, and Sampling, as part of the broader context-exchange model between clients and servers. Because MCP's architecture separates host, client, and server roles, the client acts as the mediator that communicates Roots from the host application to one or more connected servers. This makes Roots a coordination primitive: a way for the client to tell a server what it should be looking at, rather than a technical wall that prevents the server from looking elsewhere.

Why Roots Are Guidance, Not Enforcement

The specification explicitly frames Roots as guidance about which resources are relevant, not as a strictly enforced access-control mechanism. It states that servers are expected to respect root boundaries, but it does not describe a required technical enforcement mechanism within the protocol itself. This distinction matters for security engineers evaluating MCP deployments. A compliant client can declare a narrow root, for example a single project directory, while a non-compliant or poorly implemented server still accesses files or resources outside that boundary if its own code never checks incoming tool call parameters against the declared roots. The protocol's trust model assumes a cooperating server. Adversarial or poorly implemented servers are treated as a risk that falls outside the base specification and must be addressed through deployment-level controls instead.

Where Enforcement Gaps Occur

Because root-boundary logic is not centralized or standardized beyond the specification's descriptive guidance, enforcement varies across server implementations written in different languages and runtimes. Independent security research on MCP server implementations has identified cases where servers do not consistently validate or enforce declared scope boundaries, resulting in broader file or resource access than the declared root implied.

Undefined behavior is a second gap: the specification does not clearly mandate what a server should do when no roots are declared or when root negotiation fails, and in some implementations this can default to unrestricted access rather than a safe failure. A third gap involves session dynamics. Roots can change mid-session through a notifications/roots/list_changed message, and audit tooling that does not account for this can retain stale assumptions about what scope was actually active at the time of a given resource access.

Governance Considerations for Enterprise Deployments

Enterprises adopting MCP should document which party, host, client, or server vendor, is accountable for enforcing declared root boundaries in architecture standards or vendor contracts. Evidence of root-boundary testing should be a condition of approval before a server is granted production access to sensitive systems, particularly for third-party or community-maintained servers where enforcement behavior is not independently verified. Maintaining an inventory of MCP servers in use, along with their declared root scopes and known enforcement behavior, allows security teams to track risk as part of periodic access reviews rather than treating each server as a one-time approval. MCP root scope review fits naturally into existing AI system access-control and data governance processes rather than requiring a separate standalone control.

Runtime Governance as a Complement to Roots

Because Roots are advisory at the protocol level, the practical security boundary for an MCP deployment is set by what happens at runtime, not by what a client declares at session start. This is the layer where Trussed AI's runtime governance capabilities apply: enforcing agent permissions and least-privilege access independent of whether a given MCP server correctly validates declared roots, running tool approval workflows before sensitive operations execute, and maintaining audit logs of tool calls and resource access that can be checked against the root scope that was active at the time. Runtime monitoring and policy enforcement provide the independent verification that the MCP specification itself does not guarantee, so that a gap in server-side root validation does not translate into unmonitored or unrestricted agent access to enterprise systems.

How to Validate Root Enforcement Before Granting Access

Because enforcement behavior varies by implementation, security teams should verify it directly rather than assume compliance.

  • Run independent tests that attempt tool calls outside the declared root boundary to confirm the server rejects or blocks them.
  • Confirm what the server does when no roots are declared or root negotiation fails, and whether that default is restrictive or permissive.
  • Log resource access requests alongside the active root set at the time of the request to support post-hoc audits.
  • Apply OS-level permissions, containerization, and network egress restrictions so a server's failure to enforce roots does not translate into system-wide access.
  • Re-test root enforcement behavior after any server update, since code changes can silently alter or remove boundary-checking logic.

Why this matters

Root enforcement is implementation-specific and can regress silently after updates. Treat verification as an ongoing part of the server lifecycle, not a one-time approval gate.

Verify MCP Root Enforcement Before You Trust It

Roots describe intended scope. Runtime governance confirms it. Talk to Trussed AI about enforcing least-privilege access and auditing MCP server behavior in your environment.

Explore Runtime Governance