Filesystem

Developer tools

Go server implementing Model Context Protocol (MCP) for filesystem operations.

Your AI app calls the Filesystem MCP server, which does the work through tools like read_file, read_multiple_files, write_file and copy_file and sends the result back to the chat.

About Filesystem

Filesystem is a community MCP server from mark3labs, filed in our directory under developer tools. Go server implementing Model Context Protocol (MCP) for filesystem operations.

Filesystem runs on your own machine: your AI app starts it with the command docker run -i --rm and talks to it over standard input and output.

The README for Filesystem lists tools such as read_file, read_multiple_files, write_file and copy_file, which your AI app can call once the server is connected.

At a glance

Publisher
mark3labs (community)
Runs
Locally on your machine
Install from
Docker image: ghcr.io/mark3labs/mcp-filesystem-server:latest
Written in
Go
License
MIT
GitHub stars
699

Tools Filesystem gives your AI app

  • read_file
  • read_multiple_files
  • write_file
  • copy_file
  • move_file
  • delete_file
  • modify_file
  • list_directory
  • create_directory
  • search_files
  • search_within_files
  • get_file_info
  • list_allowed_directories

Tool names as the Filesystem README lists them. Your AI app shows the live list once Filesystem is connected.

How to set up Filesystem

  1. Have Docker running on the machine that runs your AI app, because Filesystem starts as a container.
  2. Check the Filesystem README for keys or settings; the registry lists none that Filesystem requires.
  3. Add Filesystem to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Filesystem tools to confirm the connection.
  5. Run one read-only task with Filesystem first, such as a call to read_file, before you allow anything that writes or sends.

Filesystem compared with similar servers

  • SonarQube by SonarSource has fewer GitHub stars than Filesystem (697 against 699); SonarQube is official while Filesystem is a community server, and both run locally. The SonarQube README lists 30 tools to Filesystem's 13.
  • Openreality by reality-opened has more GitHub stars than Filesystem (700 against 699); both are community servers, and both run locally.
  • Agenvoy by pardnchiu has fewer GitHub stars than Filesystem (693 against 699); both are community servers, and both run locally.

Before you connect Filesystem

  • Give Filesystem its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Filesystem tool call until you trust what it does with them.
  • Treat text that Filesystem fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Filesystem on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Filesystem

How marketing and sales teams put Filesystem to work, by company size. Pick the size closest to yours and start Filesystem on one use case.

Small business

  • A small business with a developer can use Filesystem to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Filesystem to explain and fix a marketing site issue without context switching between tools.
  • Filesystem runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Filesystem to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Filesystem to keep scripts and automations documented and versioned as they change.
  • Start with read_file and read_multiple_files, the tools Filesystem lists first, and add more once the team trusts the results.

Enterprise

  • Enterprise engineering teams can roll out Filesystem with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Filesystem so web and marketing engineering share one reviewed way of working with AI.
  • Filesystem is a community server, so have security review the code and pin a version before Filesystem touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Filesystem README

From mark3labs/mcp-filesystem-server on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

MCP Filesystem Server

This MCP server provides secure access to the local filesystem via the Model Context Protocol (MCP).

Components

Resources
  • file://
    • Name: File System
    • Description: Access to files and directories on the local file system
Tools
File Operations
  • read_file

    • Read the complete contents of a file from the file system
    • Parameters: path (required): Path to the file to read
  • read_multiple_files

    • Read the contents of multiple files in a single operation
    • Parameters: paths (required): List of file paths to read
  • write_file

    • Create a new file or overwrite an existing file with new content
    • Parameters: path (required): Path where to write the file, content (required): Content to write to the file
  • copy_file

    • Copy files and directories
    • Parameters: source (required): Source path of the file or directory, destination (required): Destination path
  • move_file

    • Move or rename files and directories
    • Parameters: source (required): Source path of the file or directory, destination (required): Destination path
  • delete_file

    • Delete a file or directory from the file system
    • Parameters: path (required): Path to the file or directory to delete, recursive (optional): Whether to recursively delete directories (default: false)
  • modify_file

    • Update file by finding and replacing text using string matching or regex
    • Parameters: path (required): Path to the file to modify, find (required): Text to search for, replace (required): Text to replace with, all_occurrences (optional): Replace all occurrences (default: true), regex (optional): Treat find pattern as regex (default: false)
