MCP File System Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π MCP File System Server
A secure, sandboxed file system server for the Model Context Protocol. Read, write, search, and manage files through any MCP-compatible AI client β with path traversal protection, hidden file controls, and size limits.
β¨ Features
π§ 5 Tools:
read_file,write_file,list_directory,search_files,get_file_infoπ 1 Resource:
file://{path}β read files via MCP resource URIsπ‘οΈ Security-First Architecture: Sandbox isolation, path traversal prevention, max size limits
π₯ Hidden File Control: Block
.hiddenfiles by default, opt-in with--allow-hiddenπ Glob-Based Search: Search by pattern (
*.py,*.md,data_*.csv)π Rich Metadata: File size, timestamps, permissions, text/binary detection
π₯οΈ Dual Transport: stdio and Streamable HTTP
Related MCP server: Void MCP Filesystem Server
π Quick Start
# 1. Setup
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# 2. Create sandbox and run
mkdir -p /tmp/mcp-sandbox
python filesystem_server.py --sandbox /tmp/mcp-sandboxπ οΈ Tools Reference
read_file(path: str) -> str
Read a file and return its contents with metadata (size, modified time, SHA256).
write_file(path: str, content: str) -> str
Write content to a file. Creates parent directories automatically.
list_directory(path: str) -> str
List files and directories with sizes and type indicators.
search_files(pattern: str, base_path: str = "") -> str
Search by glob pattern across the entire sandbox.
get_file_info(path: str) -> str
Get detailed metadata: type, size, timestamps, permissions, text/binary detection.
π‘οΈ Security Controls
--sandbox PATH # Required: root directory (all operations restricted)
--allow-hidden # Allow access to .hidden files and directories
--max-size N # Max file size in MB (default: 10)Attack Vector | Protection |
| β Path traversal prevented |
| β Outside sandbox |
| β Blocked by default |
100GB file read | β Size limit (configurable) |
Hidden directory listing | β Filtered by default |
π Resources
file://{path}
Read a file's raw content via MCP resource protocol.
π Connecting to Clients
Claude Desktop
{
"mcpServers": {
"filesystem": {
"command": "python",
"args": ["/ABSOLUTE/PATH/mcp-file-system-server/filesystem_server.py", "--sandbox", "/tmp/mcp-sandbox"]
}
}
}Cursor
Settings β Features β MCP β Add Server:
Name:
filesystemType:
commandCommand:
python /ABSOLUTE/PATH/mcp-file-system-server/filesystem_server.py --sandbox /tmp/mcp-sandbox
π Project Structure
mcp-file-system-server/
βββ filesystem_server.py # Main server (FastMCP + security)
βββ requirements.txt
βββ setup.sh
βββ README.md
βββ .gitignoreπ§ͺ Example Usage
# Read a file
read_file("/tmp/mcp-sandbox/data.txt")
# β "π File: /tmp/mcp-sandbox/data.txt\nSize: 1,234 bytes\n..."
# Write a file
write_file("/tmp/mcp-sandbox/output/report.md", "# Report\n\nHello world!")
# β "β
Written 28 bytes to /tmp/mcp-sandbox/output/report.md"
# Search for Python files
search_files("**/*.py")
# β "π 5 file(s) matching **/*.py:\n π scripts/process.py (1,234 bytes)\n..."π License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
Related MCP Connectors
Browse and manage files in your Moxt AI workspace from any MCP client.
Persistent file storage for AI agents. Save files over MCP, get a link a human can open.
Persistent file storage for AI agents via MCP and curl. Upload, download, and version files.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) server that enables AI assistants to perform comprehensive file operations including finding, reading, writing, editing, searching, moving, and copying files with security validations.71MIT
- FlicenseNot gradedqualityDmaintenanceA secure, sandboxed MCP server that provides Void Editor with safe filesystem access, enabling AI to create, read, modify, and delete files with comprehensive security controls.1-
- AlicenseAqualityDmaintenanceA file system MCP server that confines AI assistant file tools to a single folder, with read-only by default and optional write access.7MIT
- AlicenseNot gradedqualityCmaintenanceA secure MCP server that exposes local filesystem operations to AI clients with sandboxed access and runtime directory changes.1MIT
Appeared in Searches
- A server for accessing or managing a filesystem
- What is a filesystem server and how to find one? A filesystem server implements a protocol like 9P, NFS, or SMB to serve files to clients. Search GitHub for 'filesystem server', look at projects such as pyd-fuse servers, Go-based go-fuse servers, Rust 'fuser' servers, or Python 'mux9p'. The query 'filesystem server' commonly refers to the Model Context Protocol (MCP) filesystem server, an open-source reference implementation (e.g., from the modelcontextprotocol/servers repository) that exposes local files to AI assistants.