How to narrow MCP allowed paths

Filesystem servers take a directory allow list. The whole disk is a key handover.

Official filesystem-style servers take allowed directories as args. Use your repo path. Do not pass / or your home folder.

Keep secrets, ssh, and Downloads off the list. If generated output is read-only, do not grant writes.

After you save, try a read-only call: list a folder or read one known file. If an unexpected path appears, tighten it immediately.

See MCP security basics and the filesystem category here. Replace every sample path on the detail page.