Filesystem MCP Server
Provides 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.
What is Filesystem MCP Server?
Filesystem MCP Server is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to provides 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 thr...
Provides 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.
This server falls under the File Systems category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Provides comprehensive filesystem operations (read, write, l
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx filesystem-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Filesystem MCP Server
The mark3labs MCP Filesystem Server is a Go-based MCP server that provides comprehensive, secure access to local filesystem operations including reading, writing, copying, moving, deleting files and directories, searching, and inspecting file metadata. It enforces strict path validation so AI agents can only access directories you explicitly allow, with automatic symlink resolution and MIME type detection for text, binary, and image files. Teams use it to give LLM coding assistants controlled access to project files without exposing the entire filesystem.
Prerequisites
- Go 1.21+ installed (for building from source) OR Docker for container-based use
- An MCP client such as Claude Desktop, Cursor, or Claude Code
- Target directories you want to expose must exist on disk
- No API keys required — access is controlled by directory arguments at startup
Install the server binary via Go
Install the pre-built binary using go install. The binary will be placed in your GOPATH/bin directory and available as mcp-filesystem-server.
go install github.com/mark3labs/mcp-filesystem-server@latestAlternatively, pull the Docker image
Use the official container image if you prefer Docker. The container accepts allowed directory paths as positional arguments.
docker pull ghcr.io/mark3labs/mcp-filesystem-server:latestVerify the installation
Run the server manually with a test directory to confirm it starts correctly. Press Ctrl+C to stop.
mcp-filesystem-server /tmpConfigure your MCP client (binary mode)
Add the server to your MCP client configuration, listing each directory you want to expose as a separate argument. The server will reject any path outside these roots.
{
"mcpServers": {
"filesystem": {
"command": "mcp-filesystem-server",
"args": ["/Users/yourname/projects", "/Users/yourname/documents"]
}
}
}Configure your MCP client (Docker mode)
Use Docker with volume mounts to map host directories into the container. This adds an extra layer of filesystem isolation.
{
"mcpServers": {
"filesystem": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"--volume=/Users/yourname/projects:/projects",
"ghcr.io/mark3labs/mcp-filesystem-server:latest",
"/projects"
]
}
}
}Restart your MCP client and verify tools are available
Restart Claude Desktop or your chosen client. You should see filesystem tools listed: read_file, write_file, list_directory, search_files, get_file_info, and others.
Filesystem MCP Server Examples
Client configuration
Minimal Claude Desktop configuration exposing a single project directory to the AI agent.
{
"mcpServers": {
"filesystem": {
"command": "mcp-filesystem-server",
"args": ["/Users/yourname/my-project"]
}
}
}Prompts to try
Example prompts after the filesystem server is connected to Claude Desktop or another MCP client.
- "List all files in the project directory"
- "Read the contents of src/main.go"
- "Search for all .ts files containing the word 'useState'"
- "Create a new file called notes.txt with the content 'TODO: review this'"
- "Move old-config.json to archive/old-config.json"
- "Show me the file info and MIME type for assets/logo.png"Troubleshooting Filesystem MCP Server
Permission denied errors when reading or writing files
Ensure the user running mcp-filesystem-server has read/write permissions on the target directories. On macOS, also check that Terminal or the MCP client app has Full Disk Access in System Settings → Privacy & Security.
Path outside allowed directories error
The server enforces strict root validation and resolves symlinks before checking. Make sure the full resolved path of the file you're accessing falls under one of the directories passed as arguments at startup. Add more directories to the args list if needed.
Command not found after go install
Ensure $GOPATH/bin (or $HOME/go/bin) is in your PATH. Run export PATH=$PATH:$(go env GOPATH)/bin and add it to your shell profile (~/.zshrc or ~/.bashrc).
Frequently Asked Questions about Filesystem MCP Server
What is Filesystem MCP Server?
Filesystem MCP Server is a Model Context Protocol (MCP) server that provides 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. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Filesystem MCP Server?
Follow the installation instructions on the Filesystem MCP Server GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Filesystem MCP Server?
Filesystem MCP Server works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Filesystem MCP Server free to use?
Yes, Filesystem MCP Server is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Filesystem MCP Server Alternatives — Similar File Systems Servers
Looking for alternatives to Filesystem MCP Server? 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.
Ebook
★ 366A lightweight MCP server that allows LLMs to read and interact with your personal PDF and EPUB ebooks on your local machine. Ideal for building AI reading assistants or chat-based ebook interfaces.
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 Filesystem MCP Server 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 Filesystem MCP Server?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.