mcvsphere/test_commands.md
Ryan Malloy 9e39c1c678 Refactor to modular mixin architecture with 74 tools
Major refactoring from monolithic server.py to modular MCPMixin pattern:

Architecture:
- src/esxi_mcp_server/ package with proper src-layout
- FastMCP MCPMixin pattern for tool organization
- Separate mixins for each functional area
- Shared VMwareConnection class with lazy datastore/network lookup

New Mixins Added:
- DiskManagementMixin: add_disk, remove_disk, extend_disk, list_disks,
  attach_iso, detach_iso
- NICManagementMixin: add_nic, remove_nic, change_nic_network,
  connect_nic, set_nic_mac, list_nics
- HostManagementMixin: get_host_info, enter/exit_maintenance_mode,
  list_services, start/stop_service, set_service_policy,
  get/configure_ntp, reboot_host, shutdown_host, get_host_hardware,
  get_host_networking
- OVFManagementMixin: deploy_ovf, export_vm_ovf, list_ovf_networks
- ResourcesMixin: Added move_datastore_file, copy_datastore_file

Streaming Support:
- Generator-based streaming for datastore downloads
- Memory-efficient large file handling with save_to parameter
- Chunked uploads from disk

Testing:
- test_client.py: MCP SDK-based test client
- Validates all 74 tools against real ESXi host

Build System:
- pyproject.toml with uv, ruff configuration
- Docker dev/prod modes with hot-reload
- Updated Makefile for uv-based workflow
2025-12-26 05:53:51 -07:00

1.0 KiB

ESXi MCP Server Test Commands

Try these in a new Claude Code session:

1. Basic Discovery

List all VMs on the ESXi host
Show me the datastores and their free space
What networks are available?

2. Host Management (NEW!)

Get detailed info about the ESXi host
List all services on the ESXi host
Show the NTP configuration
Show me the host networking config (vswitches, portgroups)

3. VM Hardware (NEW!)

List the disks on VM "your-vm-name"
List the NICs on VM "your-vm-name"

4. Datastore Operations

Browse the datastore "your-datastore" in the iso folder
Show me what's in the root of datastore "your-datastore"

5. Advanced Operations (be careful!)

# Add a 10GB disk to a VM
Add a 10GB thin-provisioned disk to VM "test-vm"

# Add a NIC
Add a vmxnet3 NIC to VM "test-vm" on network "VM Network"

# Configure NTP
Configure NTP servers 0.pool.ntp.org and 1.pool.ntp.org on the ESXi host

Start a new session with: claude