Sign in
Explore
Add-ons · MCP serverEveryday codingReviewedWrites files

filesystem

Reads and writes files, manages directories and searches files, limited to the directories passed on the command line.

Kind
MCP server
Works with
Any agent
Source
MCP Reference Servers @ 51b6382a3e82
Path
src/filesystem/README.md
License
Apache-2.0
Jobs
Implementation, Context management
InstallAdd it as an MCP server.
npx -y @modelcontextprotocol/server-filesystem /path/to/dir
# Filesystem MCP Server

Node.js server implementing Model Context Protocol (MCP) for filesystem operations.

Published on npm as [`@modelcontextprotocol/server-filesystem`](https://www.npmjs.com/package/@modelcontextprotocol/server-filesystem).

## Features

- Read/write files
- Create/list/delete directories
- Move files/directories
- Search files
- Get file metadata
- Directory access control from command-line arguments, with [Roots](https://modelcontextprotocol.io/docs/learn/client-concepts#roots) as a deprecated, 2025-era convenience
- Serves both protocol eras on stdio: 2026-07-28 clients (`server/discover`, no handshake) and 2025-era clients (`initialize`)

## Directory Access Control

The server may touch only its **allowed directories**. Pass them on the command line. A 2025-era client that supports [Roots](https://modelcontextprotocol.io/docs/learn/client-concepts#roots) can also replace them at runtime, but Roots is [deprecated as of protocol version 2026-07-28](https://modelcontextprotocol.io/specification/2026-07-28/deprecated) and a 2026-07-28 connection cannot use it.

### Method 1: Command-line Arguments (Recommended)
…