Back to Home
danny-avila icon

server-filesystem

Verified Safe

by 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

Run Command
npx -y @modelcontextprotocol/server-filesystem /path/to/dir1 /path/to/dir2

Security 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

Stats

Interest Score26
Security Score9
Cost ClassHigh
Avg Tokens7500
Stars1
Forks0
Last Update2025-11-18

Tags

filesystemMCPNode.jssecurityaccess control