file-system-mcp-server
by manju07
Overview
A minimal Model Context Protocol (MCP) server that provides secure file read and write operations within a sandbox directory for AI agents.
Installation
python server.pyEnvironment Variables
- GOOGLE_API_KEY
Security Notes
The `resolve_sandbox_path` function in `server.py` is vulnerable to directory traversal. While it correctly handles absolute paths by taking only the file name relative to the sandbox, it fails to sufficiently normalize or validate relative paths (e.g., `../../../filename`) against the sandbox boundary. This allows an attacker to read or write files outside the intended `sandbox/` directory by crafting malicious relative paths.
Similar Servers
mcp-filesystem-server
Provides secure and controlled access to the local filesystem via the Model Context Protocol (MCP) for AI agents and other applications.
filesystem-mcp
Provides secure, efficient, and token-optimized filesystem operations for AI agents via the Model Context Protocol.
dev-kit-mcp-server
A Model Context Protocol (MCP) server targeted for agent development tools, providing scoped authorized operations in the root project directory.
docker-mcp-server
A Model Context Protocol (MCP) server for containerized execution and file operations, enabling AI assistants to interact with a Docker environment via HTTP.