vsphere-console-mcp is an MCP server designed to let AI agents view and operate the console of VMware vSphere virtual machines through vCenter, including screen, mouse and keyboard, without installing any agent inside the guest operating system. It provides a single tool, vm, that works like the console window of vSphere Client or the noVNC console of Proxmox. Because it never touches the guest operating system, it can reach places that SSH, RDP and in-guest agents cannot reach: login and lock screens, BIOS/UEFI settings, OS installers, virtual machines with network failures, and Windows virtual machines stuck on a blue screen or on "Getting Windows ready". The project is designed for human-agent collaboration rather than unattended automation: the human makes decisions, and the agent views, reads and types.
Key capabilities:
- Provides two commands: vsphere-console-mcp for vCenter and proxmox-console-mcp for Proxmox VE, both providing the same tools.
- Zero dependencies: uses only the Python standard library, with no dependency on pyVmomi, websockets, requests or image libraries. It communicates directly with vSphere SOAP, the console screenshot endpoint, WebMKS, the Proxmox API, the console websocket and the VNC protocol, in about 2500 lines of code. Installation pulls only one package.
- Least-privilege authentication: on vSphere, the service account needs read-only privileges plus one privilege, "Console interaction"; input works through the console connection, so VirtualMachine.Interact.PutUsbScanCodes is not required. On Proxmox VE, only an API token with VM.Audit and VM.Console is required.
- No power button: there is no functionality in the code to power on, power off, reset, snapshot or reconfigure virtual machines. However, keystrokes can still reach the guest, and ctrl+alt+delete can restart a Linux text console, boot menu or BIOS screen.
- Correct symbols on non-US keyboards: keys are sent as scan codes for the guest layout (us, jis) rather than as keysyms, so symbols such as @ : _ \ arrive as typed.
- MCP-side guardrails: virtual machine name allowlist, read-only mode, a JSON audit log that does not record typed text, and guards against retrying rejected passwords or API tokens.
Usage:
- Quick start (vSphere): can be run via uvx without installation: uvx --from git+https://github.com/Razer0028/vsphere-console-mcp vsphere-console-mcp. Then create a dedicated vCenter account with the required role, and put the credentials in a file readable only by yourself. You can test it in a shell with vsphere-console-mcp vms and vsphere-console-mcp look <vm> -o screen.png. Finally, add the server to an MCP client (such as Claude Desktop, Cursor, VS Code, etc.) using the mcpServers JSON configuration. If only another machine can reach vCenter, you can run the server on that machine via SSH. Docker approach: build the image from the repository (docker build -t vsphere-console-mcp .), run it as a non-privileged user; it must run as your own user to read the credentials file and provide its own lock directory.
- Quick start (Proxmox VE): install the same package, and also install the proxmox-console-mcp command. On the Proxmox node, create a role with the two required privileges, a passwordless user, and an API token, and grant the role on the virtual machines that the agent is allowed to use. On the machine running the MCP server, copy the cluster CA certificate and write it into the settings.
- The vm tool specifies a virtual machine by name or ID (for vSphere, a managed object ID or IP address; for Proxmox, a numeric VM ID), and it is required on every call except vms. There is no default virtual machine. then_look: true can return a new screenshot after an input action.
- All settings are environment variables. VSPHERE_CREDENTIALS_FILE can contain KEY=VALUE lines; environment variables take precedence.
Use cases:
- Scenarios where you need to access a virtual machine console but cannot use SSH/RDP, such as login screens, BIOS/UEFI, operating system installation, network failures, blue screens, etc.
- Humans and AI agents collaborating on troubleshooting or configuration, with humans approving input actions.
- Security-sensitive environments that require least privilege and audit logs.
Limitations:
- Input to a virtual machine means full control of that virtual machine; not having power privileges does not mean it is safe. Human approval of input actions should be maintained, and account scope should be limited to the virtual machines allowed.
- Prefer the keyboard over the mouse: visual models estimate screenshot positions imprecisely, and clickingMay be off by a few pixels. Tab, arrow keys, Enter and shortcuts are deterministic. After clicking, use then_look to check.
- The screen changes faster than the agent: look→think→act takes several seconds, so boot menus or progress bars with a 3-second timeout will not wait. This tool is suitable for screens waiting for input.
- layout must match the guest's current keyboard layout. BIOS screens, installers and Linux text consoles usually use us until configured otherwise.
- Each tool call opens one console connection, sends all events, then closes. If the connection drops, the server releases held keys; if it cannot release them, the result will say so.
- Screenshots are sent to the AI provider as part of the conversation. Do not point the agent at consoles that display data that is not allowed to be sent.
- Passwords and API token secrets are used only for authentication and do not appear in tool results, errors, audit logs or the command line. The audit log records the length of input text rather than the text, and single-character keys are recorded as *.
- RFB connection requests share the session, do not disconnect anyone else's console window, and never change the guest resolution.
- Keys are sent as PC scan codes. On Proxmox, mouse operations require an absolute pointing device (the USB tablet added by default).
- Keyboard layouts us and jis are supported. Pull requests for other layouts are welcome. Text that does not exist on the keyboard (such as CJK, emoji) must be entered via the guest input method.
- vSphere: tested with vCenter 8.0.3 and Debian, Windows 11 guests. Standalone ESXi hosts without vCenter are untested. The WebMKS wire protocol is not publicly documented, and the console protocol may change in future versions.
- Proxmox VE: tested with Proxmox VE 9.2 (QEMU virtual machines with Debian and VyOS guests). Containers (LXC) are not supported, virtual machines without a VNC display (vga: none) are not supported, and virtual machines with a serial console as the display (vga: serial0) are untested. Mouse operations require a USB tablet (tablet: 1, the default). look transfers the entire framebuffer (about 4 MB at 1280×800), which takes about one second on a LAN.
- This server handles consoles only. For inventory, power and configuration, use it alongside management MCP servers, for example InfraMCP/vsphere-mcp-server for vSphere or VMware's own tools, and assign each server its own account and role.
- License: MIT. VMware, vSphere, vCenter and ESXi are trademarks of Broadcom; Proxmox is a trademark of Proxmox Server Solutions GmbH. This project is not affiliated with or endorsed by either.