MCP.so
Sign In

MCP File System Server

@asirulnik

About MCP File System Server

No overview available yet

Basic information

Category

Files & Storage

License

MIT license

Runtime

python

Transports

stdio

Publisher

asirulnik

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "mcp-server-filesystem-asirulnik": {
      "command": "python",
      "args": [
        "-m",
        "venv",
        "venv"
      ]
    }
  }
}

Tools

6

Lists files and directories in the project directory

Reads the contents of a file

Creates or overwrites files atomically

Adds content to existing files

Removes files from the filesystem

Makes selective edits using pattern matching

Overview

What is MCP File System Server?

MCP File System Server is a simple Model Context Protocol (MCP) server that provides file system operations. It enables AI assistants like Claude to read, write, update, and delete files within a specified project directory, securely containing all operations.

How to use MCP File System Server?

Install by cloning the repository, creating a virtual environment, and running pip install -e .. Start the server with python -m src.main --project-dir /path/to/project (required argument). Optionally set log level and log file path. For integration with Claude Desktop or VSCode/Cline, configure the server in the respective MCP settings JSON file.

Key features of MCP File System Server

  • List directory contents with .gitignore filtering
  • Read file contents as string
  • Save files atomically with full content
  • Append content to existing files only
  • Delete files irreversibly within project directory
  • Edit files using pattern matching with dry-run support
  • Structured logging with human-readable and JSON formats

Use cases of MCP File System Server

  • Read existing project code for analysis and recommendations
  • Write new files with AI-generated content
  • Make selective edits to code without rewriting entire files
  • Delete temporary or obsolete files
  • Debug and fix issues by modifying files in place

FAQ from MCP File System Server

What runtime does MCP File System Server require?

Python is required. The recommended setup uses a virtual environment and installs dependencies via pip install -e .. No other external services are needed.

How are file operations secured?

All paths are normalized and validated to remain within the specified project directory. Path traversal attacks are prevented, and writes are atomic to avoid data corruption. Delete operations are also restricted to the project directory.

What tools does MCP File System Server expose?

It exposes six tools: list_directory, read_file, save_file, append_file, delete_this_file, and edit_file. Each tool has specific parameters documented in the README.

How do I integrate MCP File System Server with Claude Desktop or VSCode/Cline?

You add a configuration block to the respective settings JSON file (e.g., claude_desktop_config.json for Claude Desktop or cline_mcp_settings.json for VSCode/Cline), specifying the Python executable, script path, project directory, and optional auto-approve list.

Can I auto-approve certain operations for convenience?

Yes, the autoApprove array in the configuration allows you to skip user approval for selected tools. The README recommends auto-approving only read-only operations like list_directory and read_file for better security.

Comments

More Files & Storage MCP servers