New Tool Radar

AI Concepts

How to Expose One Local Folder to Claude With the MCP Filesystem Server

Point the MCP filesystem server at one folder, restart Claude Desktop, and check it cannot see outside that folder.

Schematic with three steps: Add the filesystem server for that folder; Restart and ask for a file inside; Check the boundary holds.

The official MCP filesystem reference server exposes a local folder to Claude Desktop so the model can read and work with the files inside it. The folder you name in the config is the whole boundary: the server only exposes that folder, so the check that matters is confirming the boundary holds before you ask Claude to do anything with the files.

What you need

  • Claude Desktop installed
  • One folder you are willing to expose, with its absolute path
  • A file inside that folder and one file outside it, for the boundary check

Step 1: Add the filesystem server for that folder only

In claude_desktop_config.json, add a filesystem entry under mcpServers with command npx, args -y and @modelcontextprotocol/server-filesystem, followed by the absolute path of the one folder. Do not add a second folder you did not mean to share.

Step 2: Restart and ask for a file inside the folder

Quit Claude Desktop completely and start it again, then ask Claude to list or read a file inside the folder and check the answer matches the file.

Step 3: Check the boundary holds

Ask Claude about the file outside the folder and confirm it cannot read it. If it can, the config names a wider folder than you intended.

Worked example: synthetic folder boundary check

The table below is a synthetic example. It shows the expected result of the boundary check; no server was connected.

Check File Result
Inside the folder notes.txt in the shared folder Read correctly
Outside the folder secrets.txt in another folder Not readable
Boundary Server sees one folder only Pass

Expected result (UNTESTED). the file inside the folder reads correctly and the file outside it is not readable, so the boundary holds. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • Set access control first: name only the folder you mean to share, and check the path before saving.
  • The filesystem server reads files; it does not judge them, so the model still needs a clear question.
  • A wider folder in the config silently widens what the model can read.
  • Local servers run only on the machine where they are configured.

Sources

See all