Skip to main content
Glama
mcp-server-config.js2.09 kB
/** * MCP SERVER CONFIGURATION UPDATE * Adds File Hygiene Agent to MCP Server */ // Add this to your existing MCP server.js or server.ts file const fileHygieneRegistry = require('./src/tools/file-hygiene-registry'); // In your server initialization function, add: function initializeMCPServer(server) { // ... existing initialization code ... // Register File Hygiene Tools and Agent fileHygieneRegistry.register(server); // ... rest of initialization ... } // If using TypeScript (server.ts), add these imports: // import * as fileHygieneRegistry from './src/tools/file-hygiene-registry'; // Example MCP server setup with File Hygiene const MCPServer = { agents: {}, tools: {}, registerAgent(agent) { this.agents[agent.name] = agent; console.log(`Agent registered: ${agent.name}`); }, registerTool(tool) { this.tools[tool.name] = tool; console.log(`Tool registered: ${tool.name}`); }, async executeAgent(agentName, command, params) { const agent = this.agents[agentName]; if (!agent) { throw new Error(`Agent not found: ${agentName}`); } return await agent.handler(command, params); }, async executeTool(toolName, params) { const tool = this.tools[toolName]; if (!tool) { throw new Error(`Tool not found: ${toolName}`); } return await tool.handler(params); }, // List available agents and tools getCapabilities() { return { agents: Object.keys(this.agents).map(name => ({ name, description: this.agents[name].description, commands: Object.keys(this.agents[name].commands || {}) })), tools: Object.keys(this.tools).map(name => ({ name, description: this.tools[name].description })) }; } }; // Initialize with File Hygiene fileHygieneRegistry.register(MCPServer); // Export for use module.exports = MCPServer;

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