Filesystem MCP Server
The official Filesystem MCP server provides secure file system operations for Claude.
Installation
npm install -g @modelcontextprotocol/server-filesystem
Configuration
Add to your Claude configuration:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/allowed/directory"
]
}
}
}
Available Tools
read_file
Read contents of a file.
{
"path": "/path/to/file.txt"
}
write_file
Write content to a file.
{
"path": "/path/to/file.txt",
"content": "Hello, World!"
}
list_directory
List contents of a directory.
{
"path": "/path/to/directory"
}
create_directory
Create a new directory.
{
"path": "/path/to/new/directory"
}
move_file
Move or rename a file.
{
"source": "/path/to/source",
"destination": "/path/to/destination"
}
Security
- Only directories explicitly allowed can be accessed
- Symlinks are followed only within allowed directories
- Parent directory traversal (
..) is blocked - File permissions are respected
Use Cases
- Code file management
- Configuration editing
- Log file analysis
- Project scaffolding
- Batch file operations