MCP Filesystem Server

by @mark3labs

Filesystem MCP Server

MCP Filesystem Server gives assistants file and directory operations within explicitly allowed paths. It supports reading, writing, searching, moving, and inspecting local content.

Server facts

MCP Filesystem Server

GitHub stars

693

Last commit

Nov 24, 2025

Runtime

go

License

MIT

Tech

Runtime
goGo
Transports
stdio
Remote access
No

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
Documented launch / install command
mcp-filesystem-server /path/to/allowed/directory /another/allowed/directory

Replace the example allowed paths. The README also documents Docker and embedding the filesystemserver package in Go applications.

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.

Claude Desktop configuration
{
  "mcpServers": {
    "mcp-filesystem-server": {
      "command": "mcp-filesystem-server",
      "args": [
        "/path/to/allowed/directory",
        "/another/allowed/directory"
      ],
      "env": {}
    }
  }
}

Read the Claude Desktop setup guide

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.

Cursor configuration
{
  "mcpServers": {
    "mcp-filesystem-server": {
      "command": "mcp-filesystem-server",
      "args": [
        "/path/to/allowed/directory",
        "/another/allowed/directory"
      ],
      "env": {}
    }
  }
}

Read the Cursor setup guide

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.

VS Code configuration
{
  "servers": {
    "mcp-filesystem-server": {
      "type": "stdio",
      "command": "mcp-filesystem-server",
      "args": [
        "/path/to/allowed/directory",
        "/another/allowed/directory"
      ],
      "env": {}
    }
  }
}

Read the VS Code setup guide

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.

Windsurf configuration
{
  "mcpServers": {
    "mcp-filesystem-server": {
      "command": "mcp-filesystem-server",
      "args": [
        "/path/to/allowed/directory",
        "/another/allowed/directory"
      ],
      "env": {}
    }
  }
}

Read the Windsurf setup guide

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.

Claude Code configuration
{
  "mcpServers": {
    "mcp-filesystem-server": {
      "type": "stdio",
      "command": "mcp-filesystem-server",
      "args": [
        "/path/to/allowed/directory",
        "/another/allowed/directory"
      ],
      "env": {}
    }
  }
}

Read the Claude Code setup guide

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.

ToolWhat it does
read_fileRead all content from a specified file.
read_multiple_filesRead several paths in one operation.
write_fileCreate a file or replace its existing content.
copy_fileCopy a file or directory to another path.
move_fileMove or rename a file or directory.
delete_fileRemove a file or directory, optionally recursively.
modify_fileReplace matching text using a literal string or regex.
list_directoryList entries within a directory.
create_directoryCreate a directory or ensure it exists.
treeReturn a nested JSON directory tree with depth controls.
search_filesFind files and directories whose names match a pattern.
search_within_filesFind text inside files across a directory tree.
get_file_infoInspect metadata for a file or directory.
list_allowed_directoriesReport the directories the server may 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.

MCP Filesystem Server setup notes

  • MCP Filesystem Server's stdio example needs a client that launches local processes.

Frequently asked questions

Allowed directories are passed at launch, with path validation and symlink security checks described in the README.

Related MCP servers