Filesystem MCP Server
Filesystem MCP Server
Give Claude access to your local filesystem through the Model Context Protocol.
The Filesystem MCP Server enables Claude to read, write, search, and manage files and directories on your local machine using natural language commands. Access is restricted to directories you explicitly allow.
What Can Claude Do with the Filesystem MCP Server?
The Filesystem MCP Server exposes local file operations to Claude through the Model Context Protocol.
Core capabilities:
- Read Files — View file contents from allowed directories
- Write Files — Create new files or modify existing ones within allowed paths
- Search Files — Find files by name, content, or pattern in specified directories
- Directory Operations — List directory contents, create folders, and navigate file structures
- File Metadata — Access file size, modification dates, and permissions
Security scope: Claude can only access directories you explicitly configure as allowed paths. All operations are restricted to these configured locations.
How to Install the Filesystem MCP Server
Installation requires specifying which directories Claude can access.
For Claude Code
Install using Claude Code's MCP management with allowed directory paths:
claude mcp add filesystem npx @modelcontextprotocol/server-filesystem
/path/to/allowed/directory
Replace /path/to/allowed/directory with the actual directory path you want to grant access to.
You can add multiple allowed directories by repeating the command with different paths.
For Claude Desktop
Add the server to your claude_desktop_config.json file with allowed directory paths:
Configuration file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Configuration structure:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/Documents/projects",
"/Users/username/workspace"
]
}
}
}
Configuration notes:
- Each argument after the package name is an allowed directory path
- Use absolute paths (not relative paths like
./or~/) - On Windows, use forward slashes or escaped backslashes:
C:/Users/username/Documents - Multiple directories can be specified as separate arguments
Restart Claude Desktop after saving the configuration file.
Filesystem MCP Security & Permission Scoping
The Filesystem MCP Server requires explicit directory configuration for security.
Security model:
- Allowed paths only — Claude can only access directories you specify in the configuration
- No default access — Without configured paths, the server has no filesystem access
- Subdirectory inheritance — Subdirectories within allowed paths are automatically accessible
- Path validation — The server validates all operations against the allowed path list
Best practices:
- Grant minimum necessary access — Only allow directories Claude needs for specific tasks
- Avoid system directories — Do not allow access to system folders like
/System,C:\Windows, or user home directories unless absolutely necessary - Use project-specific paths — Grant access to specific project folders rather than entire drives
- Review regularly — Periodically review and update allowed paths in your configuration
Example secure configuration:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/projects/current-project",
"/Users/username/documents/work-docs"
]
}
}
}
This grants access only to two specific directories, not the entire filesystem.
Filesystem MCP Use Cases & Examples
Example workflows that become possible with the Filesystem MCP Server.
Read Project Files
Example prompt:
> "Show me the contents of the config.json file in my project directory."
Claude can read file contents from allowed directories.
Create New Files
Example prompt:
> "Create a new file called README.md in the docs folder with a basic project description."
Claude can create files within allowed paths.
Search Across Files
Example prompt:
> "Find all Python files in my project that contain the word 'database'."
Claude can search file contents and names within allowed directories.
List Directory Contents
Example prompt:
> "List all files in the src directory and show their sizes."
Claude can browse directory structures and retrieve file metadata.
Organize Files
Example prompt:
> "Create a new folder called 'archived' and list all .log files that could be moved there."
Claude can create directories and help organize file structures.
Batch File Operations
Example prompt:
> "Find all .txt files in the documents folder that were modified in the last 7 days."
Claude can filter and search files based on metadata criteria.
Note: All operations are restricted to directories configured in your allowed paths. Claude cannot access files outside these directories.
Filesystem MCP Inside a Working Project Tree
Filesystem MCP is commonly used when an agent needs controlled access to project folders, docs, configs, and generated assets.
What this shows: This screenshot shows the official filesystem server source, which reflects real use cases like file inspection, edits, and automation across working directories.
Why this scenario matters: It makes the filesystem story concrete: the value comes from giving an agent structured access to real project folders, configs, and generated assets.
Typical assistant task: Read project files, inspect generated assets, and update working-directory content without leaving the agent loop.
Source: Filesystem Server Source
When to Pick Filesystem MCP Server vs OpenSSH / SFTP
This comparison is most useful when both options look plausible on paper but differ in operating model, team fit, and day-to-day workflow cost.
| Decision Lens | This Page's MCP Path | Competitor |
|---|---|---|
| Best For | Agent workflows that need structured file access inside a local or controlled project environment. | Standard remote-admin or transfer workflows where transport, shell access, and interoperability matter most. |
| Where MCP Wins | Filesystem MCP wins when the assistant must reason over folders and files as first-class tools inside the task. | |
| Tradeoff to Watch | It is narrower than OpenSSH or SFTP for traditional remote operations and general infrastructure administration. | |
| Choose This Path When | Choose Filesystem MCP for AI-native file work; choose OpenSSH or SFTP when standard remote access semantics are the priority. | |
| Sources | ||
Frequently Asked Questions
Is the Filesystem MCP Server safe to use?
Can Claude access my entire computer?
What happens if I don't specify any allowed paths?
Can I use relative paths like ~/Documents?
/Users/username/Documents.
On Windows: C:/Users/username/Documents.Does it work on Windows?
C:/Users/username/projects or escaped
backslashes: C:\\Users\\username\\projects.Can I add more allowed directories later?
What if Claude tries to access a file outside allowed directories?
Use Filesystem MCP in Verdent
Verdent provides managed filesystem access with streamlined permission configuration. This is Verdent's platform-level integration flow, not the default setup path from the official Filesystem MCP documentation.
Filesystem operations work within Verdent's secure sandbox environment with simplified path management.