Plugins and integrationsReviewed · Model Context Protocol project

Filesystem MCP Server

A Node.js server that lets an AI app read, write, edit, move and search files in folders you choose. It is meant for people who connect it to a client such as Claude Desktop or VS Code. The main catch is that it changes real files, so the folders you allow matter a great deal. It runs over stdio on Node.js 24 or later and offers 16 tools and one file resource template. At the captured commit, its package.json declares @modelcontextprotocol/server-filesystem version 2.3.0. Whether that version is published or current on npm is unknown.

Researched 12 Nov 2026

In short.

This is the filesystem server from the Model Context Protocol project. An AI app starts it and then uses its tools to read, write, edit, move and search files in folders you name. The main catch is that writes change real files, overwrites happen without warning, and the folders you allow decide how much damage a mistake can do. Technically, it is a TypeScript program. At the captured commit, its package.json declares @modelcontextprotocol/server-filesystem version 2.3.0; whether that version is published on npm is unknown. It runs over stdio on Node.js 24 or later, registers 16 tools and one file:// resource template, checks every path against an allow-list with symlink, Unicode and Windows-name rules, and has a Docker build. The evidence is a source snapshot at one commit with extensive written tests. Nothing was run and no execution results are available, so the behaviour described comes from code and tests, not from observed results.

Researched and written by an AI model and checked by a second AI model. How it works

Exact scope: the complete src/filesystem folder at the stated address and commit. That is README.md, CHANGELOG.md, package.json, tsconfig.json, tsconfig.test.json, vitest.config.ts, Dockerfile, Dockerfile.dockerignore, the eleven TypeScript modules directly under src/filesystem, and the 38 files under src/filesystem/__tests__ (one of them a shared helper). Related notice: the repository-root LICENSE. It sits outside the folder and is included because the folder's licence statements refer to it. Excluded: - the root package.json, package-lock.json and tsconfig.json that the Dockerfile and build depend on; - the MCP SDK packages; - dependency packages (diff, minimatch, zod); - other folders, such as src/everything; - linked pages, such as the MCP specification, client documentation and the VS Code install links. Untested behaviour: nothing was executed or built. The Docker image, the npm package, Windows and macOS behaviour, network and cloud-folder timing, and any test results were not observed. The evidence does not show whether version 2.3.0 is published on npm or whether any published package matches this source.

The overview

Identity

The resource is the filesystem server in the Model Context Protocol servers repository, in the folder src/filesystem. The copy examined is commit e1dc4b18dbb948921da37f3d4224a628730b43b0. At that commit, package.json names the package @modelcontextprotocol/server-filesystem, declares version 2.3.0 and defines a command named mcp-server-filesystem. Version 2.3.0 is also the highest version in the captured changelog. The README says the package is published on npm under that name, but the evidence does not show whether version 2.3.0 has been published there or is the latest version. The package describes itself as an MCP server for filesystem access, and its README describes a Node.js server implementing the Model Context Protocol (MCP) for filesystem operations.

In plain terms, MCP is a standard that lets an AI app such as Claude Desktop or VS Code call functions offered by a separate program. This program offers functions for working with files and contains no AI model of its own. It talks to its client over standard input and output (stdio). Its tools are annotated as reaching no open or external world, because they act only inside the folders it was given.

The server introduces itself to clients as secure-filesystem-server, which differs from the package name. A written test asserts that the reported version matches package.json. Unknown from the evidence: whether and when 2.3.0 was released, who maintains the project day to day, and whether any published npm package is identical to the source at this commit.

Assessment

On the evidence, this is a carefully specified, complete implementation with extensive written tests; execution results are unavailable. The written tests assert each tool's title and annotations, the exact input schemas of several tools, and that every tool input property has a description. Many tests name the issue they address. A comment in one test calls the server the reference implementation that other server authors copy for tool descriptions. That is the authors' own description and was not verified independently.

The security design is the main thing an assessor would examine. Path checks resolve symlinks, refuse paths that leave the allowed directories, and anchor writes to a directory so that a swapped directory cannot redirect them. The code and tests present these measures as closing time-of-check races on supported platforms, with one stated caveat: on Windows the anchoring narrows the race without closing it. Read-only modes, refusals of Windows device names and alternate data streams, and bounded directory walks add further guards. None of this was run or audited here.

