Feedback

filesystem-mcp-server — by cyanheads

@cyanheads Claim

Basic information

Runtime
TypeScript
Version
1.0.0
Category
License
Apache-2.0
Transports
stdio
Author
cyanheads
Submitted by
Community
Quality
40
Stars
42

About filesystem-mcp-server

MCP server for AI filesystem operations with secure file management, search/replace, and directory traversal capabilities.

filesystem-mcp-server is a MCP server in the Search Web category listed in the AddMCP.net directory, published by cyanheads. It exposes 9 tools, including read_file, write_file, update_file, list_directory and more. Supported transport: stdio. Runtime: TypeScript. License: Apache-2.0. The repository has 42 GitHub stars. Source code is hosted on github.com. Related topics: ai, community, filesystem, llm-agents, mcp.

Setup

{
    "mcpServers": {
        "filesystem": {
            "command": "npx",
            "args": [
                "-y",
                "@cyanheads/filesystem-mcp-server"
            ]
        }
    }
}

filesystem-mcp-server — by cyanheads config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "filesystem": {
            "command": "npx",
            "args": [
                "-y",
                "@cyanheads/filesystem-mcp-server"
            ]
        }
    }
}

filesystem-mcp-server — by cyanheads tools

  • read_file — Read and analyze file contents
  • write_file — Create, modify, or overwrite files
  • update_file — Perform targeted search-and-replace operations within files with plain text and regex support
  • list_directory — List files and directories
  • delete_file — Delete files
  • delete_directory — Delete directories
  • move_file — Move files
  • copy_file — Copy files
  • set_filesystem_default — Set default working directory for resolving relative paths during session

Overview

What is filesystem-mcp-server?

Filesystem MCP Server is a TypeScript-based Model Context Protocol server that provides a secure, platform-agnostic interface for AI agents to interact with the local filesystem. It supports both STDIO and Streamable HTTP transports, enabling reading, writing, updating, and managing files and directories with robust security and logging.

How to use filesystem-mcp-server?

Install dependencies with npm install, build with npm run build, then run node dist/index.js (or npm start). Configure via environment variables (.env file supported). Add the server to your MCP client’s configuration with the appropriate transport (STDIO command node with argument path to dist/index.js, or HTTP URL). HTTP transport requires setting MCP_AUTH_SECRET_KEY for JWT authentication.

Key features of filesystem-mcp-server

  • Comprehensive file and directory operations (read, write, list, delete, move, copy)
  • Targeted search-and-replace within files via update_file tool
  • Session-aware default path management with set_filesystem_default
  • Dual transport: STDIO and HTTP with SSE and JWT authentication
  • Built‑in path sanitization, Zod input validation, and rate limiting
  • Logging with Winston, standardized error handling, and modular utilities

Use cases of filesystem-mcp-server

  • AI agents reading and analyzing file contents in a sandboxed environment
  • Automated file creation, modification, or overwrite during workflow tasks
  • Directory and file path management for project scaffolding or data organization
  • Performing precise, targeted updates within existing files without rewriting the whole file

Frequently asked questions

1 What transports are supported?

The server supports STDIO for direct process communication and HTTP (Express.js) with Server‑Sent Events and JWT authentication. Select via the MCP_TRANSPORT_TYPE environment variable.

2 How do I restrict filesystem access to a specific directory?

Set the FS_BASE_DIRECTORY environment variable to an absolute or project‑relative path. All file operations are then restricted to that directory and its subdirectories. If unset, a warning is logged and no restriction is applied.

3 What are the main tools exposed by the server?

Tools include set_filesystem_default, read_file, write_file, update_file, list_directory, delete_file, move_file, copy_file, and others for comprehensive filesystem interaction.

4 Is authentication required for HTTP transport?

Yes, when MCP_TRANSPORT_TYPE is set to http, the MCP_AUTH_SECRET_KEY environment variable is required (minimum 32 characters) for JWT‑based authentication. STDIO transport does not require authentication.

5 What runtime dependencies does the server need?

The server requires Node.js to run the compiled JavaScript (dist/index.js). It is built with TypeScript 5.8.3 and depends on the MCP SDK, Express.js (for HTTP), Zod (validation), Winston (logging), and other npm packages.

Videos

Tutorials, guides, and showcases related to filesystem-mcp-server — by cyanheads. The player loads when you press play.

Videos belong to their creators. Relevance is approximate; check the channel and description before following setup steps.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