What stops an AI assistant from quietly reading the wrong file? That question is central to MCP resource access controls, and most teams answer it too late. The Model Context Protocol (MCP) gives assistants a standard way to pull in files, records, and other context from outside systems. That convenience cuts both ways. Every resource you expose is context an agent might read, quote, log, or pass along to a model provider.
This article walks through how MCP treats resources, where the protocol stops and your own controls have to begin, and the practical patterns that hold up in production. It stays honest about what the spec does and does not guarantee, because the gap between the two is where most incidents live.
What MCP resources actually are
MCP is an open protocol that connects AI assistants to external data and tools. It was announced by Anthropic in November 2024, and it defines a small set of server primitives. The three most relevant are:
| Primitive | What it does | Who triggers it |
|---|---|---|
| Resources | Exposes read-only context such as files, records, or documents | Usually the host or application |
| Tools | Performs actions or computations | Usually the model |
| Prompts | Provides reusable prompt templates | The user or host |
The distinction matters. Resources are meant to be application-driven and read-only. In practice, that means the host decides which resources to attach to a conversation, rather than the model rummaging freely through everything a server can see. Tools are where the model gets to ask for things directly.
Underneath, the base protocol is JSON-RPC 2.0, carried over stdio or HTTP-based transports. That is plumbing, not protection. JSON-RPC gives you structured messages, not a security model. Anyone who assumes the protocol enforces who can read what will eventually be surprised.
Where the protocol ends and your controls begin
Here is the uncomfortable truth about MCP: access control is largely delegated to the server and the host application. The specification historically did not mandate a permission model for resources. Later revisions added authorization guidance, including OAuth-based flows for remote servers, but the exact normative text has shifted between revisions. Teams that pinned their assumptions to a blog post rather than the changelog have been burned by this.
So the practical framing is this. The protocol gives you a vocabulary for exposing and referencing resources. It does not give you an enforcement layer. That layer is yours to build, and it sits in three places:
- The server, which decides what it will list and what it will return.
- The host application, which decides what to attach to a session and what to show the user.
- The identity layer, which decides which credentials a session carries and which resources those credentials grant access to.
Miss any one of the three and the others get weaker. A perfectly scoped token is useless if the server lists every file in the directory anyway.
The threat model nobody writes down

