Home / MCP / Local File Organizer MCP Server

Local File Organizer MCP Server

A Python-based MCP server that safely organizes and analyzes files by type across allowed directories.

typescript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "filesystem": {
            "command": "npx",
            "args": [
                "-y",
                "@modelcontextprotocol/server-filesystem",
                "/path/to/organize/dir1",
                "/path/to/organize/dir2"
            ]
        }
    }
}

You can safely organize and analyze files across multiple directories using an MCP-backed file organizer. It leverages the Model Context Protocol to enforce permission checks, categorize files by type, and provide detailed analytics, all while keeping control firmly in your hands over which folders are accessible.

How to use

You will enable an MCP server that runs a filesystem-backed component to perform operations like listing categories, analyzing directories, creating category folders, organizing files by type, and searching for files. Use the MCP client in your environment to call the available commands and to manage access to your allowed directories.

How to install

Prerequisites: Python (and pip) are required to install and run dependencies for this project.

Clone the project repository to your workspace.

Install the required Python packages listed in the dependencies file.

Set up and run the MCP-backed filesystem server as described in the usage steps below.

Configure Allowed Directories and Enable the MCP Server

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/path/to/organize/dir1",
        "/path/to/organize/dir2"
      ]
    }
  }
}

Use File Organization Commands

Once the MCP server is enabled, you can run the following commands through your MCP client or integrated editor extension to manage files.

# List all available categories
list_categories

# Analyze a directory without making changes
analyze_directory /path/to/directory

# Create category folders in a target directory
create_category_directories /path/to/target

# Organize files by type
organize_files /path/to/directory

# Search for files
search_files /path/to/directory "*.jpg"

Notes on security and usage

The system operates only on directories you explicitly allow, providing safe access controls and project-detection features to avoid disrupting code repositories. It can recursively process nested directories and offers detailed analytics about file distribution by type.

Available tools

list_categories

List all available file categories to understand how files can be grouped.

analyze_directory

Scan a directory to analyze its contents and report details without making changes.

create_category_directories

Create the top-level folders for each file category in a target directory.

organize_files

Move or relocate files into their respective category folders based on file type.

search_files

Search for files within a directory that match a given pattern.