Are you the author? Sign in to claim
local-filesystem
A comprehensive filesystem management MCP (Model Context Protocol) server that provides sandboxed access to local filesystem operations. Built with Smithery CLI.
list_directories - List subdirectories in a pathcreate_directory - Create new directories (with parent creation)delete_directory - Delete directories (recursive option)move_directory - Move or rename directoriesget_directory_metadata - Get directory statistics and infolist_files - List files in a directoryread_file - Read file content with chunking supportwrite_file - Write or overwrite files (text and binary)append_file - Append content to existing filesdelete_file - Delete filesmove_file - Move or rename filesget_file_metadata - Get file stats (size, mime type, timestamps)search_by_name - Exact filename matchsearch_by_glob - Glob pattern matching (.txt, **/.py)search_by_filename_regex - Regex pattern on filenamessearch_by_content_text - Plain text search in file contentsearch_by_content_regex - Regex search in file contentInstall dependencies:
uv sync
Run the development server:
uv run dev
Test interactively with the playground:
uv run playground
Each session requires a root_directory parameter and supports optional configuration:
root_directory: str # Required - sandbox root path
max_file_size_mb: int = 100 # Optional - max file size for operations
max_search_depth: int = 10 # Optional - max recursion depth for searches
http://localhost:8081/mcp?root_directory=/path/to/sandbox&max_file_size_mb=100
# Small file - read all at once
read_file(path="documents/readme.txt")
# Large file - read in chunks
read_file(path="large_file.bin", offset=0, limit=1048576) # First 1MB
# Find all Python files
search_by_glob(pattern="**/*.py", recursive=true)
# Find files containing "TODO"
search_by_content_text(query="TODO", path="src", recursive=true)
# Create nested directories
create_directory(path="projects/new_project", create_parents=true)
# List directory contents
list_files(path="projects")
Your server code is organized in src/local_filesystem/:
server.py - Main server setupcore/ - Core utilities and exceptions
safety.py - Path validation and sandboxingexceptions.py - Custom exception classesconstants.py - Configuration constantsapi/ - API route handlers
directory_routes.py - Directory operation endpointsfile_routes.py - File operation endpointssearch_routes.py - Search operation endpointsservices/ - Business logic services
directory_service.py - Directory managementfile_service.py - File managementsearch_service.py - Search capabilitiesschemas/ - Pydantic models and validationThe project uses pre-commit hooks to maintain code quality:
# Install dependencies (includes pre-commit tools)
uv sync
# Install pre-commit hooks
uv run pre-commit install
# Run manually on all files
uv run pre-commit run --all-files
The hooks will automatically run on git commit to ensure code quality.
Run the test suite:
# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=src/local_filesystem
# Run specific test file
uv run pytest tests/integration/test_file_routes.py
Ready to deploy? Push your code to GitHub and deploy to Smithery:
Create a new repository at github.com/new
Initialize git and push to GitHub:
git add .
git commit -m "LocalFS MCP server"
git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO.git
git push -u origin main
Deploy your server to Smithery at smithery.ai/new
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows