VSphere MCP Pro Server

VMware vCenter MCP Server
  • python

3

GitHub Stars

python

Language

4 months ago

First Indexed

3 weeks ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "warezloder-vsphere-mcp-pro": {
      "command": "python",
      "args": [
        "-m",
        "vsphere_mcp_pro.server"
      ],
      "env": {
        "INSECURE": "false",
        "MCP_PATH": "/mcp",
        "RATE_LIMIT": "true",
        "SERVER_HOST": "0.0.0.0",
        "SERVER_PORT": "8000",
        "AUTH_ENFORCE": "true",
        "VCENTER_HOST": "vcenter.example.com",
        "VCENTER_USER": "administrator@vsphere.local",
        "AUDIT_LOG_PATH": "/var/log/mcp_audit.log",
        "RATE_LIMIT_RPS": "5",
        "ROLES_TO_TOOLS": "{\"read\": [\"list_vms\"],\"admin\":[\"delete_vm\"]}",
        "TOKENS_TO_ROLES": "{\"token1\":\"read\",\"token2\":\"admin\"}",
        "VCENTER_BACKOFF": "0.5",
        "VCENTER_RETRIES": "3",
        "RATE_LIMIT_BURST": "10",
        "VCENTER_PASSWORD": "YOUR_PASSWORD",
        "VSPHERE_API_MODE": "api",
        "VCENTER_CA_BUNDLE": "/path/to/ca-bundle.pem",
        "VCENTER_TIMEOUT_S": "20",
        "ALLOWED_VCENTER_HOSTS": "[\"vcenter1.example.com\",\"vcenter2.example.com\"]"
      }
    }
  }
}

You run a secure MCP server that exposes controlled VMware vCenter operations through a robust, auditable API. This server helps you manage VMs, snapshots, datastores, and more with strict RBAC, session pooling, and rate limiting to keep multi‑tenant environments safe and performant.

How to use

You connect to the MCP server from a client that speaks the MCP protocol. You define roles and tokens that map to tool permissions, and you’ll see requests governed by those mappings. When you perform destructive operations, you must confirm the action to prevent accidental changes. Every operation is wrapped with auditing so you can review who did what, when, and on which vCenter host.

How to install

Prerequisites are Python 3.10+ and VMware vCenter 8.0+ with valid API credentials. You will install the MCP server package from source and run it locally.

Configuration

Configuration is driven by environment variables. Use the example configuration as a base and tailor it to your environment. Required variables include the vCenter target, credentials, role-to-tool mappings, and token-to-role mappings. Optional settings cover API mode, SSL behavior, timeouts, server binding, and auditing.

Running the server

To start the server locally for development or small deployments, run the server module with Python.

python -m vsphere_mcp_pro.server

Security and observability

Security is enforced through SSL verification by default, an optional CA bundle, allowed-host checks, and token-based RBAC. Destructive operations require explicit confirmation. Each tool invocation is logged in JSONL form for auditing, including sanitized arguments and context about the role and host.

Rate limiting and session management

A token-bucket rate limiter protects the MCP server and vCenter from overload. You can configure per-token rate limits and bursts. The server uses a pool of vCenter sessions to avoid exhausting vCenter sessions and to improve performance, with automatic session renewal on 401 errors.

Troubleshooting

If you encounter login failures, verify vCenter credentials and API mode. If a host is not allowed, add it to the allowed-hosts list. For rate limits, adjust burst settings or per-token usage. SSL issues can be mitigated by providing a CA bundle or enabling insecure mode for testing (not recommended for production). For API errors, inspect the vCenter error context and use the error predicates to handle specific cases in your client.

Development

For development, install development dependencies and run the server with autoreload to pick up changes automatically.

pip install -e .[dev]

uvicorn vsphere_mcp_pro.server:main --reload

Docker usage

Build the container image and run it, wiring in your environment configuration via an env file to supply the required variables.

# Build
docker build -t vsphere-mcp-pro .

# Run
docker run \
  --rm \
  -p 8000:8000 \
  --env-file .env \
  vsphere-mcp-pro

Available tools

list_vms

List all VMs from vCenter

get_vm_details

Get VM details by ID

list_hosts

List ESXi hosts

list_datastores

List datastores

list_networks

List networks

list_datacenters

List datacenters

get_datastore_usage

Get datastore capacity/usage

get_resource_utilization_summary

Summary of resources

power_on_vm

Power on a VM

power_off_vm

Power off a VM

restart_vm

Restart a VM

list_vm_snapshots

List snapshots for a VM

create_vm_snapshot

Create a snapshot

delete_vm_snapshot

Delete a snapshot

delete_vm

Permanently delete a VM

modify_vm_resources

Modify CPU/memory (requires power off)

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational