- trash-cleaner-mcp-server
trash-cleaner-mcp-server
Content
trash-cleaner-mcp-server
A desktop MCP service providing tools to scan, analyze, and clean junk files, primarily optimized for macOS.
Note: Most cleaning tools (cleanAppCaches, cleanTempFiles, cleanAppRemnants, smartCleanSystem) are designed and tested specifically for macOS. Running them on other systems might not work or lead to unexpected behavior.
Features
- Cross-Platform: (Planned) Windows, macOS, Linux support.
- Intelligent Scanning: Identifies various types of junk files (caches, logs, temp files, etc.).
- Selective Cleaning: Tools for cleaning specific areas like application caches, temp files, and application remnants.
- VS Code Extension Management: Tools to find and clean old/unused VS Code extensions.
- Filesystem Utilities: Tools for directory analysis, file finding, size calculation, deletion, etc.
- System Information: Basic OS detection.
- Audit Logging: Tracks operations via
[Audit]tools. - Scheduled Tasks: Automate cleaning and other tasks using a flexible scheduler.
- Define tasks using cron expressions or simple intervals.
- Target any registered tool for execution.
- Create/update tasks using exact tool names (
toolName) or natural language queries (toolQuery) via fuzzy matching. - Full task management (list, details, update, enable/disable, delete).
- Manual triggering and execution history tracking.
Available Tools (Features)
This server registers several tools callable via the MCP protocol:
macOS Cleaning Tools (Optimized for macOS):
macOSWarning: Displays a warning if run on a non-macOS system.cleanAppCaches: Cleans various application caches (user cache, saved app state).- Options:
dryRun(bool, default: true),olderThan(int, optional - days).
- Options:
cleanTempFiles: Cleans system temporary files.- Options:
dryRun(bool, default: true),olderThan(int, optional, default: 7 days).
- Options:
cleanAppRemnants: Scans for and cleans configuration/cache files left by uninstalled applications.- Options:
appName(string, optional - partial name match),dryRun(bool, default: true).
- Options:
smartCleanSystem: Performs system cleaning based on predefined levels (targets common junk locations).- Options:
cleanLevel(enum: "safe", "normal", "deep", default: "safe"),dryRun(bool, default: true).
- Options:
Cross-Platform Tools (Scanning, File System, OS):
cleanVSCodeExtensions: Cleans outdated versions of VS Code (and compatible editors like VSCodium, Cursor) extensions.- Options:
editorPath(string, optional - path to specific editor's extensions, default: scans all known locations),dryRun(bool, default: true).
- Options:
reportVSCodeExtensions: Generates a report listing outdated VS Code extensions that can be cleaned.- Options:
editorPath(string, optional).
- Options:
findLargeFiles: Finds files exceeding a specified size within a directory.- Options:
path(string),minSize(int, default: 100MB),maxDepth(int, default: 3).
- Options:
scanFullSystem: Scans the entire system's file structure (respecting exclusions) to report on space usage.- Options:
excludePaths(string[], optional),maxDepth(int, default: 10).
- Options:
scanDirectory: Analyzes the contents and size distribution within a specific directory.- Options:
path(string),excludePaths(string[], optional),maxDepth(int, default: 10),includeSubdirs(bool, default: true).
- Options:
getFolderSize: Calculates and returns the total size of a folder.- Options:
path(string).
- Options:
listDirectory: Lists the files and subdirectories within a specified path.- Options:
path(string),showHidden(bool, default: false).
- Options:
findFiles: Searches for files matching a specific pattern (wildcards supported) within a directory.- Options:
path(string),pattern(string),maxDepth(int, default: 5).
- Options:
analyzeDirectory: Provides statistics on file types and size distribution within a directory.- Options:
path(string),includeSubdirs(bool, default: true).
- Options:
getFileHash: Computes the MD5, SHA1, or SHA256 hash of a file.- Options:
path(string),algorithm(enum: "md5", "sha1", "sha256", default: "md5").
- Options:
getFileType: Retrieves basic file information, including MIME type.- Options:
path(string).
- Options:
deletePath: Deletes a specified file or folder (requires explicit confirmation, with extra checks for dangerous paths).- Options:
path(string),confirm(bool, must be true),dangerConfirm(bool, optional - required for potentially risky deletions).
- Options:
checkPathExists: Checks if a given path exists and identifies if it's a file or directory.- Options:
path(string).
- Options:
getSystemType: Returns the operating system identifier (e.g., 'darwin', 'win32', 'linux').
Audit Tools:
viewAuditLog: Views the most recent lines from the application's main log file (combined.log).- Options:
lines(int, default: 100, max: 1000).
- Options:
clearAuditLog: Deletes the main application log file (combined.log). Requires confirmation.- Options:
confirm(bool, must be true).
- Options:
Scheduled Tasks (TrashCleaner_Scheduler Tools)
Provides functionality to schedule the execution of other registered tools.
TrashCleaner_Scheduler_CreateTask: Creates a new scheduled task.- Requires
name,cronExpression. - Requires either
toolName(exact tool name like"TrashCleaner_CleanAppCaches") ortoolQuery(fuzzy description like"clean app caches"). - Optional
toolParams,enabled.
- Requires
TrashCleaner_Scheduler_ListTasks: Lists all configured scheduled tasks and their status.TrashCleaner_Scheduler_GetTaskDetails: Gets detailed information about a specific task by ID.TrashCleaner_Scheduler_UpdateTask: Updates an existing task. Can modify name, schedule, target tool (viatoolNameortoolQuery), parameters, and enabled status.TrashCleaner_Scheduler_EnableTask: Enables a disabled task.TrashCleaner_Scheduler_DisableTask: Disables an enabled task.TrashCleaner_Scheduler_DeleteTask: Permanently deletes a scheduled task.TrashCleaner_Scheduler_RunTaskNow: Manually triggers the execution of a task immediately.TrashCleaner_Scheduler_GetTaskHistory: Retrieves the recent execution history (success/failure) for a task.
Tech Stack
- Bun.js
- TypeScript
Usage
After publishing to npm, you can run MCP via bunx:
bunx @childhoodandy/trash-cleaner-mcp-server
Installation
# Clone the repository
git clone <repository-url>
cd trash-cleaner-mcp-server
# Install dependencies (using Bun)
bun install
Running the Server
bun start
Configuration
- Logging configuration is in
src/utils/logger.ts. - Scheduled task definitions are stored in
~/.trash-cleaner/schedules.json.
Development
(Development guidelines remain here...)
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Serper MCP ServerA Serper MCP Server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
ChatWiseThe second fastest AI chatbot™
Amap Maps高德地图官方 MCP Server
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
WindsurfThe new purpose-built IDE to harness magic
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright McpPlaywright MCP server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Tavily Mcp
CursorThe AI Code Editor
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
DeepChatYour AI Partner on Desktop
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.