# mark3labs/mcp-filesystem-server [Health: Active]

**Category:** 📂 File Systems  
**Repository:** https://github.com/mark3labs/mcp-filesystem-server  
**GitHub Stars:** 699  
**Views:** 7  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mark3labs-mcp-filesystem-server

## Description
Golang implementation for local file system access.

## Tools
Capabilities this server exposes over MCP:

- **path**
- **paths**
- **content**
- **source**
- **destination**
- **recursive**
- **find**
- **replace**
- **all_occurrences**
- **regex**
- **depth**
- **follow_symlinks**
- **pattern**
- **substring**
- **max_results**

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/mark3labs/mcp-filesystem-server), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

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

2. Start the server:

```sh
mcp-filesystem-server /path/to/allowed/directory [/another/allowed/directory ...]
```

3. Start the server:

```sh
docker run -i --rm ghcr.io/mark3labs/mcp-filesystem-server:latest /path/to/allowed/directory
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/mark3labs-mcp-filesystem-server/readme_

