virtualization-mcp
Provides tools to manage Oracle VirtualBox VMs, including lifecycle operations (create, start, stop, restart, pause, clone, delete), snapshots, networking, storage/disks, ISO downloads, and hybrid SSH/noVNC console access.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@virtualization-mcp create a new ubuntu-dev VM named dev01"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
virtualization-mcp (mcp-virtualbox)
Serveur FastMCP 3.2+ et interface web FastAPI + React (Vite) dédié au pilotage d'Oracle VirtualBox (VMs, snapshots, réseaux, disques, ISOs et console hybride SSH/noVNC) depuis un assistant IA (Claude Desktop, Cursor, VS Code, etc.) ou directement depuis votre navigateur.
Origine & Crédits : Projet initialement créé par sandraschi/virtualization-mcp, puis adapté et retransformé par EverosCall pour son utilisation personnelle.
Sommaire
Related MCP server: QVMConsole MCP Server
Fonctionnalités principales
Cycle de vie complet des VMs : création (avec templates
ubuntu-dev,minimal-linux,win11-pro,test-template), démarrage, arrêt, redémarrage, pause, clonage et suppression.Snapshots : création, restauration, liste et suppression de points de sauvegarde.
Réseau & Stockage : gestion des modes
NAT,bridged,host-onlyetintnet, redirections de ports, contrôleurs de stockage et disques.vdi/.vmdk.Exécution isolée (Sandbox) : support optionnel de Docker Sandbox pour l'exécution de code isolée.
Interface Web moderne : tableau de bord React/Vite + API FastAPI avec classement par projets, téléchargement asynchrone d'ISOs et console hybride (terminal SSH interactif via WebSocket avec bascule automatique vers noVNC).
Double transport MCP :
stdio(par défaut pour Claude Desktop / Cursor) ethttp(MCP_TRANSPORT=http).
Prérequis
Outil | Requis pour | Installation rapide |
Python 3.12+ | Backend & serveur MCP | |
uv | Gestionnaire de dépendances Python |
|
Oracle VirtualBox 7+ | Gestion des VMs ( | |
Git | Cloner le dépôt |
|
Node.js 18+ / npm | Interface web (frontend React) |
|
just (optionnel) | Raccourcis développeur ( |
|
Note (Console graphique VNC) : sous Linux, installez l'Extension Pack VirtualBox /
VBoxVNCpour activer la console graphique noVNC dans le navigateur.
Installation
1. Cloner le dépôt
git clone https://github.com/EverosCall/mcp-virtualbox.git
cd mcp-virtualbox2. Installer les dépendances Python
uv sync --all-extras(Pour le développement avec les outils de test et de lint : uv sync --group dev)
3. Compiler le frontend Web (optionnel, requis pour le Dashboard)
cd webapp/frontend
npm install
npm run build
cd ../..4. Vérifier l'installation
uv run virtualization-mcp --help
VBoxManage --versionConfiguration
Fichier .env et variables d'environnement
Copiez le fichier d'exemple .env.example vers .env à la racine du projet :
cp .env.example .envPrincipales variables à adapter selon votre machine :
Variable | Description | Valeur par défaut |
| Chemin vers l'exécutable |
|
| Transport du serveur MCP ( |
|
| Port du serveur MCP en mode HTTP |
|
| Active les logs détaillés ( |
|
| Niveau de log ( |
|
| RAM par défaut pour les nouvelles VMs |
|
| Taille disque par défaut (Go) |
|
| Mode réseau par défaut |
|
| Sécurité avant suppression de VM |
|
Authentification de l'interface web
Au premier démarrage du serveur web, un fichier ~/.local/share/virtualization-mcp/auth.json (chmod 600 sous Linux) est généré automatiquement avec :
Identifiant par défaut :
adminMot de passe par défaut :
changeme(haché en PBKDF2-HMAC-SHA256)Jeton MCP HTTP (
mcp_token) : généré aléatoirement pour l'en-têteAuthorization: Bearer <mcp_token>
Vous pouvez personnaliser ces identifiants via variables d'environnement avant le démarrage :
export VM_AUTH_USER="mon_utilisateur"
export VM_AUTH_PASSWORD="mon_mot_de_passe_robuste"
export VM_MCP_TOKEN="mon_token_mcp_secret"
export VM_VNC_PASSWORD="virtualbox"Ou changer le mot de passe à chaud via l'API authentifiée :
POST /api/v1/auth/change-password
{"current_password": "changeme", "new_password": "nouveau_mot_de_passe"}Intégration Claude Desktop / Cursor / Clients MCP
Claude Desktop (mode stdio)
Éditez le fichier de configuration de Claude Desktop :
Windows :
%APPDATA%\Claude\claude_desktop_config.jsonmacOS :
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux :
~/.config/Claude/claude_desktop_config.json
Ajoutez l'entrée suivante (adaptez le chemin vers votre dossier mcp-virtualbox) :
{
"mcpServers": {
"virtualization-mcp": {
"command": "uv",
"args": [
"--directory",
"C:\\chemin\\vers\\mcp-virtualbox",
"run",
"virtualization-mcp"
],
"env": {
"PYTHONUNBUFFERED": "1",
"VBOX_MANAGE_PATH": "C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe"
}
}
}
}Sous Linux/macOS, utilisez
"VBOX_MANAGE_PATH": "VBoxManage"(ou/usr/bin/VBoxManage) et un chemin Unix pour--directory. Redémarrez ensuite Claude Desktop.
Client MCP distant (mode http)
Si vous lancez le serveur MCP en mode HTTP (port 10702 par défaut) :
URL MCP :
http://127.0.0.1:10702/mcpHealthcheck :
http://127.0.0.1:10702/health
Tutoriel d'utilisation
1. Lancer le serveur MCP (stdio ou HTTP)
Mode stdio (utilisé par les clients MCP locaux) :
uv run virtualization-mcpMode http (utile pour les clients distants ou le débogage) :
uv run virtualization-mcp --http --host 127.0.0.1 --port 10702Ou via variable d'environnement :
# PowerShell
$env:MCP_TRANSPORT = "http"
$env:MCP_PORT = "10702"
uv run virtualization-mcp2. Lancer l'interface web (Dashboard)
Sous Linux (manage.sh)
Le script unifié manage.sh gère la compilation du frontend, les PIDs, les logs et le healthcheck :
./manage.sh start # Compile dist/ si absent, démarre le serveur sur :10700
./manage.sh status # Vérifie l'état du service
./manage.sh restart # Redémarre proprement
./manage.sh stop # Arrête le service
./manage.sh logs # Suit logs/backend.logAccès Linux :
Interface Web & API :
http://localhost:10700/Documentation Swagger :
http://localhost:10700/docsEndpoint MCP HTTP intégré :
http://localhost:10700/mcp
Sous Windows (start.ps1 ou just)
.\webapp\start.ps1
# ou avec just :
just serveAccès Windows :
Frontend :
http://localhost:10700Backend API :
http://localhost:10701
3. Piloter vos VMs par prompt (exemples)
Une fois virtualization-mcp connecté à Claude Desktop, Cursor ou votre client MCP, vous pouvez lui demander en langage naturel :
Découvrir l'environnement :
« Liste toutes mes VMs VirtualBox et affiche les informations système de l'hôte. »
Créer et démarrer une VM :
« Crée une VM nommée
lab-ubuntuavec le templateubuntu-dev, 4 Go de RAM, 2 CPUs et démarre-la en mode headless. »Sauvegarder avant une manipulation risquée :
« Prends un snapshot nommé
avant-majsur la VMlab-ubuntu. »Restaurer un état :
« Restaure le snapshot
avant-majsurlab-ubuntu. »Configurer le réseau :
« Crée un réseau host-only et attache l'adaptateur 2 de
lab-ubuntudessus. »
4. Utiliser la console hybride SSH / noVNC
Depuis l'onglet VirtualBox de l'interface web :
Cliquez sur une VM pour ouvrir ses détails et sa console.
Pour une VM Linux, le backend teste automatiquement l'accès SSH (
/api/v1/vms/{name}/ssh-check) :Si SSH répond, un terminal PTY interactif s'ouvre directement dans le navigateur (
WS /api/v1/vms/{name}/ssh).Sinon, la console bascule automatiquement sur noVNC (
WS /api/v1/vms/{name}/vnc, embarqué localement sans dépendance CDN).
Utilisez le bouton Coller pour envoyer le presse-papiers et Ctrl+Alt+Del si besoin.
5. Télécharger des ISOs et organiser par projets
ISOs : la page VirtualBox → Download ISOs scanne
assets/vbox/,~/Downloads,~/Téléchargementset permet de télécharger des images (Ubuntu, Debian, Alpine, IPFire...) en tâche de fond depuis le catalogueconfig/iso_categories.json.Projets : classez vos VMs par projet et stockez vos mémos / identifiants SSH dans
~/virtualization-mcp/vm_projects.jsonvia l'interface ou l'API/api/v1/projects.
Référence des outils MCP
Le serveur expose des outils consolidés (portmanteau pattern avec paramètre operation) pour garder une interface claire dans les clients IA :
Outil MCP | Rôle principal |
| Lister, créer, configurer, démarrer, arrêter, mettre en pause, cloner et supprimer des VMs |
| Lister, créer, restaurer et supprimer des snapshots |
| Gérer les réseaux Host-Only, NAT, ponts et redirections de ports |
| Gérer les contrôleurs de stockage, disques virtuels et lecteurs optiques/ISO |
| Informations hôte VirtualBox, version et types d'OS supportés |
| Découvrir les VMs et l'aide contextuelle |
| Exécution de code isolée via Docker Sandbox |
| Arrêt propre du serveur MCP |
Développement et tests
Lancer la suite de tests (utilisant des mocks, sans nécessiter VirtualBox actif) :
uv run pytest tests/ -qCommandes utiles via just (voir justfile) :
just install # Installe les dépendances Python (dev) + frontend npm
just test # Lance pytest sur tests/
just lint # Vérifie le formatage / lint (ruff, mypy)
just fix # Corrige le formatage automatiquement
just certify # Lint + tests complets
just build # Build frontend de productionDépannage
VBoxManageintrouvable : Vérifiez que VirtualBox est installé et ajoutez son dossier auPATH, ou renseignezVBOX_MANAGE_PATH/VBOXMANAGE_PATHdans.envet dansclaude_desktop_config.json.Windows par défaut :
C:\Program Files\Oracle\VirtualBox\VBoxManage.exeLinux par défaut :
/usr/bin/VBoxManage
Le port
10700,10701ou10702est déjà utilisé : Arrêtez l'instance précédente (./manage.sh stopsous Linux ou.\webapp\stop.ps1sous Windows) ou changez le port viaWEB_PORT/MCP_PORT.Écran noir ou connexion refusée sur noVNC : Vérifiez que l'Extension Pack VirtualBox (
VBoxVNC) est installé et que VRDE/VNC est activé sur la VM (les VMs créées via l'API l'activent automatiquement).Erreur d'authentification sur l'interface web : Identifiants initiaux :
admin/changeme. En cas d'oubli, supprimez~/.local/share/virtualization-mcp/auth.jsonet redémarrez le serveur pour régénérer un fichier neuf.
Structure du projet
mcp-virtualbox/
├── manage.sh # Lanceur Linux unifié (start/stop/restart/status/logs)
├── justfile # Recettes développeur (test, lint, serve, build)
├── pyproject.toml # Configuration Python, dépendances et entrypoint CLI
├── .env.example # Modèle de configuration d'environnement
├── config/
│ └── iso_categories.json # Catalogue d'ISOs téléchargeables
├── assets/vbox/ # Dossier local des ISOs
├── src/virtualization_mcp/
│ ├── all_tools_server.py # Point d'entrée FastMCP (stdio / http)
│ ├── vbox_compat.py # Couche VBoxManage parallèle + cache
│ ├── vbox/vm_operations.py # Opérations VMs, disques, réseau, ISO, VRDE/VNC
│ ├── tools/portmanteau/ # Outils MCP consolidés par domaine
│ └── web/app.py # Point d'entrée web Uvicorn
├── webapp/
│ ├── backend/ # API FastAPI, auth, proxy WebSocket SSH/noVNC
│ └── frontend/ # Interface React + TypeScript + Vite
└── tests/ # Suite de tests pytestLicence
Ce projet est distribué sous licence MIT. Voir le fichier LICENSE pour plus de détails.
Available Tools
12 toolsinfo_toolsA
Comprehensive tool discovery and help portmanteau tool.
App-specific help and introspection (separate from MCP protocol's native tools/list — clients get schemas automatically; this is for users).
Return Format
Dict with success (bool), human-readable message, the action performed,
and per-action data (tools+count, info, help). Failures carry a
human-readable error.
Examples
await info_tools(action="list_tools")
await info_tools(action="list_tools", category="vm")
await info_tools(action="tool_info", tool_name="vm_management")
await info_tools(action="tool_schema", tool_name="snapshot_management")
await info_tools(action="help")Inputs: action (required), search, category, tool_name. Returns: object
network_managementA
Comprehensive network management portmanteau tool.
Consolidates all network operations into a single interface. Use the action
parameter to specify which operation to perform.
Return Format
Dict with success (bool), human-readable message, the action performed,
and operation data (networks, adapters, result). Failures carry a
human-readable error.
Examples
await network_management(action="list_networks")
await network_management(action="create_network", network_name="MyNetwork", ip_address="192.168.56.1", netmask="255.255.255.0")
await network_management(action="list_adapters", vm_name="MyVM")
await network_management(action="configure_adapter", vm_name="MyVM", adapter_slot=0, network_type="hostonly", network_name="MyNetwork")
await network_management(action="remove_network", network_name="MyNetwork")Inputs: action (required), limit, offset, netmask, +5 more. Returns: object
sandbox_managementB
Docker and Windows Sandbox code execution and bringup tool.
Ephemeral containers, stateful sessions, Windows Sandbox launch/status, and automated naked-install testing for fleet repos.
Return Format
Dict with success (bool), human-readable message, the action performed,
and operation data (result, sessions, job). Failures carry a
human-readable error.
Examples
await sandbox_management(action="execute_code", code="print('hi')", language="python")
await sandbox_management(action="session_create", sandbox_name="dev")
await sandbox_management(action="win_sandbox_status")
await sandbox_management(action="win_sandbox_naked_test", repo="plex-mcp")Inputs: action (required), code, repo, image, +16 more. Returns: object
show_hypervisor_health_cardA
Display an interactive Prefab UI dashboard card for hypervisor host health and VM inventory.
Return Format
Structured Prefab UI dashboard payload with host CPU/RAM utilization and VM counts.
Error states carry status: "error" plus error.
Examples
await show_hypervisor_health_card()Inputs: no named parameters. Returns: object
show_sandbox_status_cardA
Display an interactive Prefab UI card for Docker and Windows Sandbox status.
Return Format
Structured Prefab UI sandbox status card payload.
Examples
await show_sandbox_status_card()Inputs: no named parameters. Returns: object
show_vm_cardB
Display an interactive Prefab UI card for a single Virtual Machine.
Return Format
Structured Prefab UI card payload with status badge, hardware specs, and
quick lifecycle actions. Error states carry status: "error" plus error.
Examples
await show_vm_card("Ubuntu-Dev")Inputs: vm_name (required). Returns: object
snapshot_managementA
Comprehensive snapshot management portmanteau tool.
Consolidates all VM snapshot operations into a single interface. All actions
require vm_name; create/restore/delete also require snapshot_name.
Return Format
Dict with success (bool), human-readable message, the action performed,
vm_name, snapshot_name, and operation data. Failures carry a
human-readable error.
Examples
await snapshot_management(action="list", vm_name="MyVM")
await snapshot_management(action="create", vm_name="MyVM", snapshot_name="BeforeUpdate", description="Before system update")
await snapshot_management(action="restore", vm_name="MyVM", snapshot_name="BeforeUpdate")
await snapshot_management(action="delete", vm_name="MyVM", snapshot_name="BeforeUpdate")Inputs: action (required), vm_name (required), limit, offset, +2 more. Returns: object
storage_managementB
Comprehensive storage management portmanteau tool.
Consolidates all storage operations into a single interface. Use the action
parameter to specify which operation to perform.
Return Format
Dict with success (bool), human-readable message, the action performed,
and operation data (controllers, disks, result). Failures carry a
human-readable error.
Examples
await storage_management(action="list_controllers", vm_name="MyVM")
await storage_management(action="create_controller", vm_name="MyVM", controller_name="SATA Controller", controller_type="sata")
await storage_management(action="create_disk", disk_name="MyDisk.vdi", disk_size_gb=50)
await storage_management(action="attach_disk", vm_name="MyVM", disk_path="/path/to/MyDisk.vdi")
await storage_management(action="remove_controller", vm_name="MyVM", controller_name="SATA Controller")Inputs: action (required), limit, offset, vm_name, +5 more. Returns: object
system_managementC
Comprehensive system management portmanteau tool.
Consolidates system information and diagnostics operations into a single
interface. Most actions need no vm_name.
Return Format
Dict with success (bool), human-readable message, the action performed,
and operation data (system info, version, OS types, metrics, screenshot path).
Failures carry a human-readable error.
Examples
await system_management(action="host_info")
await system_management(action="vbox_version")
await system_management(action="ostypes")
await system_management(action="metrics", vm_name="MyVM")
await system_management(action="screenshot", vm_name="MyVM")Inputs: action (required), width, height, vm_name, +1 more. Returns: object
virtualization_shutdownA
Shut down the virtualization-mcp server gracefully.
Lets an agent stop the server (e.g. before upgrades or restarts) without killing the process from the outside.
Return Format
Dict with success, human-readable message, and the shutdown reason.
The process exits after responding.
Examples
await virtualization_shutdown(reason="upgrading to 1.7.0")Inputs: reason. Returns: object
vm_agentic_workflowB
Sampling-backed agentic operations for virtualization.
suggest_config: VirtualBox VM settings for a use case via LLM sampling.
sandbox_workflow: spin-up → work → snapshot → tear-down safety plan.
workflow: autonomous multi-step VM orchestration goal. All actions use ctx.sample() when available, else sensible defaults.
Return Format
Dict with success (bool), human-readable message or error, the action
performed, and operation data (suggestion, plan, steps).
Examples
await vm_agentic_workflow(action="suggest_config", use_case="CI runner")
await vm_agentic_workflow(action="sandbox_workflow", goal="test unsigned installer")
await vm_agentic_workflow(action="workflow", goal="clone base, snapshot, update, verify")Inputs: action (required), goal, vm_name, use_case. Returns: object
vm_managementA
Virtual machine lifecycle management.
Actions: list, create, start, stop, delete, clone, reset, pause, resume, info. For LLM config suggestions or sandbox workflow planning use vm_agentic_workflow.
Return Format
Dict with success (bool), human-readable message, the action performed,
and operation data (vms, vm_info, result). Failures carry a
human-readable error.
Examples
await vm_management(action="list")
await vm_management(action="info", vm_name="Ubuntu-Dev")
await vm_management(action="create", vm_name="NewVM", os_type="Ubuntu_64", memory_mb=4096, disk_size_gb=40)
await vm_management(action="start", vm_name="NewVM")Inputs: action (required), limit, offset, os_type, +6 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
The six `*_management` portmanteaus cleanly partition the domain by resource (VM, network, snapshot, storage, system, sandbox), so an agent can pick the right one from the resource alone. Minor overlap exists: health/status information is reachable both via `system_management` actions (`host_info`, `metrics`) and via `show_hypervisor_health_card`/`show_sandbox_status_card`, and sandbox planning lives in both `sandbox_management` and `vm_agentic_workflow(action="sandbox_workflow")`, so a few intents have two valid entry points.
The dominant pattern is `<domain>_management` with an action parameter, applied consistently across vm/network/snapshot/storage/system/sandbox. The `show_*_card` family is a coherent secondary group, but `info_tools`, `vm_agentic_workflow`, and `virtualization_shutdown` break the noun_management convention and mix verb-less and verb-first styles.
Twelve tools is well within the sweet spot, and the portmanteau design keeps the surface small by folding dozens of operations (clone, reset, pause, controller/disk wiring, sandbox sessions) into action parameters. Each tool maps to a real subsystem, and the three UI card tools plus shutdown/help are justified supporting utilities.
Coverage is strong: full VM lifecycle, snapshot create/restore/delete, network and adapter configuration, storage controllers/disks, host diagnostics and screenshots, plus sandbox execution and LLM-assisted planning. Gaps are minor and workaroundable — no obvious export/import or appliance operations, and disk detach/media/guest-additions actions are not evidenced in the described action sets.
Maintenance
Related MCP Connectors
Manage Vozora VPS servers, SSH keys, firewalls, DNS and usage from an AI agent.
Linux VMs for AI agents: create VMs, run commands, edit files and open preview URLs.
Manage American Cloud VMs, Kubernetes, databases, storage, networks and DNS from your AI assistant.
Manage PrivateByte servers, backups, proxies, billing and support tickets from an AI agent.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables AI assistants to manage virtual machines, sandboxes, and dev environments through VirtualBox, Hyper-V, and Windows Sandbox, supporting VM lifecycle, ISO downloads, networking, and unattended installs.920MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage virtual machines via natural language, including creating, editing, and VNC control.10 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables LLMs to remotely control VirtualBox VMs and Playwright browsers on Windows, including VM lifecycle actions, in-guest commands, browser automation, window management, and service monitoring via REST API and MCP.MIT
- AlicenseCqualityCmaintenanceEnables AI applications and agents to manage Oracle VirtualBox virtual machines and run commands inside Linux and Windows guests through Bash, POSIX sh, PowerShell, and CMD.27MIT