Is Filesystem MCP server safe?
What Filesystem MCP server does
The Filesystem MCP server is a Node.js server that lets an MCP client read, write, create, move, search and delete files and directories, and read file metadata. The npm author field names Model Context Protocol a Series of LF Projects, LLC. It works only inside allowed directories, passed as command-line arguments or supplied by the client through MCP Roots; when the client provides Roots, they replace the command-line list entirely. Before installing, list only the directories the agent actually needs, and check which roots your client sends, because they override your arguments.
- Dangerous MCP tool capability
- Node.js filesystem read
- Node.js filesystem write/delete
What to do: Nothing here argues against installing it. Grant the capabilities it lists only if you expect the tool to need them.
Filesystem MCP server is an MCP server analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators. It can: filesystem read, filesystem write, install time execution and mcp tools detected — capabilities are what the code can do, not a verdict on intent. Risk score 0/100 (low).
@modelcontextprotocol/ server-filesystem 2.3.0
Get notified when this component changes
Change alerts aren't live yet. Leave your email and we'll let you know when they launch. We use it only for this and delete it on request.
Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of Filesystem MCP server's authors. Report a false positive.
Behavioral traits
How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.
Findings (5)
An MCP tool exposes a powerful capability (files, shell, network, browser, or credentials).
server.registerTool("read_file", {server.registerTool("write_file", {server.registerTool("edit_file", {server.registerTool("list_directory", {server.registerTool("list_directory_with_sizes", {Why it matters: Wired into an agent, these grant it real access to your machine — confirm each is required.
Fix: Confirm each powerful tool is required and constrained; broad MCP tools (shell/filesystem/network) grant an agent significant host access.
The component reads files from disk.
return new Promise((resolve, reject) => fs.readFile(fd, (error, data) => (error ? reject(error) : resolve(data))));
Why it matters: Usually legitimate, but worth confirming it can't be steered into reading sensitive files.
Fix: Confirm which files are read and that paths cannot be influenced by untrusted input to reach sensitive locations.
The component writes or deletes files on disk.
return new Promise((resolve, reject) => fs.writeFile(fd, content, "utf-8", (error) => error ? reject(error) : resolve()));
fs.unlinkSync(staged);
return new Promise((resolve, reject) => fs.writeFile(fd, chunk, (error) => (error ? reject(error) : resolve())));
fs.unlinkSync(name);
Why it matters: Usually legitimate, but worth confirming the paths can't be controlled by untrusted input.
Fix: Confirm which files are written/deleted and that paths cannot be influenced by untrusted input.
package.json has a 'prepare' script (runs on git/local installs and before publishing).
"prepare": "npm run build",
Why it matters: Usually a build step, but confirm it doesn't fetch or run remote code.
Fix: Usually a legitimate build step; confirm it only builds and does not fetch or execute remote code.
An MCP tool surface (manifest or tool definitions) was found.
transport: new StdioServerTransport(stdin, stdout),
const server = new McpServer({server.registerTool("read_file", {server.registerTool("read_text_file", {server.registerTool("read_media_file", {server.registerTool("read_multiple_files", {server.registerTool("write_file", {server.registerTool("append_file", {server.registerTool("edit_file", {server.registerTool("create_directory", {server.registerTool("list_directory", {server.registerTool("list_directory_with_sizes", {server.registerTool("directory_tree", {server.registerTool("move_file", {server.registerTool("copy_file", {server.registerTool("search_files", {server.registerTool("get_file_info", {server.registerTool("list_allowed_directories", {Why it matters: Just context — review which tools it offers and their permissions.
Fix: Review the declared MCP tools and their permissions.
How attackers abuse these capabilities
Interactive labs on the attack class behind the rules above. They show the technique, not anything found in Filesystem MCP server.
Maintain Filesystem MCP server?
The free Claude Code plugin scans each npm, PyPI or MCP package with this report's open-source engine before the install command runs. It runs on your machine and needs no account.
Check your own component
Run the same evidence-backed scan on any MCP server, agent skill, or package.
Scan your own componentHow we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →