""" MCP Tool Server Composition Module Main server class that composes all MCP tool modules together. """ from .archive_compression import ArchiveCompression from .asciinema_integration import AsciinemaIntegration from .base import * # Import all tool modules from .diff_patch import DiffPatchOperations from .file_operations import EnhancedFileOperations from .git_integration import GitIntegration from .intelligent_completion import IntelligentCompletion from .sneller_analytics import SnellerAnalytics from .workflow_tools import ( AdvancedSearchAnalysis, DevelopmentWorkflow, EnhancedExistingTools, EnvironmentProcessManagement, NetworkAPITools, ProcessTracingTools, UtilityTools, ) class MCPToolServer(MCPMixin): """Main MCP server that combines all tool categories""" def __init__(self, name: str = "Enhanced MCP Tools Server"): super().__init__() self.name = name # Initialize all tool modules self.diff_patch = DiffPatchOperations() self.git = GitIntegration() self.sneller = SnellerAnalytics() # High-performance analytics self.asciinema = AsciinemaIntegration() # Terminal recording and auditing self.completion = IntelligentCompletion() # AI-powered tool recommendations self.file_ops = EnhancedFileOperations() self.search_analysis = AdvancedSearchAnalysis() self.dev_workflow = DevelopmentWorkflow() self.network_api = NetworkAPITools() self.archive = ArchiveCompression() self.process_tracing = ProcessTracingTools() self.env_process = EnvironmentProcessManagement() self.enhanced_tools = EnhancedExistingTools() self.utility = UtilityTools() # Store all tool instances for easy access self.tools = { "diff_patch": self.diff_patch, "git": self.git, "sneller": self.sneller, "asciinema": self.asciinema, "completion": self.completion, "file_ops": self.file_ops, "search_analysis": self.search_analysis, "dev_workflow": self.dev_workflow, "network_api": self.network_api, "archive": self.archive, "process_tracing": self.process_tracing, "env_process": self.env_process, "enhanced_tools": self.enhanced_tools, "utility": self.utility, } def create_server(name: str = "Enhanced MCP Tools Server") -> FastMCP: """Create and configure the MCP server with all tools""" app = FastMCP(name) # Create individual tool instances diff_patch = DiffPatchOperations() git = GitIntegration() sneller = SnellerAnalytics() asciinema = AsciinemaIntegration() completion = IntelligentCompletion() file_ops = EnhancedFileOperations() search_analysis = AdvancedSearchAnalysis() dev_workflow = DevelopmentWorkflow() network_api = NetworkAPITools() archive = ArchiveCompression() process_tracing = ProcessTracingTools() env_process = EnvironmentProcessManagement() enhanced_tools = EnhancedExistingTools() utility = UtilityTools() # Register all tool modules with their respective prefixes diff_patch.register_all(app, prefix="diff_patch") git.register_all(app, prefix="git") sneller.register_all(app, prefix="sneller") asciinema.register_all(app, prefix="asciinema") completion.register_all(app, prefix="completion") file_ops.register_all(app, prefix="file_ops") search_analysis.register_all(app, prefix="search_analysis") dev_workflow.register_all(app, prefix="dev_workflow") network_api.register_all(app, prefix="network_api") archive.register_all(app, prefix="archive") process_tracing.register_all(app, prefix="process_tracing") env_process.register_all(app, prefix="env_process") enhanced_tools.register_all(app, prefix="enhanced_tools") utility.register_all(app, prefix="utility") return app def run_server(): """Run the MCP server""" app = create_server() app.run() if __name__ == "__main__": run_server()