Filesystem MCP Server

v1.0.0File Systemsstable

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.

asp-netclaudecsharpdotnetllm
Share:
643
Stars
0
Downloads
0
Weekly
0/5

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

Comprehensive file operations
Read, write, create, delete files
Configurable root directory restrictions
mark3labs

Maintainer

LicenseMIT License
Languagego
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx filesystem-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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@latest
2

Alternatively, 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:latest
3

Verify the installation

Run the server manually with a test directory to confirm it starts correctly. Press Ctrl+C to stop.

mcp-filesystem-server /tmp
4

Configure 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"]
    }
  }
}
5

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"
      ]
    }
  }
}
6

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.

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.

Quick Config Preview

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

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides