File System Operations
A comprehensive Model Context Protocol (MCP) server for advanced file system operations. This server provides structured file management capabilities including file operations, directory management, file watching, search functionality, and archiving
What is File System Operations?
File System Operations is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to comprehensive model context protocol (mcp) server for advanced file system operations. this server provides structured file management capabilities including file operations, directory management, fil...
A comprehensive Model Context Protocol (MCP) server for advanced file system operations. This server provides structured file management capabilities including file operations, directory management, file watching, search functionality, and archiving
This server falls under the File Systems category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- read_file
- set_filesystem_default
- write_file
- update_file
- list_files
Use Cases
Maintainer
Works with
Installation
NPM
npx -y @modelcontextprotocol/server-filesystemManual Installation
npx -y @modelcontextprotocol/server-filesystemConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use File System Operations
The Filesystem MCP Server by cyanheads is a comprehensive Model Context Protocol server that gives AI assistants structured, secure access to file system operations including reading, writing, updating, listing, moving, copying, and deleting files and directories. It operates within a configurable base directory (FS_BASE_DIRECTORY) to prevent path traversal and supports both stdio and HTTP transports with optional bearer token authentication. Developers and power users who want AI assistants to manage project files, generate code into the right directories, or perform file-level search and replace can use this server as a governed file access layer.
Prerequisites
- Node.js 18 or later
- npm to install dependencies and build the server
- FS_BASE_DIRECTORY set to the absolute path of the root directory the server should operate within
- An MCP-compatible client such as Claude Desktop or Cursor
Clone the repository and install dependencies
Clone the filesystem-mcp-server repository and install Node.js dependencies.
git clone https://github.com/cyanheads/filesystem-mcp-server.git
cd filesystem-mcp-server
npm installBuild the TypeScript source
Compile the server to the dist/ directory.
npm run buildSet the base directory environment variable
Set FS_BASE_DIRECTORY to the absolute path of the directory where the server should be allowed to read and write files. All operations are sandboxed to this directory.
export FS_BASE_DIRECTORY=/path/to/your/projectsConfigure Claude Desktop
Add the server to your claude_desktop_config.json with the FS_BASE_DIRECTORY environment variable. Adjust the log level as needed.
Verify the server starts correctly
Test the server by running it directly. It should start and wait silently for MCP client connections over stdio.
node dist/index.jsFile System Operations Examples
Client configuration
Add this to claude_desktop_config.json to connect Claude Desktop to the filesystem MCP server.
{
"mcpServers": {
"filesystem": {
"command": "node",
"args": ["/path/to/filesystem-mcp-server/dist/index.js"],
"env": {
"FS_BASE_DIRECTORY": "/path/to/your/projects",
"MCP_LOG_LEVEL": "info"
}
}
}
}Prompts to try
Once the server is connected, use these prompts to manage files through Claude.
- "List all files in the src directory of my project"
- "Read the contents of config.json and show me the database settings"
- "Create a new file called utils.ts with a basic TypeScript utility function"
- "Find and replace all occurrences of 'localhost:3000' with 'api.example.com' in server.js"
- "Move the temp/ directory to archive/2024-temp/"Troubleshooting File System Operations
Operations fail with a path outside base directory error
All file paths must be within FS_BASE_DIRECTORY. Ensure the env variable points to the correct root and that you reference files with paths relative to that root rather than absolute system paths.
Server fails to start with missing dist/index.js
Run npm run build first to compile the TypeScript. The dist/ directory is not committed to the repository and must be generated locally.
HTTP transport returns 401 Unauthorized
When using HTTP transport, set MCP_AUTH_SECRET_KEY (minimum 32 characters) as an environment variable and include the corresponding bearer token in your client's Authorization header.
Frequently Asked Questions about File System Operations
What is File System Operations?
File System Operations is a Model Context Protocol (MCP) server that comprehensive model context protocol (mcp) server for advanced file system operations. this server provides structured file management capabilities including file operations, directory management, file watching, search functionality, and archiving It connects AI assistants to external tools and data sources through a standardized interface.
How do I install File System Operations?
Install via npm with the command: npx -y @modelcontextprotocol/server-filesystem. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with File System Operations?
File System Operations works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is File System Operations free to use?
Yes, File System Operations is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.
File System Operations Alternatives β Similar File Systems Servers
Looking for alternatives to File System Operations? Here are other popular file systems servers you can use with Claude, Cursor, and VS Code.
Electerm
β 14.1kπ»Terminal/ssh/sftp/ftp/telnet/serialport/RDP/VNC/Spice client(linux, mac, win)
Plik
β 1.8kPlik is a temporary file upload system (Wetransfer like) in Go.
Kordoc
β 957An MCP server that parses South Korean document formats like HWP, HWPX, and PDF into Markdown. It features specialized table reconstruction and security-hardened extraction optimized for administrative and public institution files.
macOS Automator
β 801A Model Context Protocol server that enables execution of AppleScript and JavaScript for Automation scripts on macOS, allowing programmatic control of applications and system functions through a rich knowledge base of pre-defined scripts.
PDF Reader
β 723Enables reading, searching, and metadata extraction from PDF files without loading the entire content into the context window. It provides efficient tools for text cleaning, page-specific extraction, and context-aware search results.
Filesystem MCP Server
β 643Provides comprehensive filesystem operations (read, write, list, create, delete, move files and directories) through the Model Context Protocol with Streamable HTTP transport and built-in security through configurable root directory restrictions.
Browse More File Systems MCP Servers
Explore all file systems servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up File System Operations in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use File System Operations?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.