The assessment is limited by what the evidence contains. It shows the authors' intent and their written tests, not outcomes. The evidence contains no independent security review, issue history, usage figures or performance measurements.

Users

The main users are people who want an AI app to work on local files. Examples are a developer pointing VS Code at a project folder (the README's VS Code configuration uses the workspace folder variable) and a user giving Claude Desktop access to a few folders (the README's example uses a Desktop folder). The configuration is copy-and-paste JSON that a beginner can follow, but the install assumes Node.js 24 or a working Docker setup. The evidence does not show how hard that is for people who are not developers.

Experienced developers and operators get more detail: two protocol eras (2025-era and 2026-07-28), the --confine-roots and --read-only-dir options, a non-root Docker image written with Kubernetes admission policies in mind, and an SDK-based structure that other server authors may read as an example. The Dockerfile comments describe the Kubernetes behaviour as intent; the evidence contains no cluster test.

Unknown: how many people use it, and which AI clients work with it beyond the examples in the README.

Capabilities

The server registers 16 tools. Reading tools: - read_text_file returns a whole file, or its first or last N lines with head or tail. read_file is a deprecated alias. - read_media_file returns images and audio as image or audio content, and other files as embedded base64 resources. - read_multiple_files reads several files and reports a failed read inline without stopping the others. Writing tools: - write_file creates a file or overwrites an existing one in place. - append_file adds text exactly as given. - edit_file applies ordered replacements, with a dryRun preview and a diff. - create_directory creates a directory and any missing parents. - move_file fails if the destination exists. - copy_file never overwrites. Finding and describing tools: - list_directory lists the entries directly inside a folder. - list_directory_with_sizes adds sizes, can sort by size, and marks sizes it cannot read as unknown. - directory_tree returns a JSON tree with an optional depth limit. - search_files matches names with globs, never contents. - get_file_info reports metadata, including a hard-link count. - list_allowed_directories shows the folders in force.

Beyond the tools, the server exposes a file:// resource template, so a client can read a file by URI with resources/read. resources/list returns no resource inventory. The listing, tree and search tools do enumerate directory entries when asked. Operator options: - --read-only removes every write tool from the listing. - --read-only-dir keeps the write tools listed but refuses writes into the named directories. - --confine-roots lets a 2025-era client's Roots narrow the command-line folders but not widen them.

Windows-specific refusals cover NTFS alternate data stream paths, reserved device names such as CON, NUL and COM1, and path components ending in a dot or a space. Limits: a 15-second timer bounds selected calls only, namely path resolution during validation and each directory read in the search_files and directory_tree walks. It is not a timeout for every filesystem operation or a deadline for the whole request, and a call that times out keeps running in the background. The search_files and directory_tree walks stop with an error after 100,000 entries.

Using it

Requirements

Runtime: the README and package.json require Node.js 24 or later for npx or source installs. The 2.0.0 release made Node.js 24 a breaking requirement. The declared runtime dependencies are @modelcontextprotocol/server ^2.3.1, diff ^8.0.3, minimatch ^11.0.4 and zod ^4.2.0. The SDK packages themselves are outside the files examined.

Client: an MCP client that speaks stdio. Roots need a 2025-era client that supports them. A 2026-07-28 client cannot use Roots, so the command-line folders are its whole allow-list. Docker: the README gives a local build command run from the repository root, and the evidence does not show a published registry image. On Linux, bind-mounted folders keep host ownership, so a user whose UID differs from the image's may need the --user option. Windows: users launch npx through cmd /c.

Unknown: memory, CPU, disk and network needs. The tests contain platform-specific branches for Windows and macOS, but the evidence contains no platform results.

Mechanism

Startup: index.ts parses the options and resolves each command-line folder with realpath, keeping both the given and resolved spellings where they differ. It warns about and drops folders that are missing or are not directories. It exits with status 1 only when folders were supplied and none of them is usable. Started with no folder arguments, it prints usage and keeps running: - A 2025-era client that supports Roots can then supply the allow-list. - With a 2025-era client that lacks Roots support, the server logs an error, closes the connection and exits with status 1. - On a 2026-07-28 connection, every tool call and resource read returns an error saying that no allowed directories are available. A read-only folder must resolve at startup, or the server refuses to start.

