Home / MCP / Local File Organizer MCP Server
A Python-based MCP server that safely organizes and analyzes files by type across allowed directories.
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.
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.
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.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/organize/dir1",
"/path/to/organize/dir2"
]
}
}
}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"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.
List all available file categories to understand how files can be grouped.
Scan a directory to analyze its contents and report details without making changes.
Create the top-level folders for each file category in a target directory.
Move or relocate files into their respective category folders based on file type.
Search for files within a directory that match a given pattern.