Major refactoring from monolithic server.py to modular MCPMixin pattern: Architecture: - src/esxi_mcp_server/ package with proper src-layout - FastMCP MCPMixin pattern for tool organization - Separate mixins for each functional area - Shared VMwareConnection class with lazy datastore/network lookup New Mixins Added: - DiskManagementMixin: add_disk, remove_disk, extend_disk, list_disks, attach_iso, detach_iso - NICManagementMixin: add_nic, remove_nic, change_nic_network, connect_nic, set_nic_mac, list_nics - HostManagementMixin: get_host_info, enter/exit_maintenance_mode, list_services, start/stop_service, set_service_policy, get/configure_ntp, reboot_host, shutdown_host, get_host_hardware, get_host_networking - OVFManagementMixin: deploy_ovf, export_vm_ovf, list_ovf_networks - ResourcesMixin: Added move_datastore_file, copy_datastore_file Streaming Support: - Generator-based streaming for datastore downloads - Memory-efficient large file handling with save_to parameter - Chunked uploads from disk Testing: - test_client.py: MCP SDK-based test client - Validates all 74 tools against real ESXi host Build System: - pyproject.toml with uv, ruff configuration - Docker dev/prod modes with hot-reload - Updated Makefile for uv-based workflow
53 lines
3.1 KiB
Plaintext
53 lines
3.1 KiB
Plaintext
# ESXi MCP Server Configuration
|
|
# Copy this file to .env and fill in your values
|
|
|
|
# Docker Compose project name (prevents environment clashes)
|
|
COMPOSE_PROJECT=esxi-mcp
|
|
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
# VMware vCenter/ESXi Connection (Required)
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
VCENTER_HOST=your-vcenter-ip-or-hostname
|
|
VCENTER_USER=administrator@vsphere.local
|
|
VCENTER_PASSWORD=your-password
|
|
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
# VMware Optional Settings
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
# Datacenter name (auto-selects first if not specified)
|
|
# VCENTER_DATACENTER=your-datacenter-name
|
|
|
|
# Cluster name (auto-selects first if not specified)
|
|
# VCENTER_CLUSTER=your-cluster-name
|
|
|
|
# Datastore name (auto-selects largest if not specified)
|
|
# VCENTER_DATASTORE=your-datastore-name
|
|
|
|
# Default network for VMs
|
|
VCENTER_NETWORK=VM Network
|
|
|
|
# Skip SSL certificate verification (set to true for self-signed certs)
|
|
VCENTER_INSECURE=true
|
|
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
# MCP Server Settings
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
# API key for authentication (optional, but recommended for production)
|
|
# MCP_API_KEY=your-secret-api-key
|
|
|
|
# Transport type: stdio (for Claude Desktop) or sse (for web/Docker)
|
|
MCP_TRANSPORT=sse
|
|
|
|
# Server binding (only used with SSE transport)
|
|
MCP_HOST=0.0.0.0
|
|
MCP_PORT=8080
|
|
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
# Logging Configuration
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
# Log level: DEBUG, INFO, WARNING, ERROR
|
|
LOG_LEVEL=INFO
|
|
|
|
# Log file path (logs to console if not specified)
|
|
# LOG_FILE=/app/logs/esxi-mcp.log
|