MCP Catalogs
Home

filesystem

Official

by modelcontextprotocol·85,748·Score 77

A feature-rich MCP server for filesystem operations with dynamic directory access control.

file-systemdeveloper-toolsproductivity
10,713
Forks
459
Open issues
this month
Last commit
2d ago
Indexed

Overview

The Filesystem MCP Server provides comprehensive tools for reading, writing, and manipulating files and directories. It offers both read-only and write capabilities with detailed metadata information. What sets this server apart is its sophisticated directory access control system that supports both command-line configuration and dynamic updates via the MCP Roots protocol. This allows for flexible runtime adjustments without server restarts. The server follows security best practices by restricting all operations to explicitly allowed directories.

Try asking AI

After installing, here are 6 things you can ask your AI assistant:

you:Enable AI models to read and write project files during development
you:Allow Claude or other MCP clients to browse and analyze codebases
you:Provide secure sandboxed access to specific directories for content generation
you:How do I restrict access to only specific directories?
you:Can the filesystem server be used with Claude Desktop?
you:What happens if no directories are specified?

When to choose this

Choose this when you need comprehensive file system operations with dynamic directory access control, especially when working with AI agents that need secure, scoped access to multiple directories.

When NOT to choose this

Avoid if you need fine-grained file permissions beyond directory-level access control, or if you're working with extremely sensitive systems where you need additional security layers beyond MCP's basic access model.

Tools this server exposes

12 tools extracted from the README
  • read_text_file

    Read complete contents of a file as text

  • read_media_file

    Read an image or audio file and return base64 data

  • write_file

    Create new file or overwrite existing file

  • edit_file

    Make selective edits to a file using pattern matching

  • create_directory

    Create new directory or ensure it exists

  • list_directory

    List directory contents with [FILE] or [DIR] prefixes

  • search_files

    Recursively search for files/directories that match patterns

  • get_file_info

    Get detailed file/directory metadata

  • move_file

    Move or rename files and directories

  • directory_tree

    Get recursive JSON tree structure of directory contents

  • list_allowed_directories

    List all directories the server is allowed to access

  • list_directory_with_sizes

    List directory contents with file sizes

Comparable tools

shell-mcpsqlite-mcpgithub-mcp

Installation

Installation

Using NPX

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/path/to/allowed/directory"
      ]
    }
  }
}

Using Docker

{
  "mcpServers": {
    "filesystem": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--mount", "type=bind,src=/path/to/allowed/dir,dst=/projects/allowed/dir",
        "mcp/filesystem",
        "/projects"
      ]
    }
  }
}

VS Code Extension

Click the installation buttons in the README to install directly in VS Code.

FAQ

How do I restrict access to only specific directories?
You can specify allowed directories via command-line arguments when starting the server or use the MCP Roots protocol for dynamic directory access control. The server will only allow operations within these specified directories.
Can the filesystem server be used with Claude Desktop?
Yes, the server provides specific configuration examples for Claude Desktop in the README, including both NPX and Docker deployment options.
What happens if no directories are specified?
If the server starts without command-line arguments and the client doesn't support the roots protocol (or provides empty roots), the server will throw an error during initialization as it requires at least one allowed directory to operate.

On Hacker News

Recent discussion from the developer community.

Compare filesystem with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.