FI

Filesystem MCP Server

Secure file system operations with configurable access controls. Read, write, move, and search files with fine-grained permission management.

Quick Install
npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/dir

Overview

The Filesystem MCP Server provides secure, configurable access to your local file system. It implements fine-grained access controls, allowing you to specify exactly which directories Claude can read, write, or modify.

Features

  • Read files — Single files or entire directories recursively
  • Write files — Create, update, or append file content
  • Move / rename — Relocate files and directories safely
  • Delete — Remove files with confirmation
  • Search — Find files by name pattern or content regex
  • Directory listings — Tree view with metadata

Configuration

Add to your Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/Documents"]
    }
  }
}

You can specify multiple allowed directories:

"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/docs", "/home/user/projects"]

Available Tools

ToolDescription
read_fileRead content of a single file
read_multiple_filesRead several files at once
write_fileCreate or overwrite a file
edit_fileMake targeted edits with diff preview
create_directoryCreate a new directory
list_directoryList files and subdirectories
directory_treeGet recursive tree structure
move_fileMove or rename a file
search_filesSearch by filename pattern
get_file_infoGet metadata (size, modified, permissions)

Security

The server enforces strict path validation — all operations are sandboxed to the directories you explicitly allowlist. Symlinks are resolved and validated. No access is granted outside the specified paths.