Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

esxi-mcp-server

MCP.Pizza Chef: bright8192

The esxi-mcp-server is an MCP server designed for managing VMware ESXi and vCenter environments. It provides a simple RESTful API with JSON-RPC support for full virtual machine lifecycle management, including creation, cloning, deletion, and power operations. It supports real-time performance monitoring via SSE, secure SSL/TLS connections, and flexible configuration options, making it ideal for integrating VMware management into AI-driven workflows and automation.

Use This MCP server To

Manage VMware ESXi virtual machines via REST API Automate VM lifecycle operations like create, clone, delete Monitor real-time VM performance metrics (CPU, memory, storage) Integrate VMware management into AI workflows using MCP Securely control vCenter VMs with API key authentication Stream VM status updates using Server-Sent Events Configure VMware management server with YAML or JSON files

README

ESXi MCP Server

A VMware ESXi/vCenter management server based on MCP (Model Control Protocol), providing simple REST API interfaces for virtual machine management.

Features

  • Support for ESXi and vCenter Server connections
  • Real-time communication based on SSE (Server-Sent Events)
  • RESTful API interface with JSON-RPC support
  • API key authentication
  • Complete virtual machine lifecycle management
  • Real-time performance monitoring
  • SSL/TLS secure connection support
  • Flexible configuration options (YAML/JSON/Environment Variables)

Core Functions

  • Virtual Machine Management
    • Create VM
    • Clone VM
    • Delete VM
    • Power On/Off operations
    • List all VMs
  • Performance Monitoring
    • CPU usage
    • Memory usage
    • Storage usage
    • Network traffic statistics

Requirements

  • Python 3.7+
  • pyVmomi
  • PyYAML
  • uvicorn
  • mcp-core (Machine Control Protocol core library)

Quick Start

  1. Install dependencies:
pip install pyvmomi pyyaml uvicorn mcp-core
  1. Create configuration file config.yaml:
vcenter_host: "your-vcenter-ip"
vcenter_user: "administrator@vsphere.local"
vcenter_password: "your-password"
datacenter: "your-datacenter"        # Optional
cluster: "your-cluster"              # Optional
datastore: "your-datastore"          # Optional
network: "VM Network"                # Optional
insecure: true                       # Skip SSL certificate verification
api_key: "your-api-key"             # API access key
log_file: "./logs/vmware_mcp.log"   # Log file path
log_level: "INFO"                    # Log level
  1. Run the server:
python server.py -c config.yaml

API Interface

Authentication

All privileged operations require authentication first:

POST /sse/messages
Authorization: Bearer your-api-key

Main Tool Interfaces

  1. Create VM
{
    "name": "vm-name",
    "cpu": 2,
    "memory": 4096,
    "datastore": "datastore-name",
    "network": "network-name"
}
  1. Clone VM
{
    "template_name": "source-vm",
    "new_name": "new-vm-name"
}
  1. Delete VM
{
    "name": "vm-name"
}
  1. Power Operations
{
    "name": "vm-name"
}

Resource Monitoring Interface

Get VM performance data:

GET vmstats://{vm_name}

Configuration

Parameter Description Required Default
vcenter_host vCenter/ESXi server address Yes -
vcenter_user Login username Yes -
vcenter_password Login password Yes -
datacenter Datacenter name No Auto-select first
cluster Cluster name No Auto-select first
datastore Storage name No Auto-select largest available
network Network name No VM Network
insecure Skip SSL verification No false
api_key API access key No -
log_file Log file path No Console output
log_level Log level No INFO

Environment Variables

All configuration items support environment variable settings, following these naming rules:

  • VCENTER_HOST
  • VCENTER_USER
  • VCENTER_PASSWORD
  • VCENTER_DATACENTER
  • VCENTER_CLUSTER
  • VCENTER_DATASTORE
  • VCENTER_NETWORK
  • VCENTER_INSECURE
  • MCP_API_KEY
  • MCP_LOG_FILE
  • MCP_LOG_LEVEL

Security Recommendations

  1. Production Environment:

    • Use valid SSL certificates
    • Enable API key authentication
    • Set appropriate log levels
    • Restrict API access scope
  2. Testing Environment:

    • Set insecure: true to skip SSL verification
    • Use more detailed log level (DEBUG)

License

MIT License

Contributing

Issues and Pull Requests are welcome!

Changelog

v0.0.1

  • Initial release
  • Basic VM management functionality
  • SSE communication support
  • API key authentication
  • Performance monitoring

Author

Bright8192

Acknowledgments

  • VMware pyvmomi team
  • MCP Protocol development team

esxi-mcp-server FAQ

How do I authenticate API requests to the esxi-mcp-server?
The server uses API key authentication to secure REST API access.
What VMware environments does esxi-mcp-server support?
It supports both VMware ESXi hosts and vCenter Server connections.
How is real-time VM performance data delivered?
Performance metrics are streamed in real-time using Server-Sent Events (SSE).
What operations can I perform on virtual machines?
You can create, clone, delete, power on/off, and list all VMs.
How do I configure the esxi-mcp-server?
Configuration can be done via YAML, JSON files, or environment variables.
Is the communication with the server secure?
Yes, it supports SSL/TLS for secure connections.
What dependencies are required to run esxi-mcp-server?
It requires Python 3.7+, pyVmomi, PyYAML, uvicorn, and mcp-core.
Can I integrate esxi-mcp-server with different LLM providers?
Yes, it is compatible with models like OpenAI, Claude, and Gemini through MCP.