file-organizer-mcp 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -5
- package/README.md +156 -29
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [3.1.
|
|
3
|
+
## [3.1.1] - 2026-02-06
|
|
4
4
|
|
|
5
5
|
### ✨ New Features
|
|
6
6
|
- **Interactive Setup Wizard**: New TUI-based setup (`npx file-organizer-mcp --setup`) for easy configuration of folders, conflict strategies, and Claude Desktop integration.
|
|
@@ -8,13 +8,19 @@
|
|
|
8
8
|
- Organization by Year/Month for images and videos.
|
|
9
9
|
- Organization by Artist/Album for audio files.
|
|
10
10
|
- New tool `file_organizer_inspect_metadata` for safe metadata extraction.
|
|
11
|
-
- **
|
|
12
|
-
- New tools
|
|
13
|
-
- Cron-based scheduling
|
|
11
|
+
- **Smart Scheduling & Watch Mode**:
|
|
12
|
+
- New tools: `file_organizer_watch_directory`, `file_organizer_unwatch_directory`, `file_organizer_list_watches`.
|
|
13
|
+
- Cron-based scheduling for automatic organization (e.g., `"0 10 * * *"` for daily at 10am).
|
|
14
|
+
- Per-directory configuration with independent schedules.
|
|
15
|
+
- `min_file_age_minutes` - Skip files newer than X minutes (prevents organizing in-progress downloads).
|
|
16
|
+
- `max_files_per_run` - Limit files processed per scheduled run.
|
|
17
|
+
- Hot-reload configuration without server restart.
|
|
14
18
|
- **Batch Renaming**: New powerful `file_organizer_batch_rename` tool.
|
|
15
19
|
|
|
16
20
|
### 🛡️ Improvements
|
|
17
|
-
- **
|
|
21
|
+
- **Conflict Strategy**: Configurable default conflict resolution (`rename`/`skip`/`overwrite`) via config.
|
|
22
|
+
- **Security Check**: Enforced stricter validation for symlink security with explicit `lstat` checks.
|
|
23
|
+
- **Config Management**: Deep merge updates preserve existing settings when adding new configuration.
|
|
18
24
|
- **Free Models**: Updated default configuration to prioritize free models.
|
|
19
25
|
|
|
20
26
|
### 🐛 Fixed
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# <a id="file-organizer-mcp-server"></a>File Organizer MCP Server 🗂️
|
|
2
2
|
|
|
3
|
-
**Version:** 3.1.
|
|
3
|
+
**Version:** 3.1.1 | **MCP Protocol:** 2024-11-05 | **Node:** ≥18.0.0
|
|
4
4
|
|
|
5
5
|
[Quick Start](#quick-start) • [Features](#features) • [Tools](#tools-reference) • [Examples](#example-workflows) • [API](API.md) • [Security](#security-configuration) • [Architecture](ARCHITECTURE.md)
|
|
6
6
|
|
|
@@ -57,10 +57,20 @@ Add to `claude_desktop_config.json`:
|
|
|
57
57
|
|
|
58
58
|
### First Steps
|
|
59
59
|
|
|
60
|
-
1. **
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
1. **Run the Setup Wizard (Recommended)**
|
|
61
|
+
```bash
|
|
62
|
+
npx file-organizer-mcp --setup
|
|
63
|
+
```
|
|
64
|
+
This interactive wizard helps you:
|
|
65
|
+
- Select folders to organize
|
|
66
|
+
- Set your preferred conflict strategy
|
|
67
|
+
- Configure auto-organize schedules
|
|
68
|
+
- Generate Claude Desktop config
|
|
69
|
+
|
|
70
|
+
2. **Restart Claude Desktop**
|
|
71
|
+
3. Try: `"Scan my Downloads folder"`
|
|
72
|
+
4. Then: `"Show me the largest files"`
|
|
73
|
+
5. Finally: `"Organize my files — preview first"`
|
|
64
74
|
|
|
65
75
|
---
|
|
66
76
|
|
|
@@ -69,20 +79,22 @@ Add to `claude_desktop_config.json`:
|
|
|
69
79
|
### Core Functionality
|
|
70
80
|
|
|
71
81
|
* **🤖 Auto-categorization** - Intelligently organizes files into 12+ categories
|
|
82
|
+
* **📅 Smart Scheduling** - Cron-based automatic organization with per-directory configuration
|
|
72
83
|
* **🔍 Duplicate Detection** - Finds duplicate files using SHA-256 content hashing
|
|
73
84
|
* **🏷️ Smart Metadata** - Extracts EXIF/ID3 tags for content-aware organization
|
|
74
85
|
* **✏️ Batch Renaming** - Flexible renaming with patterns, regex, and case conversion
|
|
75
|
-
* **🛡️ Smart Conflict Resolution** - Handles filename conflicts
|
|
86
|
+
* **🛡️ Smart Conflict Resolution** - Handles filename conflicts (rename/skip/overwrite)
|
|
76
87
|
* **👁️ Dry Run Mode** - Preview changes before executing
|
|
77
|
-
* **👀 File Watching** -
|
|
88
|
+
* **👀 File Watching** - Watch directories and auto-organize on schedule
|
|
89
|
+
* **⏱️ Age-Based Filtering** - Skip files newer than X minutes (prevents organizing in-progress downloads)
|
|
78
90
|
* **📊 Comprehensive Scanning** - Detailed directory analysis with statistics
|
|
79
91
|
* **📈 Space Analysis** - Quickly identify space-consuming files
|
|
80
92
|
* **⏮️ Rollback Support** - Undo file organization operations
|
|
81
93
|
* **⚛️ Safe Atomic Moves** - Uses `COPYFILE_EXCL` to prevent race conditions during file moves
|
|
82
94
|
* **💾 Automatic Backups** - Safely backs up files before overwriting to `.file-organizer-backups`
|
|
83
|
-
* **📝 Structured Logging** - JSON-formatted logs with configurable log levels
|
|
84
|
-
* **📜 Audit Trail** - Complete logging of all
|
|
85
|
-
* **💻 Multi-Platform Support** - Native support for Windows, macOS, and Linux
|
|
95
|
+
* **📝 Structured Logging** - JSON-formatted logs with configurable log levels
|
|
96
|
+
* **📜 Audit Trail** - Complete logging of all operations for transparency
|
|
97
|
+
* **💻 Multi-Platform Support** - Native support for Windows, macOS, and Linux
|
|
86
98
|
|
|
87
99
|
### Security Features
|
|
88
100
|
|
|
@@ -111,24 +123,25 @@ This server implements a multi-layered security architecture designed to operate
|
|
|
111
123
|
- **Race Condition Mitigation**: Uses atomic copy-then-delete strategy to prevent data loss if a file is modified during a move operation.
|
|
112
124
|
- **Safe Overwrites**: When `conflict_strategy: 'overwrite'` is used, the existing file is moved to a timestamped backup folder before replacement.
|
|
113
125
|
|
|
114
|
-
### 🚀
|
|
126
|
+
### 🚀 Features Overview
|
|
115
127
|
|
|
116
|
-
### ⚙️ Interactive
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
- **🤖 Claude Integration
|
|
128
|
+
### ⚙️ Interactive Setup Wizard
|
|
129
|
+
Run `npx file-organizer-mcp --setup` for guided configuration:
|
|
130
|
+
- **📁 Folder Selection** - Interactively choose folders to manage
|
|
131
|
+
- **⚡ Conflict Handling** - Set default rename/skip/overwrite strategy
|
|
132
|
+
- **📅 Schedule Setup** - Configure automatic organization schedules
|
|
133
|
+
- **🤖 Claude Integration** - Auto-generates `claude_desktop_config.json`
|
|
122
134
|
|
|
123
135
|
### What's New in v3.1.0
|
|
124
136
|
|
|
125
137
|
**New Features:**
|
|
126
|
-
* **🧙 Interactive Setup Wizard** - Run `npx file-organizer-mcp --setup` for
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
138
|
+
* **🧙 Interactive Setup Wizard** - Run `npx file-organizer-mcp --setup` for guided configuration
|
|
139
|
+
* **📅 Smart Scheduling** - Cron-based watch mode with `file_organizer_watch_directory`
|
|
140
|
+
* **⏱️ Age Filtering** - Skip recently modified files during auto-organization
|
|
141
|
+
* **🎵 Smart Metadata** - Organize images by Year/Month and audio by Artist/Album
|
|
142
|
+
* **🏷️ Batch Renaming** - Bulk renaming with patterns, regex, and numbering
|
|
143
|
+
* **⚙️ Conflict Strategy** - Configurable default conflict resolution
|
|
144
|
+
* **🛡️ Enhanced Security** - Improved symlink detection and path validation
|
|
132
145
|
|
|
133
146
|
See [CHANGELOG.md](CHANGELOG.md) for full details.
|
|
134
147
|
|
|
@@ -333,6 +346,64 @@ file_organizer_batch_rename({
|
|
|
333
346
|
|
|
334
347
|
---
|
|
335
348
|
|
|
349
|
+
### Watch & Schedule Tools
|
|
350
|
+
|
|
351
|
+
#### `file_organizer_watch_directory`
|
|
352
|
+
|
|
353
|
+
Add a directory to the automatic organization watch list with cron-based scheduling.
|
|
354
|
+
Files will be automatically organized based on the schedule you set.
|
|
355
|
+
|
|
356
|
+
**Parameters:**
|
|
357
|
+
- `directory` (string, required) - Full path to the directory to watch
|
|
358
|
+
- `schedule` (string, required) - Cron expression (e.g., `"0 10 * * *"` for daily at 10am)
|
|
359
|
+
- `auto_organize` (boolean, optional) - Enable auto-organization (default: true)
|
|
360
|
+
- `min_file_age_minutes` (number, optional) - Only organize files older than X minutes
|
|
361
|
+
- `max_files_per_run` (number, optional) - Maximum files to process per run
|
|
362
|
+
- `response_format` ('json'|'markdown', optional) - Output format
|
|
363
|
+
|
|
364
|
+
**Cron Expression Examples:**
|
|
365
|
+
| Expression | Schedule |
|
|
366
|
+
|------------|----------|
|
|
367
|
+
| `0 10 * * *` | Daily at 10:00 AM |
|
|
368
|
+
| `*/30 * * * *` | Every 30 minutes |
|
|
369
|
+
| `0 */6 * * *` | Every 6 hours |
|
|
370
|
+
| `0 9 * * 1` | Every Monday at 9:00 AM |
|
|
371
|
+
| `0 0 * * 0` | Weekly on Sunday at midnight |
|
|
372
|
+
|
|
373
|
+
**Example:**
|
|
374
|
+
```typescript
|
|
375
|
+
// Watch Downloads folder - organize daily at 9am, files must be 5+ minutes old
|
|
376
|
+
file_organizer_watch_directory({
|
|
377
|
+
directory: "/Users/john/Downloads",
|
|
378
|
+
schedule: "0 9 * * *",
|
|
379
|
+
min_file_age_minutes: 5,
|
|
380
|
+
max_files_per_run: 100
|
|
381
|
+
})
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
#### `file_organizer_unwatch_directory`
|
|
387
|
+
|
|
388
|
+
Remove a directory from the watch list.
|
|
389
|
+
|
|
390
|
+
**Parameters:**
|
|
391
|
+
- `directory` (string, required) - Full path to remove from watch list
|
|
392
|
+
- `response_format` ('json'|'markdown', optional) - Output format
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
#### `file_organizer_list_watches`
|
|
397
|
+
|
|
398
|
+
List all directories currently being watched with their schedules.
|
|
399
|
+
|
|
400
|
+
**Parameters:**
|
|
401
|
+
- `response_format` ('json'|'markdown', optional) - Output format
|
|
402
|
+
|
|
403
|
+
**Returns:** List of watched directories with schedules and rules
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
336
407
|
### Utility Tools
|
|
337
408
|
|
|
338
409
|
#### `file_organizer_get_categories`
|
|
@@ -481,6 +552,36 @@ Result: Clear visibility into space usage with actionable insights
|
|
|
481
552
|
|
|
482
553
|
---
|
|
483
554
|
|
|
555
|
+
### Workflow 5: Set Up Automatic Organization
|
|
556
|
+
|
|
557
|
+
```
|
|
558
|
+
User: "Claude, automatically organize my Downloads folder every day at 9am"
|
|
559
|
+
|
|
560
|
+
Claude:
|
|
561
|
+
1. Sets up watch directory →
|
|
562
|
+
file_organizer_watch_directory({
|
|
563
|
+
directory: "/Users/john/Downloads",
|
|
564
|
+
schedule: "0 9 * * *",
|
|
565
|
+
min_file_age_minutes: 5
|
|
566
|
+
})
|
|
567
|
+
2. Confirms setup → "Downloads folder will be organized daily at 9:00 AM"
|
|
568
|
+
3. Shows current watches → Lists all watched directories
|
|
569
|
+
|
|
570
|
+
User: "Also watch my Desktop folder every hour"
|
|
571
|
+
|
|
572
|
+
Claude:
|
|
573
|
+
4. Adds second watch →
|
|
574
|
+
file_organizer_watch_directory({
|
|
575
|
+
directory: "/Users/john/Desktop",
|
|
576
|
+
schedule: "0 * * * *",
|
|
577
|
+
max_files_per_run: 50
|
|
578
|
+
})
|
|
579
|
+
|
|
580
|
+
Result: Automatic background organization with smart scheduling
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
---
|
|
584
|
+
|
|
484
585
|
## <a id="security-configuration"></a>Security Configuration 🔐
|
|
485
586
|
|
|
486
587
|
### Security Score: 10/10 🌟
|
|
@@ -510,7 +611,7 @@ To prevent accidents, the following are **always blocked**, even if added to con
|
|
|
510
611
|
|
|
511
612
|
### ⚙️ Custom Configuration
|
|
512
613
|
|
|
513
|
-
You can
|
|
614
|
+
You can customize behavior by editing the user configuration file.
|
|
514
615
|
|
|
515
616
|
**Config Location:**
|
|
516
617
|
* **Windows:** `%APPDATA%\file-organizer-mcp\config.json`
|
|
@@ -526,17 +627,43 @@ You can allow access to additional folders by editing the user configuration fil
|
|
|
526
627
|
"customAllowedDirectories": [
|
|
527
628
|
"C:\\Users\\Name\\My Special Folder",
|
|
528
629
|
"D:\\Backups"
|
|
529
|
-
]
|
|
530
|
-
"settings": {
|
|
531
|
-
"maxScanDepth": 10,
|
|
532
|
-
"logAccess": true
|
|
533
|
-
}
|
|
630
|
+
]
|
|
534
631
|
}
|
|
535
632
|
```
|
|
536
633
|
> 💡 **Tip:** You can copy a folder path directly from your file explorer's address bar and paste it into `customAllowedDirectories`.
|
|
537
634
|
|
|
538
635
|
3. Restart Claude Desktop.
|
|
539
636
|
|
|
637
|
+
### Conflict Strategy
|
|
638
|
+
|
|
639
|
+
Set your preferred default conflict resolution strategy:
|
|
640
|
+
|
|
641
|
+
```json
|
|
642
|
+
{
|
|
643
|
+
"conflictStrategy": "rename"
|
|
644
|
+
}
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
Available strategies:
|
|
648
|
+
- `"rename"` (default) - Renames new file (e.g., `file (1).txt`)
|
|
649
|
+
- `"skip"` - Keeps existing file, skips new one
|
|
650
|
+
- `"overwrite"` - Replaces existing file (creates backup first)
|
|
651
|
+
|
|
652
|
+
### Auto-Organize Schedule (Legacy)
|
|
653
|
+
|
|
654
|
+
Simple schedule configuration (for basic hourly/daily/weekly):
|
|
655
|
+
|
|
656
|
+
```json
|
|
657
|
+
{
|
|
658
|
+
"autoOrganize": {
|
|
659
|
+
"enabled": true,
|
|
660
|
+
"schedule": "daily"
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
For advanced cron-based scheduling, use the `file_organizer_watch_directory` tool.
|
|
666
|
+
|
|
540
667
|
### Security Defenses
|
|
541
668
|
|
|
542
669
|
| Attack Type | Protection Mechanism | Status |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "file-organizer-mcp",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "Intelligent file organization MCP server for Claude with security-hardened operations, auto-categorization, and duplicate detection",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|