Protocol: serveStdio picks the protocol era from the client's first message. On a 2025-era connection with a Roots-capable client, valid Roots replace the command-line folders. With --confine-roots, only their overlap with the command-line folders is kept. The command-line folders stay in force if the initial Roots response is empty, contains no valid directory, or the roots/list request fails. Once Roots have taken effect, a later update with no valid roots revokes access until the client exposes a root again. Every tool call first waits for any pending roots refresh, so a root that was just withdrawn is not used in the gap. On 2026-07-28 connections there is no roots request, and the command-line folders are the whole allow-list.

Each request goes through validatePath, in this order: 1. It expands the home tilde and refuses Windows-style drive paths on POSIX hosts. 2. It resolves a relative path by trying each allowed folder in order and taking the first candidate that falls inside any allowed folder. If no candidate does, it falls back to the first folder, and an escaping path then fails the containment check. With no allowed folders at all, it resolves against the process working directory, and the path is refused. 3. If the path does not match an allowed folder as spelled, it tries two respellings. A Unicode-equivalent prefix (NFC/NFD forms, or Unicode space characters typed as plain spaces) is mapped onto the configured spelling by string comparison alone, without proving that both spellings name one filesystem entry. A prefix that differs only in letter case is mapped only when the parent directory holds exactly one case-insensitive match and both spellings lstat to the same device and inode. 4. It checks containment, then resolves the target's real location, so a symlink leaving the allow-list is refused. For paths that do not exist yet, it matches components to on-disk names, exact spelling first, and refuses an ambiguous Unicode match. 5. For writes, it runs a read-only check on the resolved path.

Anchoring: writes, appends, directory creation, moves, copies, content reads, and the metadata reads behind get_file_info and list_directory_with_sizes go through pinned-directory.ts. Those helpers temporarily change the process working directory into the validated directory and act on the final name relative to it. They run synchronously, with no await while the working directory is borrowed. On POSIX they read the working directory back and refuse unless it is the validated directory. On Windows that verification is skipped; the source comments say an lstat identity check after opening narrows the race without closing it. Reads then go through the opened descriptor. Overwrites open the existing file with O_NOFOLLOW where available and compare it with the earlier lstat by device and inode (on Windows, when a path stat reports no device, by inode, size and modification time), then truncate and write. Overwrites are not crash-atomic. Directory enumeration does not use this anchoring: list_directory, list_directory_with_sizes, directory_tree and search_files read directories by path with fs.readdir after validation.

Timeouts: a 15-second timer (FS_CALL_TIMEOUT_MS) bounds selected calls only. These are the realpath calls and directory reads made while validating and respelling a path, the lstat calls that confirm a letter-case respelling, and each directory read in the search_files and directory_tree walks. Content reads, writes, the synchronous anchored operations, list_directory's directory read and some metadata calls have no timer. So the timer is neither a timeout for every filesystem operation nor a total request deadline. A call that times out is not cancelled and holds a worker thread until the provider answers, so repeated stalls can slow other operations in the same process.

Setup

For most people, setup takes three steps: 1. Install Node.js 24 or later. 2. Decide which folders the assistant may use. 3. Add the server to the client's MCP configuration, with those folders as arguments. The README gives npx configurations for Claude Desktop and VS Code, and a Windows variant that launches npx through cmd /c. It also gives a Docker configuration that mounts host folders under /projects; adding ro to a mount makes it read-only. Options can appear before, between or after the folders, and -- ends the options.

Where the configuration goes: - VS Code: run 'MCP: Open User Configuration' from the Command Palette (Ctrl + Shift + P) to open the user mcp.json file, or add the configuration to .vscode/mcp.json in the workspace to share it with others. - Claude Desktop: the README names the file claude_desktop_config.json but does not give its full location on each operating system. The README gives no instructions for restarting a client or confirming that the server has connected; those steps are not assessed here.

Docker: build the image from the repository root with docker build -t mcp/filesystem -f src/filesystem/Dockerfile . The Dockerfile uses two stages on node:24-alpine, installs from the root lockfile with npm ci, and runs as UID 1000. The folders to allow are passed as run arguments (/projects in the README's example).

Example

A Claude Desktop entry from the README, giving the assistant two folders, looks like this: {"mcpServers": {"filesystem": {"command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Desktop", "/path/to/other/allowed/dir"]}}}

