Server facts
MCP Filesystem Server
Project
- Author
- mark3labs
- License
- MIT
- Category
- Files & Documents
Tech
- Runtime / language
- goGo
- Transports
- stdio
- Remote available
- No
- Authentication
- Not specified
Activity
- GitHub stars
- 693
- Last commit
- Data as of
Tags
- Directory Access
- File Search
- Filesystem
- Go
Overview
MCP Filesystem Server is a Go implementation for connecting an MCP client to selected areas of a local filesystem. It exposes a file resource plus tools for reading, creating, copying, moving, deleting, and modifying files or directories. Reading several files in one call is supported, and text replacement can use literal matching or regular expressions. Directory operations include listings, creation, and hierarchical JSON trees with a configurable depth. Search tools cover both names and text inside files, giving an assistant ways to find material before reading it in full.
Access is based on directories supplied when the server starts. The README describes path validation, security checks during symlink resolution, MIME detection, and limits for inline or base64 content. It also lists support for text, binary, and image files. Those controls define a scoped file interface, not a read-only service: write and delete tools are part of the available surface. Installation is documented through go install, followed by launching the executable with allowed paths. A published Docker image provides another option, with a volume-mount example when container changes need to reach host files. Developers can also embed the filesystem server as a Go library. This makes it useful for both direct MCP client configuration and applications needing the same filesystem interface within their own process.
Install & configure
Requirements
- Go for the documented go install method
- Install github.com/mark3labs/mcp-filesystem-server@latest
- Allowed directories supplied at launch
mcp-filesystem-server /path/to/allowed/directory /another/allowed/directoryReplace the example allowed paths. The README also documents Docker and embedding the filesystemserver package in Go applications.
Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp-filesystem-server": {
"command": "mcp-filesystem-server",
"args": [
"/path/to/allowed/directory",
"/another/allowed/directory"
],
"env": {}
}
}
}Config file · Project: .cursor/mcp.json
User: ~/.cursor/mcp.json
The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp-filesystem-server": {
"command": "mcp-filesystem-server",
"args": [
"/path/to/allowed/directory",
"/another/allowed/directory"
],
"env": {}
}
}
}Config file · Workspace: .vscode/mcp.json
For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.
{
"servers": {
"mcp-filesystem-server": {
"type": "stdio",
"command": "mcp-filesystem-server",
"args": [
"/path/to/allowed/directory",
"/another/allowed/directory"
],
"env": {}
}
}
}Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp-filesystem-server": {
"command": "mcp-filesystem-server",
"args": [
"/path/to/allowed/directory",
"/another/allowed/directory"
],
"env": {}
}
}
}Config file · Project scope: .mcp.json at the repository root
The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp-filesystem-server": {
"type": "stdio",
"command": "mcp-filesystem-server",
"args": [
"/path/to/allowed/directory",
"/another/allowed/directory"
],
"env": {}
}
}
}Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Tools
Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.
| Tool | What it does |
|---|---|
| read_file | Read all content from a specified file. |
| read_multiple_files | Read several paths in one operation. |
| write_file | Create a file or replace its existing content. |
| copy_file | Copy a file or directory to another path. |
| move_file | Move or rename a file or directory. |
| delete_file | Remove a file or directory, optionally recursively. |
| modify_file | Replace matching text using a literal string or regex. |
| list_directory | List entries within a directory. |
| create_directory | Create a directory or ensure it exists. |
| tree | Return a nested JSON directory tree with depth controls. |
| search_files | Find files and directories whose names match a pattern. |
| search_within_files | Find text inside files across a directory tree. |
| get_file_info | Inspect metadata for a file or directory. |
| list_allowed_directories | Report the directories the server may access. |
Names, permissions, and defaults can change. Check the current upstream documentation before granting access.
Use cases
- Read several project files in a single request.
- Search file names and text within approved directories.
- Apply literal or regex text replacements.
- Generate directory trees and inspect file metadata.
Strengths
- Explicit directory allow-list with traversal and symlink checks.
- Includes both filename and content search.
- Available as a standalone binary, Docker image, or Go library.
Limitations
- The tool set includes overwriting and deletion, not only reads.
- Docker needs a volume mount to modify host files.
Frequently asked questions
Independent listing, not an affiliation or security review. Grant the least access needed and verify the upstream instructions before running code.