MCP Filesystem Server logo

MCP Filesystem Server

by mark3labs

Access, search, modify, and manage approved local files and directories through MCP tools.

Install MCP Filesystem Server

Run the project’s own setup commands, in order.

Setup steps from the project

mark3labs/mcp-filesystem-server installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    go install github.com/mark3labs/mcp-filesystem-server@latest
    
  2. 2. Start the server
    mcp-filesystem-server /path/to/allowed/directory [/another/allowed/directory ...]
    
  3. 3. Start the server
    docker run -i --rm ghcr.io/mark3labs/mcp-filesystem-server:latest /path/to/allowed/directory
    
We couldn’t confirm it starts correctly

The install command didn't complete successfully in our automated test.

/bin/bash: line 1: go: command not found

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The mark3labs/mcp-filesystem-server MCP server exposes local filesystem operations through the Model Context Protocol. It runs as a Go executable or Docker container and limits access to directories supplied at startup, with path validation and symlink checks. Reach for the mark3labs/mcp-filesystem-server MCP server when an MCP-compatible client needs controlled access to project files, directory structures, metadata, or file contents.

Use cases

  • Read source files from approved project directories
  • Search filenames and file contents across a codebase
  • Create, move, copy, or delete local files
  • Apply literal or regex-based edits to files
  • Inspect directory trees and filesystem metadata

Key features

  • Controlled access to configured directories
  • File and directory read/write operations
  • Recursive filename and content search
  • Literal and regex text replacement
  • Directory tree and metadata inspection
  • Docker and Go-based execution

Tools15

What MCP Filesystem Server lets your agent do. Expand a tool for its parameters.

Self-reported~30 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

22/22 checks healthy over the last 113d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars699Stargazers on the source repository.
Last commit1y agoMost recent push to the default branch.
Install checkInconclusiveInstall command did not finish in our automated test.
Tools exposed15Callable tools this server registers over MCP.
Directory activity7 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Filesystem Server works

What mark3labs/mcp-filesystem-server MCP server does

The mark3labs/mcp-filesystem-server MCP server gives MCP clients access to selected areas of a local filesystem. It exposes a file:// resource representing files and directories, along with tools for reading, writing, copying, moving, deleting, and inspecting filesystem entries.

The server supports individual and batch file reads, creation or replacement of file contents, directory creation, and detailed directory listings. It can also return a hierarchical directory tree, retrieve file or directory metadata, and report which directories are currently permitted.

Search tools cover both filenames and file contents. Filename searches operate recursively from a supplied starting path, while content searches can be limited by directory depth and result count. File modification supports either literal text matching or regular expressions, with an option to replace only the first match or all matches.

How it works

The process starts with one or more allowed directory paths as command-line arguments. Requests received over MCP are checked against those allowed locations before filesystem operations are performed. The stated security behavior includes protection against directory traversal, security checks during symlink resolution, and access restricted to configured directories.

The implementation is written in Go and can run as a standalone process or inside Docker. MCP clients launch the process using a command and argument list, then communicate with it through the client’s MCP support. When Docker is used, a host directory must be mounted into the container if file changes need to be visible on the host.

The server handles text, binary, and image files.

Setup and configuration

Install the executable with Go:

bash
go install github.com/mark3labs/mcp-filesystem-server@latest

Start it by passing at least one allowed directory:

bash
mcp-filesystem-server /data/project

Additional allowed directories can be supplied as further arguments. An MCP client configuration uses mcp-filesystem-server as the command and places the allowed paths in args.

Directory arguments are therefore the main configuration required for normal operation.

Tools and capabilities

The documented tools are:

  • read_file and read_multiple_files for reading one or several files.
  • write_file for creating or overwriting a file.
  • copy_file, move_file, and delete_file for filesystem changes.
  • modify_file for literal or regex-based find-and-replace operations.
  • list_directory, create_directory, and tree for directory management and structure inspection.
  • search_files for filename-pattern searches and search_within_files for content searches.
  • get_file_info for metadata and list_allowed_directories for the access boundary.

Limitations and notes

Delete operations are non-recursive by default, and tree traversal does not follow symbolic links by default. Content-search results default to a maximum of 1,000 entries, while tree traversal defaults to a depth of three. Exact behavior for files outside the configured directories is intentionally constrained by the server’s path validation.

The Docker example’s container paths are not automatically the same as host paths. Use a volume mount when operations performed in the container must modify host files.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Filesystem Server

Install it with Go using `go install github.com/mark3labs/mcp-filesystem-server@latest`, then run `mcp-filesystem-server` with one or more allowed directory paths.

Set the client command to `mcp-filesystem-server` and provide the directories it may access as command arguments.

Yes. The `search_within_files` tool searches file contents across directory trees and supports depth and maximum-result options.

Yes.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Filesystem Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mark3labs-mcp-filesystem-server?style=directory)](https://allmcps.com/mcp/mark3labs-mcp-filesystem-server)
HTML Embed
<a href="https://allmcps.com/mcp/mark3labs-mcp-filesystem-server"><img src="https://allmcps.com/api/badge/mark3labs-mcp-filesystem-server?style=directory" alt="MCP Filesystem Server on AllMCPs" /></a>