MCP File System Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP File System Serverlist files in my sandbox directory"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
📁 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
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityDmaintenanceA 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.Last updated71
- Flicense-qualityDmaintenanceA 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.Last updated1
- AlicenseAqualityCmaintenanceA file system MCP server that confines AI assistant file tools to a single folder, with read-only by default and optional write access.Last updated7MIT
- Alicense-qualityCmaintenanceA drop-in replacement for the blocked Filesystem MCP server that provides standard file operations with symlink hardening, enabling tools like read, write, and directory listing.Last updatedMIT
Related MCP Connectors
Person-owned, portable AI memory as a remote MCP server, readable and writable by any MCP client.
Cloud-hosted MCP server for durable AI memory
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/moaaz01/mcp-file-system-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server