Before choosing controls, it helps to name what you are defending against. Most real-world failures fall into a handful of buckets.
Over-broad resource listing. A server exposes a directory root instead of a curated set. The agent only reads what it needs, but the listing alone leaks structure, filenames, and sometimes metadata.
Confused deputy problems. The agent acts with the user’s authority but on instructions from somewhere else. A document that contains injected instructions can turn a read-only resource into a steering wheel.
Context leakage through logs. Resource contents get logged by the host, the server, or an observability tool. Now sensitive context lives somewhere nobody classified.
Scope creep across sessions. A token minted for one task gets reused for the next. The blast radius grows quietly.
Silent drift. Someone widens an allowlist during an incident and never narrows it again. Six months later the “temporary” exception is the default.
Naming these is not paranoia. It is the difference between a control that addresses a real risk and a checkbox that addresses a feeling.
Practical controls that hold up
The patterns below are implementation approaches, not spec requirements. Treat them as a menu, not a mandate, and pick the ones that match your risk.
Curate the resource list, do not expose roots
The single highest-leverage control is the least glamorous: list only what the task needs. A server that exposes a project folder should expose the specific documents in it, not the parent directory. If your server supports resource templates, constrain the parameters so a template cannot be walked into adjacent paths.
A common mistake is exposing a root “for convenience during development” and shipping it. Development convenience has a way of becoming production architecture.
Scope credentials to the session, not the user
Where authorization is in play, prefer short-lived, narrowly scoped tokens over long-lived user credentials. Remote MCP servers increasingly lean on OAuth-based flows, and the useful discipline is to treat every token as belonging to one session and one purpose. When the session ends, the token should be worthless.
This is also where testing pays off. Before you hand an agent write access to anything, it is worth walking through a structured exercise on testing AI agents before granting write access. The same discipline applies to read scopes, just with a lower ceiling on damage. (Access control (Wikipedia))
Put a human in the loop for sensitive reads
Not every read needs a prompt. But some do: personal records, financial data, anything under a regulatory regime. A consent prompt that names the resource and the reason is cheap to build and surprisingly effective. It also creates a natural audit trail, because the user’s approval is itself an event.
The trap is prompt fatigue. If every trivial read triggers a dialog, users click through without reading. Tier your resources so the prompts land where they matter.
Sandbox both the server and the agent
Servers are code. They read files, call APIs, and hold credentials. Run them with the least privilege the operating system allows: a dedicated user, a read-only mount where possible, no ambient cloud credentials. This is unglamorous infrastructure work, and it catches the failures that application-layer controls miss.
Review access on a schedule, not on instinct
Access reviews fail when they are ad hoc. A recurring review that asks “who can reach this resource, and does the answer still make sense?” catches drift before it becomes exposure. A structured approach to how to review access to a retrieval index translates well to MCP resource inventories, because the underlying question is identical: what is reachable, by whom, and why.
Common mistakes in practice
A few patterns show up again and again, and they are worth calling out plainly.
Treating the protocol as the policy. Teams read that resources are “read-only” and conclude they are safe. Read-only describes the operation, not the sensitivity of the data. A read-only view of a payroll table is still a payroll table.
Confusing authentication with authorization. A server that knows who is calling has not decided what that caller may see. Those are separate decisions and separate code paths.
Ignoring the transport. Stdio servers run with the privileges of whatever launched them. HTTP servers face a different threat surface entirely. The controls are not interchangeable.
Skipping the inventory. You cannot review what you have not listed. A maintained inventory of servers, resources, and the identities that reach them is the foundation everything else sits on.
Assuming the model will behave. It might. It also might be steered by content it reads. Design for the second case.
How to sequence the work
If you are starting from nothing, order matters more than completeness. A workable sequence looks like this:
- Inventory. List every MCP server in use, what resources each exposes, and which identities reach them.
- Classify. Tag resources by sensitivity. Public, internal, confidential, regulated. Be honest.
- Constrain. Narrow resource listings to task-relevant sets. Remove root exposures.
- Authenticate and authorize. Scope tokens per session. Separate the two decisions in code.
- Instrument. Log resource reads with enough context to reconstruct who read what and why.
- Review. Put a recurring access review on the calendar and actually run it.
- Test. Exercise the controls with adversarial scenarios before trusting them.
Steps one and two are where most teams stall, because they require knowing your own systems. That knowledge is the actual deliverable. The controls are downstream of it.
What to watch as the spec evolves
MCP is young and moving. Authorization guidance has been added and revised, transport options have changed, and the changelog is the only reliable record of what is normative at any given moment. Two habits protect you:
Pin and track. Pin your implementation to a spec revision and track changes deliberately. Do not absorb revisions by accident through a dependency update.
Read the changelog, not the blog posts. Announcement posts explain intent. The changelog explains what is actually required. When the two disagree, the changelog wins.
For teams building on the protocol, following the ongoing coverage on news and protocol updates is a reasonable way to keep the changelog on your radar without monitoring it daily.
Conclusion
MCP resource access controls are not a feature you switch on. They are a stack of decisions that starts with knowing what you expose and ends with a review that actually happens. The protocol gives you a clean vocabulary for resources, tools, and prompts, and it deliberately leaves enforcement to the server and the host. That is a reasonable design, and it is also a responsibility.
The teams that get this right tend to share three habits. They curate resource lists instead of exposing roots. They scope credentials to sessions instead of users. And they review access on a schedule instead of waiting for an incident to prompt one. None of that is exotic. All of it requires someone to own the inventory.
Start with the list. Everything else follows from it.
FAQ
What are MCP resources?
Resources are a server primitive in the Model Context Protocol that expose read-only context, such as files, records, or documents, to an AI host application. They sit alongside tools, which perform actions, and prompts, which provide reusable templates. Resources are typically attached by the host rather than requested directly by the model.
Does MCP enforce access control on resources?
Not in the way most people mean. The protocol historically did not mandate a permission model for resources, leaving enforcement to the server and the host application. Later revisions added authorization guidance, including OAuth-based flows for remote servers, but teams still need to build the actual enforcement layer themselves.
What is the biggest risk with MCP resource access?
Over-broad exposure is the most common failure. A server that lists a directory root instead of a curated set leaks structure and metadata even if the agent never reads the contents. The second biggest risk is context leakage through logs, where resource contents end up stored somewhere nobody classified.
Should every resource read require user approval?
No. Prompt fatigue is real, and users click through dialogs they have stopped reading. Tier your resources by sensitivity and reserve consent prompts for the ones that matter, such as personal, financial, or regulated data. Name the resource and the reason in the prompt so approval is meaningful.
How often should MCP access be reviewed?
A recurring schedule beats ad hoc review every time. Quarterly works for many teams, monthly for regulated data. The point is to ask, on a fixed cadence, what is reachable, by whom, and whether that still makes sense. Drift accumulates quietly between reviews.
How do I test MCP resource controls before production?
Exercise them with adversarial scenarios: try to read resources outside the intended set, reuse an expired token, and inject instructions through a document the agent can read. Run the same tests against write access before granting it. Controls that have never been tested are assumptions, not controls.







