File System Server
БесплатноНе проверенA secure, sandboxed file system server that enables reading, writing, searching, and managing files through MCP-compatible AI clients with path traversal protec
Описание
A secure, sandboxed file system server that enables reading, writing, searching, and managing files through MCP-compatible AI clients with path traversal protection and size limits.
README
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
🚀 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 |
|---|---|
../../../etc/passwd |
❌ Path traversal prevented |
~/.ssh/id_rsa |
❌ Outside sandbox |
.env files |
❌ 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:
filesystem - Type:
command - Command:
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
Установка File System Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/moaaz01/mcp-file-system-serverFAQ
File System Server MCP бесплатный?
Да, File System Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для File System Server?
Нет, File System Server работает без API-ключей и переменных окружения.
File System Server — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить File System Server в Claude Desktop, Claude Code или Cursor?
Открой File System Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Opencode Omniroute Plugin
OpenCode plugin for the OmniRoute AI Gateway. Drives dynamic model discovery, /connect auth flow, and multi-instance OmniRoute providers via the official @openc
автор: GitHub ActionsRoblox Studio
Enables AI coding tools to control Roblox Studio for workspace exploration, instance manipulation, and script management. It provides tools for playtesting, sce
автор: paralovAntigravity Drawio
MCP server that enables AI assistants to create, parse, render, and validate Draw.io diagrams programmatically.
автор: S-SUJAN-SFetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzMCP-Agent
A simple, composable framework to build agents using Model Context Protocol by [LastMile AI](https://www.lastmileai.dev)
автор: lastmile-aiSpring AI MCP Client
Provides auto-configuration for MCP client functionality in Spring Boot applications.
mcp.natoma.ai
A Hosted MCP Platform to discover, install, manage and deploy MCP servers by [Natoma Labs](https://www.natoma.ai)
Compare File System Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