This is how a session behaves according to the tests and README; none of it was run here. - A read_text_file call on a file inside the Desktop folder returns its text. - A write_file call to an existing file there replaces its content without asking. - An edit_file call with dryRun set to true returns a diff and leaves the file unchanged. The README recommends this before applying a change. - A request for a path outside both folders returns an error beginning 'Access denied - path outside allowed directories'. The last point assumes the two command-line folders remain the effective allow-list. If a 2025-era client supplies valid Roots, those Roots replace the folders, unless the server was started with --confine-roots, which lets Roots only narrow the command-line folders. The evidence does not show whether a given client sends Roots.

A read-only example from the README: mcp-server-filesystem --read-only-dir /path/to/reference /path/to/workspace. The write tools stay listed. A write into the reference folder is refused with an 'Access denied - read-only directory' error that names the folder, while writes into the workspace still work. The README also recommends making the same folder read-only at the operating-system level.

Assessment & evidence

Limitations

Writes change real files. write_file overwrites an existing file without warning, and its description tells users to use it with caution. edit_file and move_file are annotated destructive, and move_file removes its source. There is no delete tool, but overwriting or moving a file can effectively lose it. Overwrites are not crash-atomic.

Path checks are path-based. A file inside an allowed folder that is also hard-linked from outside is changed at every name, as the README warns. A symlink that points inside the allowed folders is followed; one that points outside them is refused. On Windows, names that are legitimate elsewhere, such as CON.txt or a name ending in a dot, are refused.

Slow or network folders: the 15-second timer covers only path resolution during validation and the directory reads in the search_files and directory_tree walks. Content reads, writes, list_directory's directory read and some metadata calls have no timer, so such a request can wait as long as the underlying call takes. A timeout fails the whole request only where the error propagates, as it does for a single-path tool such as read_text_file and in the search_files and directory_tree walks. Some tools catch it instead: read_multiple_files reports a per-file failure, including a validation timeout, inline beside the other files' results, and list_directory_with_sizes lists an entry whose validation timed out with its size shown as unknown. Both can therefore return a successful tool result despite an underlying timeout. A timeout while confirming a letter-case respelling of an allowed folder is treated as a refusal, reported as 'Access denied - path outside allowed directories'. In every case, the timed-out filesystem call is not cancelled; it keeps running and can slow other requests in the same process. Large trees: directory_tree and search_files stop with an error at 100,000 entries rather than returning partial results. search_files does return its matches with a note when a subdirectory cannot be read. It matches names only, never contents.

Protocol: Roots are deprecated as of protocol 2026-07-28 and are not available there. A 2026-07-28 session started with no folders answers every call with an error. Since 2.0.0, a single incoming stdio message over 10 MiB closes the connection, and an unknown tool name returns a JSON-RPC error rather than a tool result. Clients written for the 1.x line may need changes.

Edits: edit_file matches exactly, except that line endings never matter and whole lines may differ in leading and trailing whitespace; whitespace inside a line must match. If any edit's oldText has no match, no replacements are written. The resulting error usually quotes the closest lines of the file, but omits them when the file is empty, when no line resembles oldText, or when the comparison would exceed its work budget. The evidence does not establish that other failures, such as one during the in-place write itself, leave the file unchanged. Not established by the evidence: throughput, memory use with very large files, real-world behaviour on network mounts and cloud folders, and how well AI clients choose among the 16 tools.

Reasoning

The conclusions rest on the tests and source as written. The written tests are broad: they cover named tools, annotations, protocol eras, refusals and issue-linked regressions. That supports describing this as a complete implementation rather than a stub, but it does not demonstrate working behaviour, because execution results are unavailable. On version: package.json at the captured commit declares 2.3.0, which is also the highest version in the captured changelog. The changelog's 1.0.0 entry describes that release as the last of the legacy-era server on the 1.x SDK. Whether 2.3.0 is published, or is the latest version on npm, is unknown.

The safety conclusions are inferences from code and tests. A test that asserts a refusal shows what its author intended and wrote an assertion for. It does not show that the assertion passed, or that the same behaviour holds in a real deployment. Platform-specific claims carry less weight: the evidence shows that Windows and macOS tests exist and that some run only on particular hosts, but it contains no run results.

