Virtualbox MCP Server

$npm install -g @use.manus.ai/virtualbox-mcp-server
README.md

A powerful Model Context Protocol (MCP) server for managing VirtualBox VMs.

πŸ–₯️ 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

Virtualbox-mcp-server/          # Turborepo Monorepo
β”œβ”€β”€ apps/
β”‚   └── mcp-server/             # Main MCP server (38 tools)
β”‚       └── src/
β”‚           β”œβ”€β”€ index.ts        # Tool definitions & handlers
β”‚           β”œβ”€β”€ error-handler.ts
β”‚           β”œβ”€β”€ port-manager.ts
β”‚           └── sequential-thinking.ts
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ vagrant-client/         # Vagrant CLI wrapper
β”‚   β”œβ”€β”€ sync-engine/            # Chokidar + file sync
β”‚   └── shared-utils/           # Logger utilities
β”œβ”€β”€ turbo.json
└── package.json

VirtualBox MCP Architecture Overview

VirtualBox MCP Architecture Detail


πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • VirtualBox 6.x or 7.x
  • Vagrant 2.3+

Installation

# Install via NPM (Recommended)
npm install -g @use.manus.ai/virtualbox-mcp-server

# Or Clone and Build from Source
git clone https://github.com/usemanusai/Virtualbox-mcp-server.git
cd Virtualbox-mcp-server

# Install dependencies
npm install

# Build all packages
npm run build

Running the Server

# Run the installed server
virtualbox-mcp-server

# Or run from source
node apps/mcp-server/dist/index.js

πŸ› οΈ All 38 Tools

VM Lifecycle (6 tools)

Tool Description
create_vm Create a new Vagrant VM
create_dev_vm Create VM with full config (CPU, memory, ports, sync)
ensure_dev_vm Start or create VM if not exists
get_vm_status Get VM state
list_vms List all VMs
destroy_vm Destroy VM (force)

Execution (3 tools)

Tool Description
exec_command Execute command in VM (with timeout)
exec_with_sync Execute with rsync before/after
run_background_task Run nohup background task

Environment Setup (3 tools)

Tool Description
setup_dev_environment Install runtimes (node, python, go, etc.)
install_dev_tools Install tools (git, docker, nginx, etc.)
configure_shell Configure aliases and env vars

File Operations (7 tools)

Tool Description
upload_file Upload file to VM
search_files Grep search in VM
configure_sync Configure file watcher
sync_to_vm Rsync host→VM
sync_from_vm Rsync VM→host
sync_status Get sync state
resolve_conflict Resolve sync conflicts

πŸ‘οΈ Observability (3 tools)

Tool Description
tail_vm_log Read last N lines of a log file (e.g., /var/log/syslog)
get_task_output Get stdout/stderr of background tasks
grep_log_stream Search for patterns in log files

πŸ“Έ Snapshots (4 tools)

Tool Description
snapshot_save Create named snapshot before risky operations
snapshot_restore Revert to a specific snapshot
snapshot_list List all available snapshots
snapshot_delete Delete a specific snapshot

βš™οΈ Process Control (2 tools)

Tool Description
list_processes Return structured list of running processes (ps aux)
kill_process Send SIGTERM/SIGKILL to a process

🌐 Network (1 tool)

Tool Description
check_vm_port Verify if port is listening in VM & accessible from host

πŸ“Š Dashboard (1 tool)

Tool Description
`g

Tools (18)

create_vmCreate a new Vagrant VM
create_dev_vmCreate VM with full config (CPU, memory, ports, sync)
ensure_dev_vmStart or create VM if not exists
get_vm_statusGet VM state
list_vmsList all VMs
destroy_vmDestroy VM (force)
exec_commandExecute command in VM (with timeout)
exec_with_syncExecute with rsync before/after
run_background_taskRun nohup background task
setup_dev_environmentInstall runtimes (node, python, go, etc.)
install_dev_toolsInstall tools (git, docker, nginx, etc.)
configure_shellConfigure aliases and env vars
upload_fileUpload file to VM
search_filesGrep search in VM
snapshot_saveCreate named snapshot before risky operations
snapshot_restoreRevert to a specific snapshot
list_processesReturn structured list of running processes (ps aux)
check_vm_portVerify if port is listening in VM & accessible from host

Configuration

claude_desktop_config.json
{
  "mcpServers": {
    "virtualbox": {
      "command": "virtualbox-mcp-server",
      "env": {}
    }
  }
}

Try it

β†’Create a new development VM with 2 CPUs and 4GB of RAM.
β†’Install Docker and Nginx on my current virtual machine.
β†’Take a snapshot of the VM named 'pre-deployment-test' before I run this script.
β†’Check if port 8080 is listening inside the VM and accessible from my host.
β†’List all running processes in the VM and kill the one using the most memory.

Frequently Asked Questions

What are the key features of Virtualbox MCP Server?

38 MCP Tools for complete VM lifecycle management including creation, status, and destruction.. Real-time observability with logs, dashboards, and progress tracking for background tasks.. Snapshot management for safe rollback and recovery during risky operations.. File synchronization with conflict resolution and rsync support between host and VM.. System guardrails for zombie VM detection and automated cleanup..

What can I use Virtualbox MCP Server for?

Automated provisioning of isolated development environments for AI agents.. Safe testing of scripts or deployments using snapshots to revert changes.. Programmatic monitoring and debugging of virtualized services via log tailing and process control.. Synchronizing local source code with a virtualized runtime for consistent cross-platform development..

How do I install Virtualbox MCP Server?

Install Virtualbox MCP Server by running: npm install -g @use.manus.ai/virtualbox-mcp-server

What MCP clients work with Virtualbox MCP Server?

Virtualbox MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use Virtualbox MCP Server with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free