server-filesystem
Verified Safeby danny-avila
Overview
Provides a secure Node.js server implementing Model Context Protocol (MCP) for AI clients to perform a wide range of filesystem operations with strict access control.
Installation
npx -y @modelcontextprotocol/server-filesystem /path/to/dir1 /path/to/dir2Security Notes
The server demonstrates strong security practices with explicit path normalization, comprehensive symlink resolution (via `fs.realpath` and `isPathWithinAllowedDirectories`) to prevent traversal attacks, and strict enforcement of allowed directories. File write operations use atomic renames and the 'wx' flag to prevent race conditions and overwrites through existing symlinks. Dynamic allowed directories via MCP Roots are also validated. No hardcoded secrets or 'eval' usage observed. The primary risk lies in misconfiguring the allowed directories or if an attacker could bypass the `validatePath` function before any file operation.
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.
tinystruct-mcp
This server provides a JSON-RPC interface for Git, GitHub API, and file system operations, intended for integration into DevOps, automation, and AI-driven workflows.
dev-kit-mcp-server
A Model Context Protocol (MCP) server for agent development tools, enabling secure, scoped operations within a root project directory.