Where the evidence is thin: it contains no benchmark, incident history, third-party review or install report, and nothing confirms that a published npm package matches this source. Each of those would change confidence in the assessment.

Alternatives

The evidence does not assess alternatives. Within the package there are choices: - npx or Docker. - Command-line folders or MCP Roots. The README says command-line folders are the only method that works on every protocol version and recommends them. - --read-only, --read-only-dir, operating-system read-only permissions, or read-only Docker mounts. The README suggests combining these for defence in depth.

Other servers exist in the same repository. The Dockerfile says its build shape follows src/everything, and a source comment places this server in the same module pattern as memory and sequentialthinking. Their contents were not examined, so no comparison is made. File tools built into AI clients, and other external alternatives, were not assessed, and their capabilities compared with this server are unknown.

Evidence

The evidence is the complete src/filesystem folder at commit e1dc4b18: the README, changelog, package manifest, TypeScript and test configuration, the Dockerfile and its ignore file, the eleven TypeScript modules, and 38 files under __tests__ (one of them a shared helper). The repository-root LICENSE is included as well. The kinds of evidence are: - source code, which shows what the server does; - tests, which show what its authors assert, often with issue numbers; - the changelog, which gives version history and stated fixes; - the README, which gives user-facing claims and configuration; - comments, which give design intent and are treated as the authors' statements rather than verified fact.

The tests are source code. Each named test states an expected behaviour, but the evidence contains no test results, no coverage output and no continuous-integration logs. Some comments mention a Windows CI leg, and the vitest configuration sets a 90% per-file coverage threshold, but none of those runs is shown.

The SDK packages that do the protocol work are not in the evidence, so statements about protocol framing come from how this code uses them.

Access & freshness

Costs

No price is stated in any file examined. The licence texts grant use, copying and distribution free of charge: the MIT text says 'free of charge', and the Apache-2.0 text grants a 'no-charge, royalty-free' licence. The evidence does not establish whether any particular use carries further cost, so that remains unknown.

Running costs are unknown beyond the stated requirements: a Node.js 24 runtime or a Docker host. Charges for any AI client or model used with the server, and other operating costs, are not specified in the evidence and remain unknown. The captured requirements do not establish that a paid subscription is needed. The evidence contains no performance or resource measurements. The 15-second and 100,000-entry limits are safety bounds set in code, not benchmark results.

The largest non-monetary cost is risk. Overwriting, editing and moving files are real changes, no tool in the listing undoes a change, and an in-place overwrite can leave a partly written file after a crash. The evidence does not show whether users keep backups.

Rights

The repository-root LICENSE file sits outside the folder and is included as a related notice. It states that the MCP project is moving from the MIT License to Apache-2.0. According to that file: - New code and specification contributions are licensed under Apache-2.0. - Documentation other than specifications is licensed under CC-BY-4.0. - Contributions from authors who originally licensed under MIT and have not given explicit permission to relicense remain under MIT, and no rights beyond the original licence are conveyed for them. The file reproduces the full Apache-2.0 text, the MIT text with the copyright line 'Copyright (c) 2024-2025 Model Context Protocol a Series of LF Projects, LLC', and a pointer to CC-BY-4.0.

The package-level statements are worded differently. The README's License section says the server 'is licensed under the MIT License', while package.json says 'SEE LICENSE IN LICENSE'. None of the source files in the folder shows its own licence header, and the evidence does not say which files, if any, fall under Apache-2.0 rather than MIT. These facts are recorded here; this report does not assess whether they are sufficient for any particular use.

Other points in the licence texts: both licences disclaim warranty and limit liability (Apache sections 7 and 8, and the MIT 'AS IS' notice). Apache section 6 grants no permission to use the project's trade names beyond describing the origin of the work. The licences of the dependencies (diff, minimatch, zod and the MCP SDK packages) are not in the files examined.

Freshness

The copy examined is commit e1dc4b18dbb948921da37f3d4224a628730b43b0, read on 12 November 2026. This report describes only that commit; later commits may change tools, options or behaviour.

