home / mcp / file system mcp server

File System MCP Server

A comprehensive MCP (Model Context Protocol) server for file system operations, providing Claude and other AI assistants with access to local files and directories.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "calebmwelsh-file-system-mcp-server": {
      "command": "/absolute/path/to/python",
      "args": [
        "/absolute/path/to/file-system-mcp-server/fs_server.py"
      ]
    }
  }
}

The File System MCP Server provides a structured, automation-friendly way to perform common file and directory operations through a FastMCP-based API. You can copy, move, delete, read, and write files, manage directories, and retrieve system and disk information, all from a consistent interface that works across supported platforms. This makes it ideal for automating workflows, integrating with other tools, and building repos or CI pipelines around file-system tasks.

How to use

You use the server by connecting an MCP client to the local or remote MCP endpoint and calling the available file-system operations. The server exposes a rich set of actions for files, directories, and system information, which you can combine in scripts or workflows to manage data, organize assets, or perform automated checks.

How to install

Prerequisites you need before installing include Python and pip. You will also require a working FastMCP-based environment if you plan to run this server as part of an MCP ecosystem.

Step by step commands to set up and run the server locally:

1. Set up a Python virtual environment and activate it.

2. Install required dependencies.

3. Run the server using Python.

Configuration and runtime details

To run the File System MCP Server from a local Python process, you can use the following configuration snippet for an MCP client that launches the server as a stdio process. This demonstrates how to start the Python interpreter and point it to the server script.

Security and reliability notes

All file operations include path validation. Destructive operations back up files before proceeding. Access to system information is restricted to safe operations to reduce exposure. Handle the server in trusted environments only.

Troubleshooting and tips

If you encounter issues with file deletion or drive detection, verify permissions and ensure the target paths exist. Check that the server has the appropriate privileges on the host OS and that the runtime environment matches the platform requirements.

Example integration with an MCP client

{
  "mcpServers": {
    "file_system": {
      "command": "/absolute/path/to/python",
      "args": [
        "/absolute/path/to/file-system-mcp-server/fs_server.py"
      ]
    }
  }
}

Available tools

copy_file

Copy a file with optional backup before overwriting the destination.

move_file

Move a file with optional backup before transferring to the new location.

delete_file

Delete a file with safety checks to prevent unintended removals.

read_file

Read the contents of a file and return the data.

write_file

Write content to a file, creating or replacing the target as needed.

get_file_info

Retrieve detailed information about a file such as size and timestamps.

search_files

Search for files by name pattern within a directory hierarchy.

create_collection

Create a collection object that groups related files for batch operations.

list_directory

List the contents of a directory.

create_directory

Create a new directory at the specified path.

delete_directory

Delete a directory and its contents with safety checks.

list_directory_recursively

Show directory contents in a tree-like recursive structure.

search_directories

Search for directories by name pattern.

get_system_info

Return high-level information about the host system (OS, CPU, memory).

get_disk_info

Report disk usage including total, used, and free space.

get_directory_info

Provide statistics for a given directory such as file count and total size.