Directory Operations
  • list_directory

    • Get a detailed listing of all files and directories in a specified path
    • Parameters: path (required): Path of the directory to list
  • create_directory

    • Create a new directory or ensure a directory exists
    • Parameters: path (required): Path of the directory to create
  • tree

    • Returns a hierarchical JSON representation of a directory structure
    • Parameters: path (required): Path of the directory to traverse, depth (optional): Maximum depth to traverse (default: 3), follow_symlinks (optional): Whether to follow symbolic links (default: false)
Search and Information
  • search_files

    • Recursively search for files and directories matching a pattern
    • Parameters: path (required): Starting path for the search, pattern (required): Search pattern to match against file names
  • search_within_files

    • Search for text within file contents across directory trees
    • Parameters: path (required): Starting directory for the search, substring (required): Text to search for within file contents, depth (optional): Maximum directory depth to search, max_results (optional): Maximum number of results to return (default: 1000)
  • get_file_info

    • Retrieve detailed metadata about a file or directory
    • Parameters: path (required): Path to the file or directory
  • list_allowed_directories

    • Returns the list of directories that this server is allowed to access
    • Parameters: None

Features

  • Secure access to specified directories
  • Path validation to prevent directory traversal attacks
  • Symlink resolution with security checks
  • MIME type detection
  • Support for text, binary, and image files
  • Size limits for inline content and base64 encoding

Getting Started

Installation
Using Go Install
go install github.com/mark3labs/mcp-filesystem-server@latest
Usage
As a standalone server

Start the MCP server with allowed directories:

mcp-filesystem-server /path/to/allowed/directory [/another/allowed/directory ...]
As a library in your Go project
package main

import (
    "log"
    "os"

    "github.com/mark3labs/mcp-filesystem-server/filesystemserver"
)

func main() {
    // Create a new filesystem server with allowed directories
    allowedDirs := []string{"/path/to/allowed/directory", "/another/allowed/directory"}
    fs, err := filesystemserver.NewFilesystemServer(allowedDirs)
    if err != nil {
        log.Fatalf("Failed to create server: %v", err)
    }

    // Serve requests
    if err := fs.Serve(); err != nil {
        log.Fatalf("Server error: %v", err)
    }
}
Usage with Model Context Protocol

To integrate this server with apps that support MCP:

{
  "mcpServers": {
    "filesystem": {
      "command": "mcp-filesystem-server",
      "args": ["/path/to/allowed/directory", "/another/allowed/directory"]
    }
  }
}
Docker
Running with Docker

You can run the Filesystem MCP server using Docker:

docker run -i --rm ghcr.io/mark3labs/mcp-filesystem-server:latest /path/to/allowed/directory
Docker Configuration with MCP

To integrate the Docker image with apps that support MCP:

{
  "mcpServers": {
    "filesystem": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/mark3labs/mcp-filesystem-server:latest",
        "/path/to/allowed/directory"
      ]
    }
  }
}

If you need changes made inside the container to reflect on the host filesystem, you can mount a volume. This allows the container to access and modify files on the host system. Here's an example:

{
  "mcpServers": {
    "filesystem": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--volume=/allowed/directory/in/host:/allowed/directory/in/container",
        "ghcr.io/mark3labs/mcp-filesystem-server:latest",
        "/allowed/directory/in/container"
      ]
    }
  }
}

License

See the LICENSE file for details.

Questions about Filesystem

What is the Filesystem MCP server?

Go server implementing Model Context Protocol (MCP) for filesystem operations. Filesystem is maintained by mark3labs on GitHub at mark3labs/mcp-filesystem-server, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Filesystem MCP server?

Add Filesystem to your AI app's MCP config with the command docker run -i --rm ghcr.io/mark3labs/mcp-filesystem-server:latest. In Claude Code, run claude mcp add --transport stdio filesystem-server -- docker run -i --rm ghcr.io/mark3labs/mcp-filesystem-server:latest. To run Filesystem this way you need Docker running.

Does Filesystem need an API key?

The registry lists no required keys for Filesystem. Check the Filesystem README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Filesystem an official MCP server?

No. Filesystem is a community server maintained by mark3labs. Community servers can be excellent; read the code and the open issues before you give Filesystem access to company data.

What license is Filesystem under?

Filesystem is released under the MIT license, according to its GitHub repository. The license covers the code of Filesystem; the service it connects to has its own terms.