file-organizer-mcp 3.0.0 → 3.1.0
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/ARCHITECTURE.md +0 -1
- package/CHANGELOG.md +27 -4
- package/CONTRIBUTING.md +4 -3
- package/MIGRATION.md +1 -1
- package/README.md +87 -47
- package/dist/config.d.ts +64 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +90 -17
- package/dist/config.js.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +84 -0
- package/dist/index.js.map +1 -1
- package/dist/schemas/rename.schemas.d.ts +95 -0
- package/dist/schemas/rename.schemas.d.ts.map +1 -0
- package/dist/schemas/rename.schemas.js +39 -0
- package/dist/schemas/rename.schemas.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +87 -28
- package/dist/server.js.map +1 -1
- package/dist/services/auto-organize.service.d.ts +88 -0
- package/dist/services/auto-organize.service.d.ts.map +1 -0
- package/dist/services/auto-organize.service.js +269 -0
- package/dist/services/auto-organize.service.js.map +1 -0
- package/dist/services/categorizer.service.d.ts.map +1 -1
- package/dist/services/categorizer.service.js +27 -1
- package/dist/services/categorizer.service.js.map +1 -1
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +1 -0
- package/dist/services/index.js.map +1 -1
- package/dist/services/metadata.service.d.ts +36 -0
- package/dist/services/metadata.service.d.ts.map +1 -0
- package/dist/services/metadata.service.js +212 -0
- package/dist/services/metadata.service.js.map +1 -0
- package/dist/services/organizer.service.d.ts +3 -1
- package/dist/services/organizer.service.d.ts.map +1 -1
- package/dist/services/organizer.service.js +28 -5
- package/dist/services/organizer.service.js.map +1 -1
- package/dist/services/path-validator.service.d.ts +1 -0
- package/dist/services/path-validator.service.d.ts.map +1 -1
- package/dist/services/path-validator.service.js +42 -6
- package/dist/services/path-validator.service.js.map +1 -1
- package/dist/services/renaming.service.d.ts +39 -0
- package/dist/services/renaming.service.d.ts.map +1 -0
- package/dist/services/renaming.service.js +296 -0
- package/dist/services/renaming.service.js.map +1 -0
- package/dist/services/rollback.service.js +2 -2
- package/dist/services/rollback.service.js.map +1 -1
- package/dist/tools/file-organization.d.ts +5 -0
- package/dist/tools/file-organization.d.ts.map +1 -1
- package/dist/tools/file-organization.js +23 -2
- package/dist/tools/file-organization.js.map +1 -1
- package/dist/tools/file-renaming.d.ts +65 -0
- package/dist/tools/file-renaming.d.ts.map +1 -0
- package/dist/tools/file-renaming.js +148 -0
- package/dist/tools/file-renaming.js.map +1 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +12 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/metadata-inspection.d.ts +41 -0
- package/dist/tools/metadata-inspection.d.ts.map +1 -0
- package/dist/tools/metadata-inspection.js +220 -0
- package/dist/tools/metadata-inspection.js.map +1 -0
- package/dist/tools/organization-preview.d.ts +5 -0
- package/dist/tools/organization-preview.d.ts.map +1 -1
- package/dist/tools/organization-preview.js +23 -3
- package/dist/tools/organization-preview.js.map +1 -1
- package/dist/tools/watch.tool.d.ts +48 -0
- package/dist/tools/watch.tool.d.ts.map +1 -0
- package/dist/tools/watch.tool.js +329 -0
- package/dist/tools/watch.tool.js.map +1 -0
- package/dist/tui/index.d.ts +9 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +17 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/screens.d.ts +2 -0
- package/dist/tui/screens.d.ts.map +1 -0
- package/dist/tui/screens.js +3 -0
- package/dist/tui/screens.js.map +1 -0
- package/dist/tui/setup-wizard.d.ts +5 -0
- package/dist/tui/setup-wizard.d.ts.map +1 -0
- package/dist/tui/setup-wizard.js +229 -0
- package/dist/tui/setup-wizard.js.map +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +16 -4
package/ARCHITECTURE.md
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.1.0] - 2026-02-06
|
|
4
|
+
|
|
5
|
+
### ✨ New Features
|
|
6
|
+
- **Interactive Setup Wizard**: New TUI-based setup (`npx file-organizer-mcp --setup`) for easy configuration of folders, conflict strategies, and Claude Desktop integration.
|
|
7
|
+
- **Smart Metadata Organization**:
|
|
8
|
+
- Organization by Year/Month for images and videos.
|
|
9
|
+
- Organization by Artist/Album for audio files.
|
|
10
|
+
- New tool `file_organizer_inspect_metadata` for safe metadata extraction.
|
|
11
|
+
- **File Watching**:
|
|
12
|
+
- New tools (`watch_directory`, `unwatch_directory`, `list_watches`) to schedule automatic organization.
|
|
13
|
+
- Cron-based scheduling support.
|
|
14
|
+
- **Batch Renaming**: New powerful `file_organizer_batch_rename` tool.
|
|
15
|
+
|
|
16
|
+
### 🛡️ Improvements
|
|
17
|
+
- **Security Check**: Enforced stricter validation for symlink security.
|
|
18
|
+
- **Free Models**: Updated default configuration to prioritize free models.
|
|
19
|
+
|
|
20
|
+
### 🐛 Fixed
|
|
21
|
+
- Resolved JSON configuration errors.
|
|
22
|
+
- Fixed Cloud Authentication issues.
|
|
23
|
+
- Fixed server disconnection stability issues.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
3
27
|
## [3.0.0] - 2026-02-02
|
|
4
28
|
|
|
5
29
|
### 🚀 Major: Full TypeScript Migration
|
|
@@ -8,7 +32,7 @@ Complete rewrite from monolithic JavaScript to modular TypeScript architecture.
|
|
|
8
32
|
|
|
9
33
|
### ✨ Added
|
|
10
34
|
|
|
11
|
-
|
|
35
|
+
#### Architecture
|
|
12
36
|
- New `src/` directory structure with layered architecture
|
|
13
37
|
- TypeScript strict mode with full type safety
|
|
14
38
|
- ESLint + Prettier configuration for code quality
|
|
@@ -43,7 +67,7 @@ Complete rewrite from monolithic JavaScript to modular TypeScript architecture.
|
|
|
43
67
|
- Runtime validation with descriptive error messages
|
|
44
68
|
- Type inference from schemas
|
|
45
69
|
|
|
46
|
-
|
|
70
|
+
#### Testing
|
|
47
71
|
- Comprehensive unit tests for all services
|
|
48
72
|
- Integration tests for complete workflows
|
|
49
73
|
- Performance benchmarks
|
|
@@ -76,7 +100,6 @@ Complete rewrite from monolithic JavaScript to modular TypeScript architecture.
|
|
|
76
100
|
- `eslint`, `prettier`, `rimraf`
|
|
77
101
|
- `jest` for testing
|
|
78
102
|
|
|
79
|
-
|
|
80
103
|
---
|
|
81
104
|
|
|
82
105
|
## [3.0.0-beta.1] - 2026-02-02
|
|
@@ -117,4 +140,4 @@ If you were using `../` paths (which was a security bug), those now correctly fa
|
|
|
117
140
|
---
|
|
118
141
|
|
|
119
142
|
## [2.1.0] - 2026-02-01
|
|
120
|
-
(Previous version with path traversal vulnerability - UPGRADE IMMEDIATELY)
|
|
143
|
+
(Previous version with path traversal vulnerability - UPGRADE IMMEDIATELY)
|
package/CONTRIBUTING.md
CHANGED
|
@@ -8,9 +8,9 @@ This project prioritizes security. All contributions must maintain or improve th
|
|
|
8
8
|
|
|
9
9
|
### Reporting Security Vulnerabilities
|
|
10
10
|
|
|
11
|
-
**⚠️ DO NOT open public issues for security vulnerabilities**
|
|
11
|
+
> **⚠️ DO NOT open public issues for security vulnerabilities**
|
|
12
12
|
|
|
13
|
-
Instead, email security concerns to:
|
|
13
|
+
Instead, email security concerns to: **<technocratix902@gmail.com>**
|
|
14
14
|
|
|
15
15
|
We will respond within 48 hours and work with you to address the issue.
|
|
16
16
|
|
|
@@ -179,6 +179,7 @@ throw new Error(`Invalid path: ${internalPath}`);
|
|
|
179
179
|
### 1. Create an Issue
|
|
180
180
|
|
|
181
181
|
Before starting work, create an issue describing:
|
|
182
|
+
|
|
182
183
|
- The problem or feature request
|
|
183
184
|
- Proposed solution (if applicable)
|
|
184
185
|
- Any breaking changes
|
|
@@ -299,7 +300,7 @@ Before submitting your PR, ensure:
|
|
|
299
300
|
|
|
300
301
|
- **Questions**: Open a discussion on GitHub
|
|
301
302
|
- **Issues**: Check existing issues or create new one
|
|
302
|
-
- **Email**: technocratix902@gmail.com
|
|
303
|
+
- **Email**: <technocratix902@gmail.com>
|
|
303
304
|
|
|
304
305
|
## 🙏 Recognition
|
|
305
306
|
|
package/MIGRATION.md
CHANGED
|
@@ -344,7 +344,7 @@ When reporting issues, include:
|
|
|
344
344
|
- **Advanced duplicate detection** - Fuzzy matching, content similarity
|
|
345
345
|
- **Performance mode** - Skip security checks for trusted paths
|
|
346
346
|
|
|
347
|
-
## 🎉 Migration Complete
|
|
347
|
+
## 🎉 Migration Complete
|
|
348
348
|
|
|
349
349
|
If you've followed all steps, you're now running File Organizer MCP v3.0 with enhanced security and reliability.
|
|
350
350
|
|
package/README.md
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
# File Organizer MCP Server 🗂️
|
|
1
|
+
# <a id="file-organizer-mcp-server"></a>File Organizer MCP Server 🗂️
|
|
2
2
|
|
|
3
|
-
**Version:** 3.
|
|
3
|
+
**Version:** 3.1.0 | **MCP Protocol:** 2024-11-05 | **Node:** ≥18.0.0
|
|
4
4
|
|
|
5
|
-
[Quick Start](
|
|
5
|
+
[Quick Start](#quick-start) • [Features](#features) • [Tools](#tools-reference) • [Examples](#example-workflows) • [API](API.md) • [Security](#security-configuration) • [Architecture](ARCHITECTURE.md)
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
[](https://www.npmjs.com/package/file-organizer-mcp)
|
|
9
|
+
[](https://www.npmjs.com/package/file-organizer-mcp)
|
|
11
10
|
[](https://www.npmjs.com/package/file-organizer-mcp)
|
|
12
11
|
[](https://github.com/kridaydave/File-Organizer-MCP)
|
|
13
12
|
[](https://nodejs.org)
|
|
14
13
|
[](LICENSE)
|
|
15
|
-
[](tests/)
|
|
16
15
|
|
|
17
|
-
**A powerful, security-hardened Model Context Protocol (MCP) server for intelligent file organization with Claude**
|
|
16
|
+
> **A powerful, security-hardened Model Context Protocol (MCP) server for intelligent file organization with Claude**
|
|
18
17
|
|
|
19
18
|
🎯 [Install from MCP Registry](https://registry.modelcontextprotocol.io/servers/io.github.kridaydave/file-organizer) • 📦 [View on NPM](https://www.npmjs.com/package/file-organizer-mcp) • 🐛 [Report Issues](https://github.com/kridaydave/File-Organizer-MCP/issues)
|
|
20
19
|
|
|
21
20
|
---
|
|
22
21
|
|
|
23
|
-
##
|
|
22
|
+
## <a id="quick-start"></a>Quick Start 🚀
|
|
24
23
|
|
|
25
24
|
### Installation
|
|
26
25
|
|
|
@@ -30,6 +29,9 @@ npm install -g file-organizer-mcp
|
|
|
30
29
|
|
|
31
30
|
# Option 2: Use npx (no installation)
|
|
32
31
|
npx file-organizer-mcp
|
|
32
|
+
|
|
33
|
+
# Option 3: Run the interactive setup wizard (Recommended)
|
|
34
|
+
npx file-organizer-mcp --setup
|
|
33
35
|
```
|
|
34
36
|
|
|
35
37
|
### Claude Desktop Configuration
|
|
@@ -62,20 +64,24 @@ Add to `claude_desktop_config.json`:
|
|
|
62
64
|
|
|
63
65
|
---
|
|
64
66
|
|
|
65
|
-
##
|
|
67
|
+
## <a id="features"></a>Features 🎯
|
|
66
68
|
|
|
67
69
|
### Core Functionality
|
|
68
70
|
|
|
69
71
|
* **🤖 Auto-categorization** - Intelligently organizes files into 12+ categories
|
|
70
72
|
* **🔍 Duplicate Detection** - Finds duplicate files using SHA-256 content hashing
|
|
73
|
+
* **🏷️ Smart Metadata** - Extracts EXIF/ID3 tags for content-aware organization
|
|
74
|
+
* **✏️ Batch Renaming** - Flexible renaming with patterns, regex, and case conversion
|
|
71
75
|
* **🛡️ Smart Conflict Resolution** - Handles filename conflicts automatically (rename/skip/overwrite)
|
|
72
76
|
* **👁️ Dry Run Mode** - Preview changes before executing
|
|
77
|
+
* **👀 File Watching** - Schedule automatic organization with cron-based triggers
|
|
73
78
|
* **📊 Comprehensive Scanning** - Detailed directory analysis with statistics
|
|
74
79
|
* **📈 Space Analysis** - Quickly identify space-consuming files
|
|
75
80
|
* **⏮️ Rollback Support** - Undo file organization operations
|
|
76
81
|
* **⚛️ Safe Atomic Moves** - Uses `COPYFILE_EXCL` to prevent race conditions during file moves
|
|
77
82
|
* **💾 Automatic Backups** - Safely backs up files before overwriting to `.file-organizer-backups`
|
|
78
83
|
* **📝 Structured Logging** - JSON-formatted logs with configurable log levels (debug/info/warn/error)
|
|
84
|
+
* **📜 Audit Trail** - Complete logging of all tool inputs, outputs, and execution status for transparency
|
|
79
85
|
* **💻 Multi-Platform Support** - Native support for Windows, macOS, and Linux (Ubuntu, Debian, etc.)
|
|
80
86
|
|
|
81
87
|
### Security Features
|
|
@@ -105,27 +111,30 @@ This server implements a multi-layered security architecture designed to operate
|
|
|
105
111
|
- **Race Condition Mitigation**: Uses atomic copy-then-delete strategy to prevent data loss if a file is modified during a move operation.
|
|
106
112
|
- **Safe Overwrites**: When `conflict_strategy: 'overwrite'` is used, the existing file is moved to a timestamped backup folder before replacement.
|
|
107
113
|
|
|
108
|
-
###
|
|
114
|
+
### 🚀 Upcoming Features
|
|
115
|
+
|
|
116
|
+
### ⚙️ Interactive Configuration
|
|
117
|
+
The new TUI Setup Wizard makes configuration easy:
|
|
118
|
+
`npx file-organizer-mcp --setup`
|
|
119
|
+
- **📁 Folder Selection**: Interactively choose which folders to manage.
|
|
120
|
+
- **⚡ Conflict Handling**: Choose between **Rename**, **Skip**, or **Overwrite** strategies.
|
|
121
|
+
- **🤖 Claude Integration**: Automatically generates/updates your `claude_desktop_config.json`.
|
|
109
122
|
|
|
110
|
-
|
|
111
|
-
* **TypeScript Migration** - Complete rewrite from JavaScript to TypeScript with strict type safety
|
|
112
|
-
* **Modular Design** - Layered architecture with Services, Tools, Utils, and Schemas layers
|
|
113
|
-
* **Zod Validation** - Runtime input validation with descriptive error messages
|
|
123
|
+
### What's New in v3.1.0
|
|
114
124
|
|
|
115
|
-
**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
125
|
+
**New Features:**
|
|
126
|
+
* **🧙 Interactive Setup Wizard** - Run `npx file-organizer-mcp --setup` for a guided configuration experience.
|
|
127
|
+
* **🎵 Smart Metadata** - Organize images by Year/Month and audio by Artist/Album automatically.
|
|
128
|
+
* **👀 File Watching** - Schedule folders for automatic organization using cron expressions.
|
|
129
|
+
* **🏷️ Batch Renaming** - Powerful bulk renaming with find/replace, regex, and numbering support.
|
|
130
|
+
* **🛡️ Enhanced Security** - Improved symlink detection and path validation.
|
|
131
|
+
* **🆓 Free Models** - Optimized default configuration to use free models.
|
|
120
132
|
|
|
121
|
-
|
|
122
|
-
* Access is now denied for non-whitelisted directories by default.
|
|
123
|
-
* You must add custom paths to `config.json` to access them.
|
|
124
|
-
* See [MIGRATION.md](MIGRATION.md) for the upgrade guide.
|
|
133
|
+
See [CHANGELOG.md](CHANGELOG.md) for full details.
|
|
125
134
|
|
|
126
135
|
---
|
|
127
136
|
|
|
128
|
-
##
|
|
137
|
+
## <a id="tools-reference"></a>Tools Reference 🛠️
|
|
129
138
|
|
|
130
139
|
### Core Tools
|
|
131
140
|
|
|
@@ -259,7 +268,7 @@ Automatically organize files into categorized folders.
|
|
|
259
268
|
|
|
260
269
|
**Parameters:**
|
|
261
270
|
- `directory` (string, required) - Full path to directory
|
|
262
|
-
- `dry_run` (boolean, optional) - Preview without moving (default:
|
|
271
|
+
- `dry_run` (boolean, optional) - Preview without moving (default: true)
|
|
263
272
|
- `conflict_strategy` ('rename'|'skip'|'overwrite'|'overwrite_if_newer', optional) - How to handle conflicts
|
|
264
273
|
- `response_format` ('json'|'markdown', optional) - Output format
|
|
265
274
|
|
|
@@ -296,6 +305,34 @@ Reverse file moves and renames from a previous organization.
|
|
|
296
305
|
|
|
297
306
|
---
|
|
298
307
|
|
|
308
|
+
#### `file_organizer_batch_rename`
|
|
309
|
+
|
|
310
|
+
Batch rename files using pattern matching, case conversion, or sequence numbering.
|
|
311
|
+
|
|
312
|
+
**Parameters:**
|
|
313
|
+
- `directory` (string, optional) - Directory to scan (either this or `files` required)
|
|
314
|
+
- `files` (array, optional) - Specific files to rename
|
|
315
|
+
- `rules` (array, required) - Renaming rules:
|
|
316
|
+
- `type`: 'find_replace' | 'case' | 'add_text' | 'numbering'
|
|
317
|
+
- *...plus rule-specific options (replace, with, conversion, text, position, etc.)*
|
|
318
|
+
- `dry_run` (boolean, optional) - Preview only (default: true)
|
|
319
|
+
|
|
320
|
+
**Annotations:** ⚠️ Destructive (if dry_run=false) • 🔍 Dry-run
|
|
321
|
+
|
|
322
|
+
**Example:**
|
|
323
|
+
```typescript
|
|
324
|
+
file_organizer_batch_rename({
|
|
325
|
+
directory: "/Docs",
|
|
326
|
+
rules: [
|
|
327
|
+
{ type: "find_replace", find: "IMG", replace: "Photo" },
|
|
328
|
+
{ type: "case", conversion: "lowercase" }
|
|
329
|
+
],
|
|
330
|
+
dry_run: true
|
|
331
|
+
})
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
299
336
|
### Utility Tools
|
|
300
337
|
|
|
301
338
|
#### `file_organizer_get_categories`
|
|
@@ -345,7 +382,7 @@ Permanently delete specified duplicate files. **This operation is destructive an
|
|
|
345
382
|
|
|
346
383
|
---
|
|
347
384
|
|
|
348
|
-
##
|
|
385
|
+
## File Categories
|
|
349
386
|
|
|
350
387
|
Files are automatically sorted into these categories:
|
|
351
388
|
|
|
@@ -353,13 +390,16 @@ Files are automatically sorted into these categories:
|
|
|
353
390
|
| --- | --- |
|
|
354
391
|
| **Executables** | `.exe`, `.msi`, `.bat`, `.cmd`, `.sh` |
|
|
355
392
|
| **Videos** | `.mp4`, `.avi`, `.mkv`, `.mov`, `.wmv`, `.flv`, `.webm`, `.m4v` |
|
|
356
|
-
| **Documents** | `.pdf`, `.doc`, `.docx`, `.txt`, `.rtf`, `.odt` |
|
|
393
|
+
| **Documents** | `.pdf`, `.doc`, `.docx`, `.txt`, `.rtf`, `.odt`, `.md`, `.tex` |
|
|
357
394
|
| **Presentations** | `.ppt`, `.pptx`, `.odp`, `.key` |
|
|
358
395
|
| **Spreadsheets** | `.xls`, `.xlsx`, `.csv`, `.ods` |
|
|
359
396
|
| **Images** | `.jpg`, `.jpeg`, `.png`, `.gif`, `.bmp`, `.svg`, `.ico`, `.webp` |
|
|
360
397
|
| **Audio** | `.mp3`, `.wav`, `.flac`, `.aac`, `.ogg`, `.wma`, `.m4a` |
|
|
361
398
|
| **Archives** | `.zip`, `.rar`, `.7z`, `.tar`, `.gz`, `.bz2`, `.xz` |
|
|
362
399
|
| **Code** | `.py`, `.js`, `.ts`, `.java`, `.cpp`, `.c`, `.html`, `.css`, `.php`, `.rb`, `.go`, `.json` |
|
|
400
|
+
| **Tests** | `*test*`, `*spec*`, `.test.ts`, `.spec.ts` |
|
|
401
|
+
| **Logs** | `*debug*`, `*.log` |
|
|
402
|
+
| **Scripts** | `*script*`, `.sh`, `.bat` |
|
|
363
403
|
| **Installers** | `.dmg`, `.pkg`, `.deb`, `.rpm`, `.apk` |
|
|
364
404
|
| **Ebooks** | `.epub`, `.mobi`, `.azw`, `.azw3` |
|
|
365
405
|
| **Fonts** | `.ttf`, `.otf`, `.woff`, `.woff2` |
|
|
@@ -367,7 +407,7 @@ Files are automatically sorted into these categories:
|
|
|
367
407
|
|
|
368
408
|
---
|
|
369
409
|
|
|
370
|
-
##
|
|
410
|
+
## <a id="example-workflows"></a>Example Workflows 💡
|
|
371
411
|
|
|
372
412
|
### Workflow 1: Intelligent Downloads Cleanup
|
|
373
413
|
|
|
@@ -396,7 +436,7 @@ User: "Claude, organize my project folder at ~/myproject"
|
|
|
396
436
|
Claude:
|
|
397
437
|
1. Scans the project → 423 files across multiple subdirectories
|
|
398
438
|
2. Identifies file types → Code (289), Assets (87), Docs (47)
|
|
399
|
-
3.
|
|
439
|
+
3. Suggestions organization → Preserves src/ structure, organizes root files
|
|
400
440
|
4. Previews changes → Shows (47) items to organize
|
|
401
441
|
5. Executes → Moves config files, readmes, screenshots to proper folders
|
|
402
442
|
|
|
@@ -441,9 +481,9 @@ Result: Clear visibility into space usage with actionable insights
|
|
|
441
481
|
|
|
442
482
|
---
|
|
443
483
|
|
|
444
|
-
##
|
|
484
|
+
## <a id="security-configuration"></a>Security Configuration 🔐
|
|
445
485
|
|
|
446
|
-
|
|
486
|
+
### Security Score: 10/10 🌟
|
|
447
487
|
|
|
448
488
|
The server uses a **Secure by Default** approach. Access is restricted to a specific whitelist of user directories. All system directories are blacklisted.
|
|
449
489
|
|
|
@@ -481,19 +521,19 @@ You can allow access to additional folders by editing the user configuration fil
|
|
|
481
521
|
1. Open `config.json`
|
|
482
522
|
2. Add paths to `customAllowedDirectories`:
|
|
483
523
|
|
|
484
|
-
```json
|
|
485
|
-
{
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
}
|
|
495
|
-
```
|
|
496
|
-
> 💡 **Tip:** You can copy a folder path directly from your file explorer's address bar and paste it into `customAllowedDirectories`.
|
|
524
|
+
```json
|
|
525
|
+
{
|
|
526
|
+
"customAllowedDirectories": [
|
|
527
|
+
"C:\\Users\\Name\\My Special Folder",
|
|
528
|
+
"D:\\Backups"
|
|
529
|
+
],
|
|
530
|
+
"settings": {
|
|
531
|
+
"maxScanDepth": 10,
|
|
532
|
+
"logAccess": true
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
```
|
|
536
|
+
> 💡 **Tip:** You can copy a folder path directly from your file explorer's address bar and paste it into `customAllowedDirectories`.
|
|
497
537
|
|
|
498
538
|
3. Restart Claude Desktop.
|
|
499
539
|
|
|
@@ -599,8 +639,8 @@ MIT License - see [LICENSE](LICENSE) file for details
|
|
|
599
639
|
|
|
600
640
|
---
|
|
601
641
|
|
|
602
|
-
|
|
642
|
+
### Happy Organizing! 🎯
|
|
603
643
|
|
|
604
|
-
*Built with ❤️ for the MCP community*
|
|
644
|
+
> *Built with ❤️ for the MCP community*
|
|
605
645
|
|
|
606
|
-
[⬆ Back to Top](#file-organizer-mcp-server
|
|
646
|
+
[⬆ Back to Top](#file-organizer-mcp-server)
|
package/dist/config.d.ts
CHANGED
|
@@ -17,6 +17,70 @@ export declare const CONFIG: {
|
|
|
17
17
|
alwaysBlocked: RegExp[];
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* User configuration structure
|
|
22
|
+
*/
|
|
23
|
+
export interface UserConfig {
|
|
24
|
+
/** Custom directories allowed for file operations */
|
|
25
|
+
customAllowedDirectories?: string[];
|
|
26
|
+
/** Conflict resolution strategy */
|
|
27
|
+
conflictStrategy?: 'rename' | 'skip' | 'overwrite';
|
|
28
|
+
/** Auto-organize schedule settings */
|
|
29
|
+
autoOrganize?: {
|
|
30
|
+
enabled: boolean;
|
|
31
|
+
schedule?: 'hourly' | 'daily' | 'weekly';
|
|
32
|
+
};
|
|
33
|
+
/** Security settings */
|
|
34
|
+
settings?: {
|
|
35
|
+
maxScanDepth?: number;
|
|
36
|
+
logAccess?: boolean;
|
|
37
|
+
enablePathValidation?: boolean;
|
|
38
|
+
allowCustomDirectories?: boolean;
|
|
39
|
+
};
|
|
40
|
+
/** Organization rules */
|
|
41
|
+
rules?: Array<{
|
|
42
|
+
pattern: string;
|
|
43
|
+
destination: string;
|
|
44
|
+
overwrite?: boolean;
|
|
45
|
+
}>;
|
|
46
|
+
/** Watch list for smart scheduling */
|
|
47
|
+
watchList?: WatchConfig[];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Watch configuration for per-directory scheduling
|
|
51
|
+
*/
|
|
52
|
+
export interface WatchConfig {
|
|
53
|
+
/** Directory path to watch */
|
|
54
|
+
directory: string;
|
|
55
|
+
/** Cron expression for scheduling (e.g., "0 9 * * *" for 9am daily) */
|
|
56
|
+
schedule: string;
|
|
57
|
+
/** Organization rules for this watch */
|
|
58
|
+
rules: {
|
|
59
|
+
/** Enable auto-organization */
|
|
60
|
+
auto_organize: boolean;
|
|
61
|
+
/** Minimum file age in minutes before organizing (prevents organizing files being written) */
|
|
62
|
+
min_file_age_minutes?: number;
|
|
63
|
+
/** Maximum files to process per run (0 or undefined = unlimited) */
|
|
64
|
+
max_files_per_run?: number;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Load custom allowed directories from user config file
|
|
69
|
+
*/
|
|
70
|
+
export declare function loadUserConfig(): UserConfig;
|
|
71
|
+
/**
|
|
72
|
+
* Update user config with deep merge (preserves existing settings)
|
|
73
|
+
* @deprecated Use updateUserConfig instead
|
|
74
|
+
*/
|
|
75
|
+
export declare function saveConfig(config: Partial<UserConfig>): void;
|
|
76
|
+
/**
|
|
77
|
+
* Update user config with deep merge (preserves existing settings)
|
|
78
|
+
*/
|
|
79
|
+
export declare function updateUserConfig(updates: Partial<UserConfig>): void;
|
|
80
|
+
/**
|
|
81
|
+
* Get path to user config file
|
|
82
|
+
*/
|
|
83
|
+
export declare function getUserConfigPath(): string;
|
|
20
84
|
/**
|
|
21
85
|
* Create default user config file if it doesn't exist
|
|
22
86
|
*/
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;CAkBlB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;CAkBlB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,qDAAqD;IACrD,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IACpC,mCAAmC;IACnC,gBAAgB,CAAC,EAAE,QAAQ,GAAG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;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CA8B3C;AAMD,eAAO,MAAM,aAAa,QAAoB,CAAC;AAC/C,eAAO,MAAM,SAAS,QAAuC,CAAC;AAC9D,eAAO,MAAM,SAAS,QAA+B,CAAC;AAEtD,eAAO,MAAM,gBAAgB,2DAA4D,CAAC;AAE1F,eAAO,MAAM,aAAa;;CAEhB,CAAC"}
|
package/dist/config.js
CHANGED
|
@@ -6,7 +6,7 @@ import os from 'os';
|
|
|
6
6
|
import path from 'path';
|
|
7
7
|
import fs from 'fs';
|
|
8
8
|
export const CONFIG = {
|
|
9
|
-
VERSION: '3.0.
|
|
9
|
+
VERSION: '3.0.1',
|
|
10
10
|
// Security Settings
|
|
11
11
|
security: {
|
|
12
12
|
enablePathValidation: true,
|
|
@@ -63,6 +63,14 @@ function getDefaultAllowedDirs() {
|
|
|
63
63
|
// Linux: Add common development directories
|
|
64
64
|
commonDirs.push(path.join(home, 'dev'));
|
|
65
65
|
}
|
|
66
|
+
// Add project directory when running tests
|
|
67
|
+
const isTestMode = process.env.NODE_ENV === 'test' || process.env.JEST_WORKER_ID !== undefined;
|
|
68
|
+
if (isTestMode) {
|
|
69
|
+
const projectDir = process.cwd();
|
|
70
|
+
if (!commonDirs.includes(projectDir)) {
|
|
71
|
+
commonDirs.push(projectDir);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
66
74
|
// Only return directories that actually exist
|
|
67
75
|
return commonDirs.filter((dir) => {
|
|
68
76
|
try {
|
|
@@ -73,27 +81,89 @@ function getDefaultAllowedDirs() {
|
|
|
73
81
|
}
|
|
74
82
|
});
|
|
75
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Deep merge two objects
|
|
86
|
+
*/
|
|
87
|
+
function deepMerge(target, source) {
|
|
88
|
+
const result = { ...target };
|
|
89
|
+
for (const key in source) {
|
|
90
|
+
const sourceValue = source[key];
|
|
91
|
+
if (sourceValue !== undefined) {
|
|
92
|
+
const targetValue = result[key];
|
|
93
|
+
if (typeof sourceValue === 'object' &&
|
|
94
|
+
sourceValue !== null &&
|
|
95
|
+
!Array.isArray(sourceValue) &&
|
|
96
|
+
typeof targetValue === 'object' &&
|
|
97
|
+
targetValue !== null &&
|
|
98
|
+
!Array.isArray(targetValue)) {
|
|
99
|
+
result[key] = deepMerge(targetValue, sourceValue);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
result[key] = sourceValue;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return result;
|
|
107
|
+
}
|
|
76
108
|
/**
|
|
77
109
|
* Load custom allowed directories from user config file
|
|
78
110
|
*/
|
|
79
|
-
function
|
|
111
|
+
export function loadUserConfig() {
|
|
80
112
|
try {
|
|
81
113
|
const configPath = getUserConfigPath();
|
|
82
114
|
if (fs.existsSync(configPath)) {
|
|
83
115
|
const configData = fs.readFileSync(configPath, 'utf-8');
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
116
|
+
return JSON.parse(configData);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
console.error('Error loading user config:', error.message);
|
|
121
|
+
}
|
|
122
|
+
return {};
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Update user config with deep merge (preserves existing settings)
|
|
126
|
+
* @deprecated Use updateUserConfig instead
|
|
127
|
+
*/
|
|
128
|
+
export function saveConfig(config) {
|
|
129
|
+
updateUserConfig(config);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Update user config with deep merge (preserves existing settings)
|
|
133
|
+
*/
|
|
134
|
+
export function updateUserConfig(updates) {
|
|
135
|
+
try {
|
|
136
|
+
const configPath = getUserConfigPath();
|
|
137
|
+
// Read existing config
|
|
138
|
+
const existingConfig = loadUserConfig();
|
|
139
|
+
// Deep merge the updates
|
|
140
|
+
const mergedConfig = deepMerge(existingConfig, updates);
|
|
141
|
+
// Ensure config directory exists
|
|
142
|
+
const configDir = path.dirname(configPath);
|
|
143
|
+
if (!fs.existsSync(configDir)) {
|
|
144
|
+
fs.mkdirSync(configDir, { recursive: true });
|
|
145
|
+
}
|
|
146
|
+
// Write merged config back to disk
|
|
147
|
+
fs.writeFileSync(configPath, JSON.stringify(mergedConfig, null, 2));
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
console.error('Error saving config:', error.message);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
function loadCustomAllowedDirs() {
|
|
154
|
+
try {
|
|
155
|
+
const config = loadUserConfig();
|
|
156
|
+
if (Array.isArray(config.customAllowedDirectories)) {
|
|
157
|
+
// Validate that custom directories exist
|
|
158
|
+
return config.customAllowedDirectories.filter((dir) => {
|
|
159
|
+
try {
|
|
160
|
+
return fs.existsSync(dir) && fs.statSync(dir).isDirectory();
|
|
161
|
+
}
|
|
162
|
+
catch {
|
|
163
|
+
console.error(`Warning: Custom directory does not exist: ${dir}`);
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
});
|
|
97
167
|
}
|
|
98
168
|
}
|
|
99
169
|
catch (error) {
|
|
@@ -104,7 +174,7 @@ function loadCustomAllowedDirs() {
|
|
|
104
174
|
/**
|
|
105
175
|
* Get path to user config file
|
|
106
176
|
*/
|
|
107
|
-
function getUserConfigPath() {
|
|
177
|
+
export function getUserConfigPath() {
|
|
108
178
|
const platform = os.platform();
|
|
109
179
|
const home = os.homedir();
|
|
110
180
|
if (platform === 'win32') {
|
|
@@ -193,11 +263,14 @@ export function initializeUserConfig() {
|
|
|
193
263
|
if (!fs.existsSync(configPath)) {
|
|
194
264
|
const defaultConfig = {
|
|
195
265
|
customAllowedDirectories: [],
|
|
266
|
+
conflictStrategy: 'rename',
|
|
267
|
+
autoOrganize: {
|
|
268
|
+
enabled: false,
|
|
269
|
+
},
|
|
196
270
|
settings: {
|
|
197
271
|
maxScanDepth: 10,
|
|
198
272
|
logAccess: true,
|
|
199
273
|
},
|
|
200
|
-
_comment: "Add custom directories to 'customAllowedDirectories' array. Example: 'C:\\\\Users\\\\YourName\\\\CustomFolder'",
|
|
201
274
|
};
|
|
202
275
|
fs.writeFileSync(configPath, JSON.stringify(defaultConfig, null, 2));
|
|
203
276
|
console.error(`Created default config file at: ${configPath}`);
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,MAAM,CAAC,MAAM,MAAM,GAAG;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,OAAO,EAAE,OAAO;IAEhB,oBAAoB;IACpB,QAAQ,EAAE;QACR,oBAAoB,EAAE,IAAI;QAC1B,sBAAsB,EAAE,IAAI;QAC5B,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,EAAE;QAChB,oBAAoB,EAAE,KAAK;KAC5B;IAED,sBAAsB;IACtB,KAAK,EAAE;QACL,cAAc,EAAE,qBAAqB,EAAE;QACvC,aAAa,EAAE,qBAAqB,EAAE;QACtC,aAAa,EAAE,wBAAwB,EAAE;KAC1C;CACF,CAAC;AAmDF;;GAEG;AACH,SAAS,qBAAqB;IAC5B,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC/B,MAAM,IAAI,GAA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C,UAAU,EAAE,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,iCAAiC,EAAG,KAAe,CAAC,OAAO,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC;AAED,mCAAmC;AACnC,oBAAoB,EAAE,CAAC;AAEvB,iCAAiC;AACjC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,QAAQ;AACxD,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAC;AAC9D,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;AAEtD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,cAAc,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,CAAU,CAAC;AAE1F,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,YAAY,EAAE,KAAK;CACX,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
export const CATEGORIES = {
|
|
9
9
|
Executables: ['.exe', '.msi', '.bat', '.cmd', '.sh'],
|
|
10
10
|
Videos: ['.mp4', '.avi', '.mkv', '.mov', '.wmv', '.flv', '.webm', '.m4v'],
|
|
11
|
-
Documents: ['.pdf', '.doc', '.docx', '.txt', '.rtf', '.odt'],
|
|
11
|
+
Documents: ['.pdf', '.doc', '.docx', '.txt', '.rtf', '.odt', '.md', '.tex'],
|
|
12
12
|
Presentations: ['.ppt', '.pptx', '.odp', '.key'],
|
|
13
13
|
Spreadsheets: ['.xls', '.xlsx', '.csv', '.ods'],
|
|
14
14
|
Images: ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.svg', '.ico', '.webp'],
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/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