esxi-mcp-server

esxi-mcp-server

RESTful server for managing VMware ESXi and vCenter via Machine Control Protocol

36
Stars
18
Forks
36
Watchers
5
Issues
ESXi MCP Server provides an API-based management system for VMware ESXi and vCenter environments using the Machine Control Protocol. It offers RESTful and JSON-RPC interfaces for virtual machine lifecycle operations, performance monitoring, and real-time communication through SSE. The server supports secure configuration, API key authentication, and flexible setup through YAML, JSON, or environment variables.

Key Features

Support for VMware ESXi and vCenter Server connections
RESTful and JSON-RPC API interface
Complete virtual machine lifecycle management
Real-time performance monitoring
SSE-based real-time communication
API key authentication
SSL/TLS secure connection support
Flexible configuration (YAML/JSON/Environment Variables)
Resource usage statistics for CPU, memory, storage, and network
Logging with adjustable log level and output options

Use Cases

Automating virtual machine provisioning and deletion
Managing VMware ESXi and vCenter infrastructure remotely
Real-time monitoring of VM performance metrics
Integrating VM management into DevOps workflows
Securing VM operations with API key-based authentication
Monitoring resource usage for cost analysis or capacity planning
Building self-service portals for developers or operators
Providing multi-user or remote-accessible VM management server
Centralized control of multiple VMware hosts and clusters
Enabling secure, programmable access to virtualization infrastructure

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:
bash
pip install pyvmomi pyyaml uvicorn mcp-core
  1. Create configuration file config.yaml:
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:
bash
python server.py -c config.yaml

API Interface

Authentication

All privileged operations require authentication first:

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

Main Tool Interfaces

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

Resource Monitoring Interface

Get VM performance data:

http
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

Star History

Star History Chart

Repository Owner

bright8192
bright8192

User

Repository Details

Language Python
Default Branch main
Size 21 KB
Contributors 1
License MIT License
MCP Verified Sep 5, 2025

Programming Languages

Python
80.35%
Makefile
8.65%
Shell
7%
Dockerfile
4%

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • cloudflare/mcp-server-cloudflare

    cloudflare/mcp-server-cloudflare

    Connect Cloudflare services to Model Context Protocol (MCP) clients for AI-powered management.

    Cloudflare MCP Server enables integration between Cloudflare's suite of services and clients using the Model Context Protocol (MCP). It provides multiple specialized servers that allow AI models to access, analyze, and manage configurations, logs, analytics, and other features across Cloudflare's platform. Users can leverage natural language interfaces in compatible MCP clients to read data, gain insights, and perform automated actions on their Cloudflare accounts. This project aims to streamline the orchestration of security, development, monitoring, and infrastructure tasks through standardized MCP connections.

    • 2,919
    • MCP
    • cloudflare/mcp-server-cloudflare
  • mcp-server-js

    mcp-server-js

    Enable secure, AI-driven process automation and code execution on YepCode via Model Context Protocol.

    YepCode MCP Server acts as a Model Context Protocol (MCP) server that facilitates seamless communication between AI platforms and YepCode’s workflow automation infrastructure. It allows AI assistants and clients to execute code, manage environment variables, and interact with storage through standardized tools. The server can expose YepCode processes directly as MCP tools and supports both hosted and local installations via NPX or Docker. Enterprise-grade security and real-time interaction make it suitable for integrating advanced automation into AI-powered environments.

    • 31
    • MCP
    • yepcode/mcp-server-js
  • 1mcp-app/agent

    1mcp-app/agent

    A unified server that aggregates and manages multiple Model Context Protocol servers.

    1MCP Agent provides a single, unified interface that aggregates multiple Model Context Protocol (MCP) servers, enabling seamless integration and management of external tools for AI assistants. It acts as a proxy, managing server configuration, authentication, health monitoring, and dynamic server control with features like asynchronous loading, tag-based filtering, and advanced security options. Compatible with popular AI development environments, it simplifies setup by reducing redundant server instances and resource usage. Users can configure, monitor, and scale model tool integrations across various AI clients through easy CLI commands or Docker deployment.

    • 96
    • MCP
    • 1mcp-app/agent
  • magg

    magg

    Meta-MCP aggregator and manager for LLM capability extension.

    Magg is a server that implements the Model Context Protocol (MCP), acting as a central aggregator and proxy for multiple MCP servers. It enables Large Language Models (LLMs) to dynamically discover, add, configure, and manage external tools at runtime. By aggregating tools from different MCP servers under unified namespaces, it streamlines capability management and introduces features such as configuration persistence, authentication, and real-time notifications. Magg offers both command-line and Docker deployment, with support for HTTP, stdio, and in-memory transport.

    • 62
    • MCP
    • sitbon/magg
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results