Local File Organizer

by diganto-deb

Not rated
GitHub

About

Automatically organizes files by categorizing them based on extensions while preserving project structures for efficient directory management and backup preparation.

Details

Author
diganto-deb
Repository
diganto-deb/local_file_organizer
Categories
Productivity, Developer Tools, File Management, Media, Project Management, Infrastructure

- Directory Security: Only operates on explicitly allowed directories
- Smart Categorization: Organizes files by extension into categories:
- Documents (PDF, DOC, DOCX, TXT, RTF, MD, HTML, JSON, CSV, etc.)
- Images (JPG, PNG, GIF, SVG, WEBP, HEIC, etc.)
- Videos (MP4, MOV, AVI, MKV, etc.)
- Audio (MP3, WAV, OGG, FLAC, etc.)
- Archives (ZIP, RAR, 7Z, TAR, etc.)
- Code (PY, JS, HTML, CSS, Java, etc.)
- Applications (DMG, EXE, MSI, etc.)
- Others (uncategorized file types)
- Project Detection: Identifies project directories to avoid disrupting code repositories
- Recursive Processing: Can analyze and organize nested directory structures
- Resource-Efficient: Optimized for performance with large directory structures
- Detailed Analytics: Provides insights into file distribution by type

The following features are planned for upcoming releases:

1. File Write and Edit Functionality: Add capabilities to:
- Modify file contents directly
- Create new files with templates
- Batch rename files using patterns
- Edit file metadata

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Local File Organizer
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @modelcontextprotocol/server-filesystem
    • Argument 3 /path/to/organize/dir1
    • Argument 4 /path/to/organize/dir2

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

pip install -r requirements.txt


Create or modify the .cursor/mcp.json file in your project directory:

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

Replace the paths with the directories you want to allow the MCP server to access.

list_categories

List all available categories for file organization.

analyze_directory

Analyze a directory without making changes. Parameters: directory_path (string)

create_category_directories

Create category folders in a target directory. Parameters: target_directory (string)

organize_files

Organize files by type in a specified directory. Parameters: directory_path (string)

search_files

Search for files in a specified directory matching a pattern. Parameters: directory_path (string), file_pattern (string)

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "local file organizer": {
            "cwd": ".cursor",
            "env": {},
            "args": [
                "-y",
                "@modelcontextprotocol/server-filesystem",
                "/path/to/organize/dir1",
                "/path/to/organize/dir2"
            ],
            "shell": false,
            "command": "npx"
        }
    }
}

Linux

{
    "cwd": ".cursor",
    "env": [],
    "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/path/to/organize/dir1",
        "/path/to/organize/dir2"
    ],
    "shell": false,
    "command": "npx"
}

Macos

{
    "cwd": ".cursor",
    "env": [],
    "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/path/to/organize/dir1",
        "/path/to/organize/dir2"
    ],
    "shell": false,
    "command": "npx"
}

Windows

{
    "cwd": ".cursor",
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/path/to/organize/dir1",
        "/path/to/organize/dir2"
    ],
    "shell": false,
    "command": "cmd"
}

Local File Organizer

A Python-based file organization system that leverages the Model Context Protocol (MCP) to safely organize and manage files across directories.

Overview

This project implements a file organization system using the Model Context Protocol (MCP) framework to:

1. Safely access user-specified directories through robust permission checking
2. Automatically organize files by type into categorized directories
3. Search for files across allowed directories
4. Analyze directory contents and provide detailed file information

Key Features

- Directory Security: Only operates on explicitly allowed directories
- Smart Categorization: Organizes files by extension into categories:
- Documents (PDF, DOC, DOCX, TXT, RTF, MD, HTML, JSON, CSV, etc.)
- Images (JPG, PNG, GIF, SVG, WEBP, HEIC, etc.)
- Videos (MP4, MOV, AVI, MKV, etc.)
- Audio (MP3, WAV, OGG, FLAC, etc.)
- Archives (ZIP, RAR, 7Z, TAR, etc.)
- Code (PY, JS, HTML, CSS, Java, etc.)
- Applications (DMG, EXE, MSI, etc.)
- Others (uncategorized file types)
- Project Detection: Identifies project directories to avoid disrupting code repositories
- Recursive Processing: Can analyze and organize nested directory structures
- Resource-Efficient: Optimized for performance with large directory structures
- Detailed Analytics: Provides insights into file distribution by type

Installation

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.