Skip to main content
Glama
FILE_HYGIENE_MCP_GUIDE.mdβ€’5.2 kB
# 🎯 FILE HYGIENE MCP TOOLS & AGENT ## Complete MCP Integration Guide --- ## βœ… WHAT'S NOW AVAILABLE THROUGH MCP ### FILE HYGIENE AGENT ```javascript Agent: FileHygieneAgent Location: C:\MCP\src\agents\file-hygiene-agent.js ``` **Commands:** - `health_check` - Full system health analysis - `start_monitoring` - Begin continuous monitoring - `analyze_reorganization` - Test file reorganization - `rebuild_system` - Rebuild inventory & dependencies - `get_broken_dependencies` - List broken deps - `get_inventory_summary` - File inventory summary - `status` - Agent status ### FILE HYGIENE TOOLS ```javascript Tools: FileHygieneTools Location: C:\MCP\src\tools\file-hygiene-tools.js ``` **Available MCP Tools:** - `file_hygiene_check_health` - `file_hygiene_start_monitoring` - `file_hygiene_rebuild_inventory` - `file_hygiene_remap_dependencies` - `file_hygiene_test_reorganization` - `file_hygiene_get_broken_dependencies` - `file_hygiene_get_inventory_summary` --- ## πŸ“¦ FILES CREATED FOR MCP ``` C:\MCP\ β”œβ”€β”€ src\ β”‚ β”œβ”€β”€ agents\ β”‚ β”‚ └── file-hygiene-agent.js βœ… MCP Agent β”‚ └── tools\ β”‚ β”œβ”€β”€ file-hygiene-tools.js βœ… MCP Tools β”‚ └── file-hygiene-registry.js βœ… Registration β”œβ”€β”€ mcp-server-config.js βœ… Server Config └── test-file-hygiene.js βœ… Test Script ``` --- ## πŸš€ HOW TO USE THROUGH MCP ### From JavaScript/Node.js: ```javascript const MCPServer = require('C:/MCP/mcp-server-config'); // Execute agent command const health = await MCPServer.executeAgent( 'FileHygieneAgent', 'health_check', {} ); // Execute tool const inventory = await MCPServer.executeTool( 'file_hygiene_get_inventory_summary', {} ); ``` ### From MCP Bridge: ```javascript // If using mcp-stdio-bridge.js const bridge = require('C:/MCP/mcp-stdio-bridge'); bridge.request('agent.execute', { agent: 'FileHygieneAgent', command: 'health_check' }); ``` ### From Claude/AI Assistant: ``` "Use MCP FileHygieneAgent to check system health" "Start file monitoring through MCP" "Get broken dependencies using MCP tools" ``` --- ## πŸ§ͺ TEST THE MCP INTEGRATION ```bash # Run the test script cd C:\MCP node test-file-hygiene.js # Expected output: # βœ… Agent registered # βœ… Tools registered # βœ… Health check complete # βœ… Inventory loaded ``` --- ## πŸ“‘ MCP API ENDPOINTS ### Agent Endpoint ``` Method: agent.execute Parameters: { agent: "FileHygieneAgent", command: "<command_name>", params: {} } ``` ### Tool Endpoint ``` Method: tool.execute Parameters: { tool: "file_hygiene_<tool_name>", params: {} } ``` --- ## πŸ”§ INTEGRATION WITH EXISTING MCP ### Add to your MCP server: ```javascript // In your server.js or server.ts const fileHygieneRegistry = require('./src/tools/file-hygiene-registry'); // During initialization fileHygieneRegistry.register(mcpServer); ``` ### Add to MCP manifest: ```json { "agents": { "FileHygieneAgent": { "path": "./src/agents/file-hygiene-agent.js", "description": "File system health monitoring" } }, "tools": { "file_hygiene_*": { "path": "./src/tools/file-hygiene-tools.js", "description": "File hygiene utilities" } } } ``` --- ## πŸ’¬ EXAMPLE MCP CONVERSATIONS ### Check Health ``` User: "Check file system health using MCP" Assistant: [Calls MCP FileHygieneAgent.health_check] Response: "System Status: CRITICAL - 4,627 broken dependencies found" ``` ### Start Monitoring ``` User: "Start MCP file monitoring" Assistant: [Calls MCP FileHygieneAgent.start_monitoring] Response: "Monitoring started - checking every 60 minutes" ``` ### Get Summary ``` User: "Get file inventory through MCP" Assistant: [Calls MCP tool file_hygiene_get_inventory_summary] Response: "8,608 files across 14 categories" ``` --- ## 🎯 MCP BENEFITS 1. **Accessible from anywhere** - Any tool that connects to MCP can use these 2. **Standardized interface** - Same API for all operations 3. **Async operations** - Non-blocking monitoring 4. **Error handling** - Built-in error reporting 5. **Status tracking** - Always know agent state --- ## ⚠️ REQUIREMENTS 1. **Python scripts must exist:** - C:\tools\folder_hygiene_agent.py - C:\tools\build_inventory.py - C:\tools\map_dependencies.py - C:\tools\safe_reorganize.py 2. **Data files must exist:** - C:\tools\agent-agency-file-inventory.json - C:\tools\agent-agency-dependency-map.json 3. **Node.js modules:** ```bash cd C:\MCP npm install child_process fs path ``` --- ## πŸ”„ NEXT STEPS 1. **Test MCP integration:** ```bash node C:\MCP\test-file-hygiene.js ``` 2. **Start using through MCP:** - Use agent for complex operations - Use tools for simple queries - Monitor through MCP dashboard 3. **Add to automation:** - Schedule through MCP - Trigger from webhooks - Chain with other agents --- ## βœ… READY FOR MCP USE! All file hygiene operations are now accessible through MCP as proper tools and agents. **Agent Name:** FileHygieneAgent **Tool Prefix:** file_hygiene_* **Status:** READY

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bermingham85/mcp-puppet-pipeline'

If you have feedback or need assistance with the MCP directory API, please join our Discord server