Filesystem MCP Server (Basic Setup)
Grant Claude Desktop or Cursor read access to a local folder using @modelcontextprotocol/server-filesystem. The minimal config every MCP user starts with.
Detailed Explanation
Filesystem Server: The Default Starting Point
The filesystem server is the simplest official MCP server and the one most people configure first. It mounts one or more directories as roots and lets the model read files inside them — no write access by default, no shell execution.
Minimal config
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/your-name/Documents"
]
}
}
}
How the args work
-yauto-accepts the npm install prompt so the server can spawn non-interactively on the first run.@modelcontextprotocol/server-filesystemis the npm package name; npx fetches and executes it.- Every argument after the package name is a root path. The server treats each root as a separate, isolated mount; a single
..cannot escape into a sibling.
Multiple roots
Pass any number of paths to mount multiple roots:
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/me/projects/api",
"/Users/me/projects/web"
]
Save location
For Claude Desktop on macOS, save the file at ~/Library/Application Support/Claude/claude_desktop_config.json and restart the app. On Cursor, save at .cursor/mcp.json in the project root or ~/.cursor/mcp.json for global access.
Safety notes
The server is read-only, but it sees everything inside the roots you mount — including .env files, SSH keys, and command history if those happen to live there. Mount narrow, project-scoped folders rather than your entire home directory.
Use Case
Letting Claude or Cursor index a project folder so it can answer 'where is the function that handles X?' or 'summarize the README files in /apps' without you copy-pasting source into the chat each time.