The changelog lists 1.0.0, 2.0.0, 2.0.1, 2.1.0, 2.2.0 and 2.3.0, newest first. Its entries carry pull-request numbers but no dates, so the evidence gives no release date for 2.3.0 and does not show how often releases are made. The changelog does show continuing security work: - a minimatch upgrade for a denial-of-service advisory (GHSA-g3hv-75wg-m249, in 2.2.0); - a raised SDK minimum for another advisory (GHSA-6qxp-vccf-f47h, in 1.0.0); - features added from 2.1.0 to 2.3.0.

Dependencies are declared as caret ranges, so the versions a user installs later can differ from those the tests were written against. The root lockfile that the Docker build uses is outside the files examined.

Actions

Before connecting it: - List only the folders the assistant needs. - Try it first on a copy of a project. - Mark any reference folder read-only with --read-only-dir or a read-only mount. - Keep backups of anything the assistant may edit, because the server has no undo.

When configuring it: - Use command-line folders rather than Roots, as the README advises. - Pass --confine-roots if a 2025-era client supplies its own roots and you want them kept inside your folders. - On Windows, expect names such as CON, or names ending in a dot, to be refused. - On Linux with Docker, add --user if your UID differs from the image's UID 1000. - Preview changes with dryRun before applying edit_file, as the README recommends.

Before relying on it: - Read the rights section and decide whether the MIT and Apache-2.0 statements meet your needs. - Run the package's own test suite on your platform (the package script is vitest run, in src/filesystem), since nothing in this report was run. - For Docker, build the image locally from the repository root, as the README shows.

Evidence for this report

LICENSEnotice · checked 2026-11-12
src/filesystem/CHANGELOG.mdselected · checked 2026-11-12
src/filesystem/Dockerfileselected · checked 2026-11-12
src/filesystem/Dockerfile.dockerignoreselected · checked 2026-11-12
src/filesystem/README.mdselected · checked 2026-11-12
src/filesystem/__tests__/append-file.test.tsselected · checked 2026-11-12
src/filesystem/__tests__/bin-smoke.test.tsselected · checked 2026-11-12
src/filesystem/__tests__/bounded-walk.test.tsselected · checked 2026-11-12
src/filesystem/__tests__/copy-file.test.tsselected · checked 2026-11-12
src/filesystem/__tests__/eras.test.tsselected · checked 2026-11-12
src/filesystem/__tests__/helpers.tsselected · checked 2026-11-12
src/filesystem/__tests__/lib.test.tsselected · checked 2026-11-12
src/filesystem/__tests__/path-utils.test.tsselected · checked 2026-11-12
src/filesystem/__tests__/read-only.test.tsselected · checked 2026-11-12
src/filesystem/__tests__/roots-utils.test.tsselected · checked 2026-11-12
src/filesystem/__tests__/server-paths.test.tsselected · checked 2026-11-12
src/filesystem/__tests__/server-roots.test.tsselected · checked 2026-11-12
src/filesystem/__tests__/server-tools.test.tsselected · checked 2026-11-12
src/filesystem/__tests__/stdio.test.tsselected · checked 2026-11-12
src/filesystem/__tests__/version.test.tsselected · checked 2026-11-12
src/filesystem/__tests__/win32.test.tsselected · checked 2026-11-12
src/filesystem/allowed-directories.tsselected · checked 2026-11-12
src/filesystem/file-resources.tsselected · checked 2026-11-12
src/filesystem/index.tsselected · checked 2026-11-12
src/filesystem/lib.tsselected · checked 2026-11-12
src/filesystem/package.jsonselected · checked 2026-11-12
src/filesystem/path-utils.tsselected · checked 2026-11-12
src/filesystem/path-validation.tsselected · checked 2026-11-12
src/filesystem/pinned-directory.tsselected · checked 2026-11-12
src/filesystem/read-only-directories.tsselected · checked 2026-11-12
src/filesystem/roots-utils.tsselected · checked 2026-11-12
src/filesystem/server.tsselected · checked 2026-11-12
src/filesystem/tsconfig.jsonselected · checked 2026-11-12
src/filesystem/tsconfig.test.jsonselected · checked 2026-11-12
src/filesystem/version.tsselected · checked 2026-11-12
src/filesystem/vitest.config.tsselected · checked 2026-11-12