Filesystem MCP Server (v0.1)
A simple MCP server for filesystem operations with directory sandboxing and read-only mode support.
Early version (0.1) - not thoroughly tested/reviewed, use with caution
Quick Start
Install dependencies:
Run the server:
Related MCP server: MCP File System Server
Features
Directory sandboxing (operations restricted to allowed paths)
--read-onlyflag disables write operationsGitignore support for searches
Human-readable error messages
Usage Examples
Normal Mode
Read-Only Mode
Multiple Directories
Available Tools
Read Operations (always available):
read_text_file- Read file contentslist_directory- List directory contentsdirectory_tree- JSON directory structuresearch_files- Find files by patterngrep- Search text in filesread_multiple_files- Bulk file reading
Write Operations (disabled in
create_file- Create new filesdelete_file- Delete filesmove_file- Move/rename filesedit_file- Edit file contentscreate_directory- Create directories
Dependencies
From pyproject.toml:
fastmcp>=2.11.2- MCP frameworkpathspec>=0.12.1- Gitignore patterns
Security Notes
All paths resolved with
Path.resolve()to prevent traversalOperations restricted to allowed directories only
Binary files rejected for text operations