Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

filesystem-operations-mcp

MCP.Pizza Chef: strawgate

filesystem-operations-mcp is a FastMCP server designed to perform bulk file and folder operations efficiently. It supports simultaneous reading of many files and provides tools to call single or multiple registered tools in bulk, significantly speeding up filesystem tasks. The server includes centralized exception handling to manage errors gracefully during filesystem interactions, making it ideal for workflows requiring high-throughput file access and manipulation.

Use This MCP server To

Read multiple files simultaneously for data aggregation Execute batch file operations with a single request Call multiple filesystem tools in one bulk request Speed up repetitive file read/write tasks Centralize error handling for bulk filesystem operations Integrate with MCP clients for efficient file data retrieval Automate large-scale file processing workflows

README

Bulk Filesystem Operations MCP Server

This project provides a FastMCP server that exposes tools for performing bulk file and folder operations. It includes centralized exception handling for filesystem operations.

Available Tools

The server provides the following tools, categorized by their functionality:

  • call_tool_bulk: Call a single tool registered on this MCP server multiple times with a single request. Useful for speeding up what would otherwise take several individual tool calls.

  • call_tools_bulk: Call multiple tools registered on this MCP server in a single request. Each call can be for a different tool and can include different arguments. Useful for speeding up what would otherwise take several individual tool calls.

To add bulk tools to your FastMCP server, see jlowin/fastmcp#215

File Operations Tools (file server)

These tools are available under the file server namespace.

  • read: Reads the content of a file at the specified path
  • create: Creates a file with the specified content
  • append: Appends content to an existing file
  • erase: Erases the content of a file
  • move: Moves a file from source to destination
  • delete: Deletes a file at the specified path

Folder Operations Tools (folder server)

These tools are available under the folder server namespace.

  • create: Creates a folder at the specified path
  • read_all: Returns the contents of all of the files in a folder (optionally, recursively). This can be expensive!
  • list: Lists the contents of a folder (optionally, recursively)
  • move: Moves a folder from source to destination
  • delete: Deletes a folder at the specified path
  • empty: Empties a folder by deleting all its contents

Disabling Tools

You can disable specific file tools by setting the DISABLE_FILE_TOOLS to an array of tool names you want to disable. For example, to disable the file_read tool, set DISABLE_FILE_TOOLS=["file_read"].

You can disable specific folder tools by setting the DISABLE_FOLDER_TOOLS to an array of tool names you want to disable. For example, to disable the folder_create tool, set DISABLE_FOLDER_TOOLS=["folder_create"].

Bulk tools cannot currently be disabled.

VS Code McpServer Usage

  1. Open the command palette (Ctrl+Shift+P or Cmd+Shift+P).
  2. Type "Settings" and select "Preferences: Open User Settings (JSON)".
  3. Add the following MCP Server configuration
{
    "mcp": {
        "servers": {
            "Filesystem Operations": {
                "command": "uvx",
                "args": [
                    "https://github.com/strawgate/mcp-many-files.git"
                ]
            }
        }
    }
}

Roo Code / Cline McpServer Usage

Simply add the following to your McpServer configuration. Edit the AlwaysAllow list to include the tools you want to use without confirmation.

    "Filesystem Operations": {
      "command": "uvx",
      "args": [
        "https://github.com/strawgate/mcp-many-files.git"
      ],
      "alwaysAllow": [
        "file_read",
        "file_create",
        "file_append",
        "file_erase",
        "file_move",
        "file_delete",
        "folder_create",
        "folder_contents",
        "folder_move",
        "folder_delete",
        "folder_empty",
        "call_tool_bulk",
        "call_tools_bulk"
      ]
    },

Development

  1. Clone the repository:
    # Replace with the actual repository URL
    git clone https://github.com/strawgate/filesystem-operations-mcp.git
    cd filesystem-operations-mcp
  2. Create a virtual environment and install dependencies:
    uv venv
    source .venv/bin/activate
    uv sync --extra dev
  3. Run the server locally for testing:
    python -m filesystem-operations-mcp.server
    # or using the installed script
    filesystem-operations-mcp

You can also debug with vscode via the built in debug launch configuration. To point your MCP Client to this local server, use the following MCP server configuration:

"filesystem_operations_mcp": {
  "url": "http://localhost:8000/sse",
  "disabled": true,
  "autoApprove": [],
  "timeout": 30,
  "alwaysAllow": []
}

You can also set your uvx command to point to a branch on the repository via `"git+https://github.com/strawgate/filesystem-operations-mcp@branch-name"`.

filesystem-operations-mcp FAQ

How does call_tool_bulk improve filesystem operations?
It allows calling a single registered tool multiple times in one request, reducing overhead and speeding up batch tasks.
What is the benefit of call_tools_bulk?
It enables calling multiple different tools with varied arguments in a single request, optimizing complex workflows.
How does centralized exception handling work in this server?
It captures and manages errors from filesystem operations centrally, ensuring robust and predictable behavior.
Can this server handle reading thousands of files at once?
Yes, it is optimized for high-throughput bulk file reading and operations.
Is this server compatible with multiple MCP clients?
Yes, it is designed to integrate seamlessly with various MCP clients for diverse workflows.
What types of filesystem operations are supported?
Primarily bulk reading and calling registered file operation tools, with extensibility for other file/folder tasks.
How do I add new bulk tools to this server?
Follow the FastMCP guidelines at https://github.com/jlowin/fastmcp/pull/215 to add custom bulk tools.
Does this server support error reporting for individual file operations?
Yes, errors are handled centrally but can be reported per operation for detailed diagnostics.