Skip to content
← Insights
Nov 15, 20264 min read

A read-only MCP setup still needs a boundary you can test

Start an MCP integration with verified process isolation, current filesystem controls and a deliberate data boundary.

A project folder inside a transparent enclosure with a shield, beside a small plug and an inspection card.

Giving an agent access to one project directory sounds like a modest first step. It can still expose every secret in that directory. If the server process runs with your normal account privileges, the operating system may let it reach much further.

I would begin with a disposable project containing no credentials. The first goal is to establish exactly what the tools can reach. A useful code explanation can wait until that test passes.

Inspect the process before trusting the tool list

A local MCP server is downloaded software running on your machine. The MCP project's local server security guide explains that the stdio transport creates no sandbox. The process can inherit environment variables and the access available to the account launching it.

That changes the installation review. Check the package source and the exact command the client will run. Pin a version that you have reviewed. A package manager fetching a moving release at every launch can change the code receiving that access.

Keep an inventory small enough to inspect. An unused server with a valid token remains another installed component to maintain. Remove it when the experiment ends. A clean client configuration is easier to investigate than a collection accumulated through months of one-click installations.

Passing a token through an environment variable keeps it out of a JSON file, but the receiving process can still read it. Only pass credentials the server actually needs. A filesystem reader should not inherit unrelated production credentials through a convenient launch script.

Read-only needs a specific implementation

The official filesystem server documentation currently describes read-only controls, including a whole-server mode and protected directories. Check those options against the version you install. Their existence today does not make an old configuration read-only.

Inspect the available tools after startup. Then attempt a harmless write inside the disposable project. The expected result is a refusal at the enforcement boundary. A tool description promising to avoid edits is weaker evidence than an attempted edit being denied.

A directory allowlist also depends on correct implementation. The project's November 2026 security advisory documents a symlink race that could let a read escape the allowed directories. It lists versions below 2.3.0 as affected.

That advisory is a reason to check patch status. It does not prove every other operation is safe after one upgrade. Application checks and operating-system restrictions address different failure paths.

For a sensitive workload, mount only the required directory into an isolated environment. Apply read-only access there when possible. Test the restrictions from inside the actual server process environment, including paths reached through links.

A successful read can still disclose data

A file reader can retrieve a confidential document exactly as designed. The agent can then include its contents in a model request or another tool call. Preventing writes does not prevent that disclosure.

Decide which files are acceptable inputs before choosing the directory. For an initial test, that might mean public source code with a small set of generated fixtures. Exclude local environment files and copied customer exports. A project folder often contains more than the repository's tracked files.

Network permissions deserve a separate decision. A local server may run without needing external access, while the host application still sends retrieved text to a model provider. Inspect both paths. Calling the server local does not establish that the complete workflow stays offline.

Untrusted text is another input boundary. A repository comment can contain instructions aimed at the assistant. Treat retrieved material as data, then test whether the host resists attempts to redirect work or request unrelated files.

Expand access around a task you can inspect

Once the read path is understood, give the agent a bounded task: explain a specific function using the permitted files. Review the tool calls and compare the answer with the code. That establishes usefulness without requiring a shell or a publishing credential.

If the next task needs edits, introduce that permission deliberately. A temporary working copy with reviewable diffs is easier to assess than unrestricted changes to a working project. Keep publication behind a separate decision.

Client approval settings vary. Verify the behavior of the client and version in front of you; do not assume every call will trigger a dialog. A confirmation click also cannot compensate for an unclear target or an overbroad token.

Finally, test removal. Disable the integration, stop its process and confirm it no longer accepts work. Revoke external credentials where relevant. Keep the reviewed configuration so you can explain which component had which access.

The first setup is ready when the allowed read works and the forbidden access fails under test. That result gives you a basis for deciding what permission the next task deserves.

MCPSecurityAI agents