Cover image
Try Now
2025-03-13

镜像://github.com/bright8192/esxi-mcp-server

3 years

Works with Finder

0

Github Watches

1

Github Forks

1

Github Stars

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

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Lists Tailwind CSS classes in monospaced font

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

    Reviews

    4 (1)
    Avatar
    user_jbIqIRJ2
    2025-04-16

    As a dedicated user of the bright8192_esxi-mcp-server, I must say this MCP-Mirror product is phenomenal. Not only is it robust and efficient, but it also integrates seamlessly with my ESXi setup. The performance and stability this server provides are outstanding, making it a top choice for managing my infrastructure. Highly recommended for anyone in need of a reliable MCP application.