Provides tools to create and manage virtual development environments using the Vagrant CLI, including VM creation and status retrieval.
Enables programmatic management and monitoring of VirtualBox virtual machines through the Model Context Protocol.
Click on "Install 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., "@Virtualbox MCP Servercreate a new VM named 'dev-server' using ubuntu/focal64"
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.
π₯οΈ VirtualBox MCP Server
A powerful Model Context Protocol (MCP) server for managing VirtualBox VMs via Vagrant.
AI agents can now provision, manage, and debug virtual development environments with full observability.
Features β’ Quick Start β’ Tools β’ Workflows β’ Examples β’ Configuration
β¨ Features
38 MCP Tools for complete VM lifecycle management
Real-time Observability with logs, dashboards, and progress tracking
Snapshot Management for safe rollback and recovery
Process Control with kill/list capabilities
File Synchronization with conflict resolution
Async Operations with progress tracking and cancellation
System Guardrails for zombie VM detection and cleanup
Sequential Thinking for AI problem-solving
π¦ Architecture
π Quick Start
Prerequisites
Node.js 18+
VirtualBox 6.x or 7.x
Vagrant 2.3+
Installation
Running the Server
π οΈ All 38 Tools
VM Lifecycle (6 tools)
Tool | Description |
| Create a new Vagrant VM |
| Create VM with full config (CPU, memory, ports, sync) |
| Start or create VM if not exists |
| Get VM state |
| List all VMs |
| Destroy VM (force) |
Execution (3 tools)
Tool | Description |
| Execute command in VM (with timeout) |
| Execute with rsync before/after |
| Run nohup background task |
Environment Setup (3 tools)
Tool | Description |
| Install runtimes (node, python, go, etc.) |
| Install tools (git, docker, nginx, etc.) |
| Configure aliases and env vars |
File Operations (7 tools)
Tool | Description |
| Upload file to VM |
| Grep search in VM |
| Configure file watcher |
| Rsync hostβVM |
| Rsync VMβhost |
| Get sync state |
| Resolve sync conflicts |
ποΈ Observability (3 tools)
Tool | Description |
| Read last N lines of a log file (e.g., |
| Get stdout/stderr of background tasks |
| Search for patterns in log files |
πΈ Snapshots (4 tools)
Tool | Description |
| Create named snapshot before risky operations |
| Revert to a specific snapshot |
| List all available snapshots |
| Delete a specific snapshot |
βοΈ Process Control (2 tools)
Tool | Description |
| Return structured list of running processes ( |
| Send SIGTERM/SIGKILL to a process |
π Network (1 tool)
Tool | Description |
| Verify if port is listening in VM & accessible from host |
π Dashboard (1 tool)
Tool | Description |
| Comprehensive dashboard: CPU, RAM, Disk, tasks, logs |
β³ Progress Awareness (5 tools)
Tool | Description |
| Start tracked download, returns operation_id |
| Get real-time progress (bytes, %, ETA) |
| Block until operation completes or times out |
| Cancel a running operation |
| List all active operations |
π‘οΈ Guardrails & Maintenance (2 tools)
Tool | Description |
| Check disk/memory, identify Zombie VMs |
| Safely destroy orphaned VMs (with dry-run option) |
π§ AI Reasoning (1 tool)
Tool | Description |
| Dynamic problem-solving with reflection & branching |
π Architectural Workflows
π’ Easy Workflows
1. The "Daily Standup" (Environment Prep)
Quickly bring a dev environment online and ensure it's ready:
ensure_dev_vmβ Boot or create the VM automaticallysync_to_vmβ Push local code changes to VMinstall_dev_toolsβ Verify tools are presentget_vm_dashboardβ Confirm VM is healthy
2. The "Dataset Fetch" (Async Download)
Download large files without blocking:
start_downloadβ Initiate download, getoperation_idwait_for_operationβ Block until download completessearch_filesβ Verify file exists at expected path
3. The "Service Pulse" (Basic Debugging)
Quickly diagnose why localhost:8080 isn't loading:
list_vmsβ Identify which VM handles the servicecheck_vm_portβ Check if app is listening (vs. port forwarding issue)tail_vm_logβ Pull last 50 lines of error log
π΄ Advanced Workflows
4. The "Safety First" Update (Transactional Rollback)
Apply risky updates with a safety net:
snapshot_saveβ Create checkpoint "pre-update-v2"start_downloadβ Download new binary/patchwait_for_operationβ Block until completeexec_commandβ Run installation scriptcheck_vm_portβ Verify service is back onlineIF FAILED:
snapshot_restoreto rollbackIF SUCCESS:
snapshot_deleteto clean up
5. The "Resource Reclamation" (System Hygiene)
Identify and clean up orphaned Zombie VMs:
scan_system_healthβ Identify Zombie VMs consuming resourcessequentialthinkingβ Analyze which are safe to deletecleanup_zombiesβ Safely terminate withdry_runfirstget_vm_dashboardβ Confirm resources are freed
6. The "Deep Fix" Loop (Intelligent Debugging)
Autonomous diagnosis and repair of stuck processes:
get_vm_dashboardβ Detect CPU spike or stuck tasklist_processesβ Find the specific PID causing issuesgrep_log_streamβ Search logs for error signaturesequentialthinkingβ Formulate hypothesiskill_processβ Send SIGTERM to stuck processexec_with_syncβ Upload patched config and restart
π¬ Example Prompts
Here are 30 natural language prompts with their corresponding tool calls:
1. Provision a New Database Server
"I need a fresh Redis server. Create a VM named 'redis-cache' using the 'hashicorp/bionic64' box."
2. Status Check
"Is the 'frontend-react' VM currently running?"
3. Inventory Overview
"Show me a list of all the virtual machines we are currently managing."
4. Force Termination
"The 'experiment-01' VM is completely unresponsive. Destroy it immediately."
5. Idempotent Environment Check
"Ensure the 'integration-test' VM is running. If it's not there, create it."
6. Install Dependencies
"Run
pip install -r requirements.txtinside the 'api-server' VM."
7. Build and Sync
"Sync the latest changes to 'builder' and then run
make buildimmediately."
8. Long-Running Job
"Start the data ingestion script (
python ingest.py) on 'data-lake' in the background."
9. Deploy Configuration
"Upload my local
.env.productionfile to/app/.envon the 'worker-node' VM."
10. Locate Error Logs
"Search for any files named
error.loginside the/var/logdirectory."
11. Setup File Watcher
"Configure a file sync. Map my local
./srcfolder to/usr/src/appon 'dev-main'."
12. Conflict Resolution
"There's a sync conflict on README.md. Use my local version."
13. Live Debugging
"Show me the last 50 lines of the nginx error log on the 'proxy' VM."
14. Monitor Background Task
"What is the output so far for task
task_12345?"
15. Search Logs
"Search the syslog on 'auth-service' for any 'segfault' errors."
16. Pre-Update Backup
"I'm about to upgrade the database. Save a snapshot called 'before-v14-upgrade'."
17. Disaster Recovery
"The upgrade failed! Restore to the 'before-v14-upgrade' snapshot."
18. List Snapshots
"What snapshots are available for the 'kafka-broker' VM?"
19. Investigate High Load
"The 'ml-trainer' VM is slow. List the running processes."
20. Kill Stuck Process
"Process ID 9982 is stuck on 'worker-01'. Kill it."
21. Check Service Availability
"Is port 8080 open and listening on the 'jenkins' VM?"
22. System Health Dashboard
"Get me a full dashboard with CPU, RAM, and disk usage."
23. Initiate Large Download
"Download the 10GB dataset from example.com to
/data/on the 'ai-model' VM."
24. Blocking Wait
"Wait for the download operation
op_5592to finish."
25. Detect Zombie VMs
"Scan the system to see if we have any orphaned Zombie VMs."
26. Clean Zombies (Dry Run)
"Check what would happen if we cleaned up 'zombie-1' and 'old-test'."
βοΈ MCP Configuration
Claude Desktop / Cline / Cursor
Add to your claude_desktop_config.json or mcp_config.json:
π₯ Top 5 MCP Configuration Examples
1. Development Environment (Node.js + Docker)
2. CI/CD Pipeline (Jenkins/GitHub Actions)
3. Windows Workstation
4. macOS with Homebrew
5. Production/Enterprise (Restricted Environment)
π§ͺ Development
π License
MIT Β© usemanusai
Made with β€οΈ for AI-powered infrastructure management