Operation class gate
Separate read, list, search, summarize, diff, patch, write, delete, execute, and upload. A route approved for read does not inherit write, patch, or command authority.
Filesystem path-boundary checklist
A model-supplied path is an authorization input. If an MCP server can read, list, summarize, patch, or write files, the production question is not whether the schema accepts a string. It is whether the runtime can prove the final path stayed inside the intended workspace before host state reaches the agent.
Fast answer
The production checklist
Separate read, list, search, summarize, diff, patch, write, delete, execute, and upload. A route approved for read does not inherit write, patch, or command authority.
Record the runtime cwd, workspace id, repo id, branch/ref if applicable, and the intended allowed root before interpreting any model-supplied path.
Normalize the requested path, resolve relative segments, follow or reject symlinks according to policy, and compare the final canonical path to the allowed prefix.
Test parent traversal, sibling workspaces, hidden config, lockfiles, credentials, host mounts, generated artifacts, and write targets outside policy under the same caller and endpoint.
Bound file size, match allowlisted extensions or globs, redact secrets/topology/customer data, and return typed artifacts or summaries instead of dumping unbounded content into context.
Return a policy denial that includes requested path, canonical path or resolution failure, operation class, rule id, caller/workspace, and recovery hint.
Denied neighbors
Examples: ../, ..%2f, nested symlink to parent, absolute path fallback
Expected: Deny before read/write; receipt names normalized path, canonical path decision, and allowed-root rule.
Examples: ../other-customer, ../repo-b, /Volumes/shared/adjacent-project
Expected: Deny unless a separate route card explicitly names that workspace and caller. Same agent identity is not enough.
Examples: .env, .npmrc, .aws/credentials, SSH keys, token caches, local browser/session files
Expected: Deny or redact by default; receipt shows the secret-bearing class protected and the allowed recovery path.
Examples: /etc, /proc, /var/run/docker.sock, host-mounted volumes, CI workspace parents
Expected: Deny as host-state authority unless a reviewed admin route exists with expiration, receipt, and blast-radius owner.
Trace evidence
Filesystem containment is only operator-grade if the decision is reconstructable. Store enough evidence to show the path was normalized, resolved, classified, and blocked or allowed before content, secrets, or write authority reached the agent.
Route card
Some agents legitimately need broader repository context. That does not make every path in the workspace fair game. Give each filesystem lane its own caller, operation class, allowed root, redaction rule, denied neighbors, and expiration.
Filesystem route:
Caller / workspace allowed:
Allowed root / repo / branch:
Allowed operation class:
Allowed glob / extension / size:
Symlink and mount policy:
Redaction rule:
Forbidden neighboring paths:
Credential / host resource protected:
Receipt fields:
Expiration / re-review date: Common misreads
Related operator guides
Filesystem/resource boundary is one of the production quality checks before an MCP server is promoted.
Use allowed and denied fixtures to separate useful local context tools from broad host-state authority.
Bind caller, authority surface, credential lane, denied neighbor, receipt, and recovery before filesystem routes repeat.