vSphere MCP Server

vSphere MCP Server

Enables AI agents to manage VMware vSphere virtual infrastructure through comprehensive operations including VM power control, snapshot management, resource monitoring, performance analytics, and bulk operations with built-in safety confirmations for destructive actions.

Category
访问服务器

README

vSphere MCP Server

A comprehensive Model Context Protocol (MCP) server for VMware vSphere management, providing AI agents with full access to virtual infrastructure operations through a secure, Dockerized environment.

Features

Core VM Management

  • List VMs - Get all virtual machines with power states
  • VM Details - Detailed information about specific VMs
  • Power Operations - Start, stop, restart VMs
  • Resource Monitoring - CPU, RAM, and network utilization
  • Storage Information - Disk usage and datastore details

Advanced Operations

  • Snapshot Management - Create, list, and delete VM snapshots
  • Template Management - List and manage VM templates
  • Bulk Operations - Power operations on multiple VMs
  • Resource Modification - Change CPU and memory allocation
  • Network Management - Port groups and network configuration

Monitoring & Reporting

  • Performance Monitoring - Real-time resource utilization
  • Event Logging - VM events and system logs
  • Alarm Management - Active alarms and alerts
  • Comprehensive Reports - Environment-wide analytics
  • Resource Utilization - CPU, memory, and storage summaries

Safety Features

  • Confirmation System - All destructive operations require explicit confirmation
  • Error Handling - Comprehensive error messages and troubleshooting
  • Secure Authentication - Environment-based credential management
  • Audit Trail - Clear logging of all operations

Installation

Prerequisites

  • Docker and Docker Compose
  • VMware vCenter Server with REST API access
  • Valid vCenter credentials

Quick Start

  1. Clone repo

  2. Configure Environment

cp env.example .env
# Edit .env with your vCenter credentials
  1. Deploy with Docker
docker compose up -d

Configuration

Environment Variables

Create a .env file with the following variables:

# vCenter Connection
VCENTER_HOST=vcenter.domain.local
VCENTER_USER=username@domain.local
VCENTER_PASSWORD=your_password_here
INSECURE=True

# Server Configuration
SERVER_HOST=0.0.0.0
SERVER_PORT=8000

AnythingLLM Integration

Add the following configuration to your anythingllm_mcp_servers.json:

{
  "mcpServers": {
    "vsphere-mcp-server": {
      "name": "vSphere MCP Server",
      "type": "streamable",
      "url": "http://vsphere-mcp-server:8000/mcp",
      "auth_token": null,
      "enabled": true
    }
  }
}

Available Tools

VM Management

Tool Description Parameters
list_vms List all virtual machines hostname (optional)
get_vm_details Get detailed VM information vm_id, hostname (optional)
power_on_vm Power on a virtual machine vm_id, hostname (optional)
power_off_vm Power off a virtual machine vm_id, hostname (optional)
restart_vm Restart a virtual machine vm_id, hostname (optional)

Infrastructure Management

Tool Description Parameters
list_hosts List all ESXi hosts hostname (optional)
list_datastores List all datastores hostname (optional)
list_networks List all networks hostname (optional)
list_datacenters List all datacenters hostname (optional)

Monitoring & Performance

Tool Description Parameters
get_vm_performance_info Get VM performance metrics hostname (optional)
get_host_performance_info Get host performance metrics hostname (optional)
get_vm_disk_usage Get VM disk utilization hostname (optional)
get_datastore_usage Get datastore utilization hostname (optional)
get_vms_with_high_resource_usage Find VMs with high resource allocation hostname (optional)

Snapshot Management

Tool Description Parameters
list_vm_snapshots List VM snapshots vm_id, hostname (optional)
create_vm_snapshot Create VM snapshot vm_id, snapshot_name, description, hostname (optional)
delete_vm_snapshot Delete VM snapshot vm_id, snapshot_id, confirm, hostname (optional)

Template Management

Tool Description Parameters
list_templates List VM templates hostname (optional)

Advanced Monitoring

Tool Description Parameters
get_vm_events Get VM events vm_id, hostname (optional)
get_alarms Get active alarms hostname (optional)
get_port_groups Get network port groups hostname (optional)

Reporting & Analytics

Tool Description Parameters
generate_vm_report Generate comprehensive VM report hostname (optional)
get_resource_utilization_summary Get resource utilization summary hostname (optional)

Automation

Tool Description Parameters
bulk_power_operations Bulk power operations operation, vm_list, hostname (optional)
bulk_delete_vms Bulk delete VMs vm_list, confirm, hostname (optional)

Destructive Operations (Require Confirmation)

Tool Description Parameters
delete_vm Delete virtual machine vm_id, confirm, hostname (optional)
modify_vm_resources Modify VM resources vm_id, cpu_count, memory_gb, confirm, hostname (optional)
force_power_off_vm Force power off VM vm_id, confirm, hostname (optional)

Destructive operations require explicit confirmation by setting confirm=True

Security Features

Confirmation System

All destructive operations require explicit confirmation:

# First call - shows warning
delete_vm(vm_id="MyServer", confirm=False)
# Returns: DESTRUCTIVE OPERATION: Delete VM MyServer...

# Second call - executes operation
delete_vm(vm_id="MyServer", confirm=True)
# Returns:  VM MyServer deleted successfully

Environment-Based Authentication

  • Credentials stored in environment variables
  • No hardcoded passwords
  • Secure Docker deployment
  • SSL/TLS support with configurable verification

Usage Examples

Basic VM Operations

# List all VMs
"Show me all virtual machines"

# Get VM details
"Get details for VM WebServer01"

# Power operations
"Power on the VM DatabaseServer"
"Restart all VMs: WebServer01, WebServer02, WebServer03"

Monitoring and Reporting

# Performance monitoring
"Show me CPU and memory usage for all VMs"
"Which VMs have high resource usage?"

# Storage monitoring
"Show me datastore usage"
"Which VMs have disk usage over 90%?"

# Comprehensive reporting
"Generate a complete report of the vSphere environment"
"Show me resource utilization summary"

Snapshot Management

# Create snapshots
"Create a snapshot of VM WebServer01 before updates"

# List snapshots
"Show me all snapshots for VM DatabaseServer"

# Delete snapshots (requires confirmation)
"Delete snapshot 'backup-2024-01-15' from VM WebServer01"

Destructive Operations (with confirmation)

# VM deletion (requires confirmation)
"Delete VM TestServer"  # Shows warning
"Delete VM TestServer with confirmation"  # Executes deletion

# Resource modification (requires confirmation)
"Modify VM WebServer01 to have 8 CPUs and 16GB RAM"
"Modify VM WebServer01 to have 8 CPUs and 16GB RAM with confirmation"

# Bulk operations (requires confirmation)
"Delete VMs: OldServer1, OldServer2, OldServer3"
"Delete VMs: OldServer1, OldServer2, OldServer3 with confirmation"

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选