MCP Catalogs
Home

filesystem-mcp-server

by cyanheads·37·Score 41

A robust TypeScript MCP server enabling AI agents to securely interact with the local filesystem via STDIO or HTTP transports.

file-systemdeveloper-toolsai-llm
23
Forks
12
Open issues
10 mo ago
Last commit
2d ago
Indexed

Overview

The Filesystem MCP Server provides a comprehensive interface for AI agents to perform file system operations including reading, writing, updating, and managing files and directories. It implements platform-agnostic file capabilities with advanced search/replace and directory tree traversal features. Built on TypeScript with a production-ready foundation, the server emphasizes security with path sanitization, JWT authentication for HTTP transport, and robust error handling. It supports both STDIO for direct process communication and HTTP for network-based interactions with streaming capabilities.

Try asking AI

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

you:AI assistants reading and analyzing codebases for code review or documentation generation
you:Automated file management systems that organize and restructure file hierarchies
you:Development environments where AI needs to modify files as part of the coding workflow
you:How do I restrict filesystem access to specific directories?
you:Does this server support both STDIO and HTTP transports?

When to choose this

Choose this when you need comprehensive file system operations for your AI agent, especially when working in restricted environments where sandboxed file access is required.

When NOT to choose this

Avoid if you need cloud storage integration or if your application requires write access to multiple cloud providers as this server only handles local filesystem operations.

Tools this server exposes

8 tools extracted from the README
  • set_filesystem_default

    Sets a default absolute path for the current session to resolve relative paths.

  • read_file

    Reads the entire content of a specified file as UTF-8 text.

  • write_file

    Writes content to a specified file, creating it if it doesn't exist.

  • update_file

    Performs search-and-replace operations within an existing file.

  • list_files

    Lists files and directories within a specified path.

  • delete_file

    Permanently removes a specific file.

  • delete_directory

    Permanently removes a directory and optionally its contents.

  • create_directory

    Creates a new directory at the specified path.

Comparable tools

shell-mcpcode-interpreter-mcp

Installation

Installation

  1. **Clone the repository:**
git clone https://github.com/cyanheads/filesystem-mcp-server.git
cd filesystem-mcp-server
  1. **Install dependencies:**
npm install
  1. **Build the project:**
npm run build
  1. **Configure with Claude Desktop (example):**

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "filesystem": {
      "command": "node",
      "args": ["/path/to/filesystem-mcp-server/dist/index.js"],
      "env": {
        "FS_BASE_DIRECTORY": "/safe/workspace",
        "MCP_LOG_LEVEL": "info"
      }
    }
  }
}

FAQ

How do I restrict filesystem access to specific directories?
Set the FS_BASE_DIRECTORY environment variable to an absolute path. All filesystem operations will be restricted to this directory and its subdirectories.
Does this server support both STDIO and HTTP transports?
Yes, you can configure the server to use either STDIO (default) or HTTP transport via the MCP_TRANSPORT_TYPE environment variable.

Compare filesystem-mcp-server with

GitHub →

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