comblox/lab-automation-mcp
If you are the rightful owner of lab-automation-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Lab Automation MCP Server is a comprehensive system designed to automate and manage lab environments using the Model Context Protocol.
🤖 Lab Automation MCP Server
Comprehensive Model Context Protocol (MCP) server for intelligent lab environment automation, project management, and infrastructure orchestration.
🎯 Overview
The Lab Automation MCP Server is an intelligent system that understands your entire lab infrastructure and automates complex tasks through natural language interactions. It seamlessly integrates with:
- Proxmox VE Cluster: 3-node virtualization infrastructure
- Network Infrastructure: UDM Pro with 10+ VLANs and dual WAN
- GPU Resources: Multi-GPU setup for AI/ML workloads
- Project Management: Automated repository and development environment creation
- Service Orchestration: Network-aware container and VM deployment
🏗️ Lab Environment Understanding
The MCP server maintains deep understanding of your infrastructure:
Physical Infrastructure
- PVE1 (Proxmox): Intel i9-9900K, 64GB RAM, RTX 3070 - Container host
- PVE2 (Ubuntu): AMD 5950X, 128GB RAM, RTX 3090 - AI/ML training server
- PVE3 (Windows): Threadripper 7970X, 128GB RAM, RTX 5090+4090 - Development workstation
- UDM Pro: Network controller with dual WAN and 10+ VLANs
Network Topology
Internet
├── Starlink (Primary) - 1Gbps, 27ms latency
├── Three Mobile (Failover) - 350/100Mbps, 48ms latency
└── UDM Pro "TheButt"
├── 10+ VLANs with intelligent routing
├── High-performance 25/50GbE backbone
└── Network-aware service deployment
🚀 Key Features
🧠 Intelligent Infrastructure Management
- Lab Status Monitoring: Real-time comprehensive status of all nodes, services, and resources
- Performance Analysis: Bottleneck identification and optimization recommendations
- Resource Optimization: Automated resource allocation and efficiency improvements
- Capacity Planning: Predictive analysis for infrastructure scaling
🌐 Network-Aware Deployment
- Smart Network Selection: Automatically recommends optimal networks for services
- VLAN Integration: Seamless integration with 10+ pre-configured VLANs
- Performance Optimization: Network-specific optimizations for different workload types
- Security Segmentation: Intelligent isolation based on service requirements
🛠️ Automated Project Creation
- Multi-Platform Support: GitHub, GitLab, and local repository creation
- Template System: Pre-configured templates for web, AI/ML, IoT, and API projects
- Development Environments: Automated container/VM provisioning with network placement
- Best Practices: Built-in security, documentation, and development standards
📊 Infrastructure Intelligence
- Resource Analytics: Comprehensive analysis of CPU, memory, storage, and network usage
- Security Monitoring: Security posture assessment and improvement recommendations
- Cost Optimization: Identify cost-saving opportunities and efficiency improvements
- Trend Analysis: Performance trending and predictive capacity planning
🛠️ Available Tools
Lab Environment Tools
get_lab_status- Comprehensive infrastructure status and health monitoringanalyze_infrastructure- Performance, security, and optimization analysisoptimize_resources- Automated resource optimization recommendations
Deployment Tools
deploy_container- LXC container deployment with intelligent network selectiondeploy_vm- Virtual machine deployment with GPU passthrough supportrecommend_network- Network recommendation based on service requirements
Project Management Tools
create_project- Complete project setup with repository and infrastructuresetup_dev_environment- Automated development environment provisioningcreate_repository- GitHub/GitLab repository creation with templates
Network Management Tools
analyze_network- Network performance and security analysisrecommend_network- Intelligent network selection for services
Repository Management Tools
analyze_repositories- Repository health and activity analysiscreate_repository- Multi-platform repository creation and setup
📋 Installation & Setup
Prerequisites
- Node.js 18+
- TypeScript 5.3+
- SSH access to Proxmox nodes
- GitHub token (optional, for GitHub integration)
Installation
# Clone the repository
git clone https://github.com/xRealityLabs/lab-automation-mcp.git
cd lab-automation-mcp
# Install dependencies
npm install
# Build the project
npm run build
# Configure environment
cp .env.example .env
# Edit .env with your configuration
Configuration
# Environment variables
export GITHUB_TOKEN="your_github_token"
export SSH_PRIVATE_KEY_PATH="/path/to/ssh/key"
export LOG_LEVEL="info"
# Lab configuration is built-in but can be customized
🎮 Usage Examples
Infrastructure Monitoring
// Get comprehensive lab status
await mcpServer.getLabStatus({ detailed: true })
// Analyze infrastructure performance
await mcpServer.analyzeInfrastructure({ focus: "performance" })
// Optimize resource allocation
await mcpServer.optimizeResources({ focus: "all", aggressive: false })
Network-Aware Deployment
// Deploy AI/ML container on high-performance network
await mcpServer.deployContainer({
hostname: "ml-training",
template: "ubuntu-22.04",
network: "xrealitylabs",
memory: 16384,
cores: 8,
privileged: true,
purpose: "ai-ml"
})
// Get network recommendation for IoT service
await mcpServer.recommendNetwork({
service_type: "iot",
requirements: ["isolation", "low-power"],
performance_needs: "standard"
})
// Deploy crypto trading bot on secure VPN network
await mcpServer.deployContainer({
hostname: "crypto-trader",
template: "ubuntu-22.04",
network: "crypto",
memory: 4096,
cores: 4,
purpose: "crypto"
})
Project Automation
// Create complete AI/ML project
await mcpServer.createProject({
name: "voice-recognition-system",
type: "ai-ml",
repository: "github",
infrastructure: true,
network: "xrealitylabs",
technologies: ["python", "pytorch", "fastapi"]
})
// Setup development environment
await mcpServer.setupDevEnvironment({
projectPath: "/mnt/d/repos/voice-recognition-system",
environmentType: "container",
network: "xrealitylabs",
gpuAccess: true
})
🌐 Network Intelligence
Available Networks
| Network | Purpose | Performance | Security | Use Cases |
|---|---|---|---|---|
xrealitylabs | High-performance lab | 25Gbps | Medium | AI/ML, GPU workloads, development |
iot | Smart home/IoT | 100Mbps | High | Home Assistant, sensors, IoT gateways |
crypto | Crypto trading | 500Mbps | Maximum | Trading bots, crypto services via Texas VPN |
mediastreamer | Media services | 1Gbps | Medium | Plex, Jellyfin, media servers |
esd | Enterprise storage | 10Gbps | High | NAS, backup, enterprise services |
seattle-vpn | VPN routing | 500Mbps | Maximum | Privacy services, geo-restricted content |
texas-vpn | Texas VPN | 500Mbps | Maximum | Crypto trading, geo-specific services |
default | Management | 1Gbps | Medium | Admin tools, general services |
Intelligent Network Selection
The MCP server automatically recommends optimal networks based on:
- Service Type: AI/ML → xrealitylabs, IoT → iot, Crypto → crypto, Media → mediastreamer
- Performance Requirements: High bandwidth, low latency, maximum throughput
- Security Needs: Isolation requirements, privacy concerns, compliance
- Resource Access: GPU access, storage needs, external connectivity
📁 Project Structure
lab-automation-mcp/
├── src/
│ ├── core/
│ │ └── LabEnvironment.ts # Core lab environment intelligence
│ ├── services/
│ │ ├── ProxmoxService.ts # Proxmox VE integration
│ │ ├── NetworkService.ts # Network management and analysis
│ │ ├── ProjectAutomationService.ts # Project and repository automation
│ │ └── GitHubService.ts # GitHub/GitLab integration
│ ├── utils/
│ │ └── logger.ts # Comprehensive logging system
│ └── index.ts # Main MCP server implementation
├── templates/ # Project templates
├── dist/ # Built JavaScript files
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # This documentation
🔧 Development
Build & Run
# Development mode with watch
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Run tests
npm test
# Lint code
npm run lint
Extending the Server
// Add new tool to the MCP server
this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
switch (request.params.name) {
case 'your_custom_tool':
return await this.yourCustomHandler(request.params.arguments);
}
});
🎯 Use Cases
AI/ML Development
- Automated Environment Setup: Create GPU-enabled containers on high-performance network
- Resource Optimization: Intelligent GPU allocation and memory management
- Data Pipeline Deployment: Network-aware data processing containers
- Model Training Infrastructure: Distributed training environment setup
IoT & Smart Home
- Secure IoT Networks: Isolated containers on dedicated IoT VLAN
- Home Assistant Integration: Automated home automation setup
- Sensor Data Processing: Edge computing containers with appropriate network placement
- Security Monitoring: Network-isolated security services
Web Development
- Full-Stack Projects: Automated frontend + backend + database deployment
- Microservices Architecture: Network-aware service deployment and discovery
- Development Environments: Containerized dev environments with proper networking
- CI/CD Integration: Automated testing and deployment pipelines
Media & Entertainment
- Media Server Setup: Plex/Jellyfin containers on dedicated media network
- Content Processing: GPU-accelerated video transcoding containers
- Storage Integration: Network-optimized storage containers
- Streaming Optimization: QoS-aware media service deployment
📊 Monitoring & Analytics
Lab Intelligence
- Real-time Monitoring: Continuous infrastructure health monitoring
- Performance Metrics: CPU, memory, storage, network, and GPU utilization
- Trend Analysis: Historical performance data and predictive analytics
- Alert System: Proactive issue detection and notification
Network Analytics
- Traffic Analysis: Per-VLAN traffic monitoring and analysis
- Performance Optimization: Bandwidth utilization and latency monitoring
- Security Monitoring: Intrusion detection and anomaly identification
- Capacity Planning: Network growth prediction and optimization
Project Analytics
- Repository Health: Code quality, activity, and maintenance status
- Development Metrics: Commit frequency, issue resolution, project velocity
- Resource Usage: Development environment resource consumption
- Cost Optimization: Infrastructure cost analysis and optimization
🔐 Security & Best Practices
Infrastructure Security
- Network Segmentation: VLAN-based isolation for different service types
- Access Control: SSH key-based authentication and RBAC
- Firewall Integration: Automated firewall rule management
- Security Monitoring: Continuous security posture assessment
Development Security
- Secret Management: Secure handling of API keys and credentials
- Code Quality: Automated security scanning and best practice enforcement
- Container Security: Secure container configuration and image management
- Audit Logging: Comprehensive logging for security and compliance
🤝 Contributing
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Test thoroughly: Ensure all functionality works correctly
- Update documentation: Include examples and use cases
- Submit pull request: With comprehensive description
Development Guidelines
- Follow TypeScript best practices
- Implement comprehensive error handling
- Add detailed logging for debugging
- Include unit tests for new features
- Update documentation with examples
📝 License
This project is licensed under the MIT License - see the file for details.
🙏 Acknowledgments
- Model Context Protocol: For the excellent MCP framework
- Proxmox Team: For robust virtualization platform
- Ubiquiti: For enterprise networking solutions
- Open Source Community: For the amazing tools and libraries
🚀 Built with ❤️ for intelligent lab automation and infrastructure orchestration!
Bringing AI-powered infrastructure management to home labs and enterprise environments.