A VMware ESXi/vCenter management server built on the Model Control Protocol (MCP) exposing REST + SSE endpoints for full VM lifecycle control and performance monitoring.
https://github.com/bright8192/esxi-mcp-serverStop wrestling with VMware's verbose APIs and clunky PowerCLI scripts. This MCP server turns your ESXi or vCenter infrastructure into a clean, modern REST API with real-time capabilities that fit naturally into your existing automation workflows.
You've been there: trying to automate VM provisioning with pyvmomi, dealing with certificate hassles, writing 50 lines of code just to power on a VM, and polling endlessly for performance metrics. VMware's native tooling feels like it was designed for a different era of infrastructure management.
This server sits between your applications and VMware infrastructure, exposing a clean REST API with Server-Sent Events for real-time updates. Instead of navigating VMware's object hierarchy and session management, you get straightforward HTTP endpoints that behave like any modern cloud API.
Create a VM with a simple POST:
{
"name": "web-server-01",
"cpu": 4,
"memory": 8192,
"datastore": "local-ssd",
"network": "production"
}
Get real-time performance data via SSE:
curl -N "http://localhost:8080/vmstats://web-server-01"
# Streams live CPU, memory, storage, and network metrics
Development Environment Automation: Your CI/CD pipeline spins up test VMs for integration testing, runs the test suite, then automatically tears them down. No more manually managing test infrastructure.
Monitoring Integration: Stream VM performance metrics directly into your observability stack. The SSE endpoint feeds real-time data to Grafana, Datadog, or your custom monitoring solution without the overhead of constant polling.
Self-Service Developer Portals: Build internal tools where developers can provision their own VMs through a web interface. The clean API makes it trivial to add VM management to existing internal applications.
Disaster Recovery Testing: Automate the process of cloning production VMs to staging environments for DR testing. Script the entire workflow with simple HTTP calls instead of complex PowerShell scripts.
The Model Context Protocol provides structured communication between your applications and VMware infrastructure. Unlike traditional REST APIs that return raw data, MCP gives you typed models and standardized interfaces. Your code becomes more reliable because you're working with well-defined VM, datastore, and network objects instead of parsing arbitrary JSON responses.
Drop this into your existing infrastructure without rearchitecting everything. It runs as a standard Python service, authenticates with your existing vCenter credentials, and exposes metrics in formats your monitoring tools already understand.
Docker deployment:
docker run -e VCENTER_HOST=vcenter.company.com \
-e [email protected] \
-e VCENTER_PASSWORD=secret \
-p 8080:8080 esxi-mcp-server
Kubernetes integration:
apiVersion: apps/v1
kind: Deployment
metadata:
name: esxi-mcp-server
spec:
replicas: 1
template:
spec:
containers:
- name: esxi-mcp
image: esxi-mcp-server
env:
- name: VCENTER_HOST
valueFrom:
secretKeyRef:
name: vcenter-creds
key: host
The configuration supports environment variables, YAML files, or JSON - whatever fits your deployment patterns. SSL certificate handling is optional for internal use, mandatory for production exposure.
Instead of polling VMware APIs every few seconds (and dealing with rate limits), the SSE endpoint streams performance data as it becomes available. Your monitoring dashboards get real-time updates without the overhead of constant HTTP requests.
The server handles the complexity of connecting to vCenter, managing authentication sessions, and translating VMware's performance counters into usable metrics. You just consume the stream.
Install and configure:
pip install pyvmomi pyyaml uvicorn mcp-core
export VCENTER_HOST=your-vcenter.local
export [email protected]
export VCENTER_PASSWORD=your-password
python server.py
Test the connection:
curl http://localhost:8080/api/vms
# Returns JSON list of all VMs
Start building: The API follows REST conventions, so if you've worked with any modern API, you already know how to use it.
This MCP server transforms VMware from a legacy management pain point into a modern infrastructure API that integrates seamlessly with contemporary development workflows. Your automation scripts become cleaner, your monitoring gets real-time data, and your team stops avoiding VMware-related tasks.