mcp-qemu-lab
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., "@mcp-qemu-lab Start the VM and take a full guest RAM dump for forensic analysis."
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.
mcp-qemu-lab
Local Model Context Protocol (MCP) server for Linux binary analysis in QEMU guests.
This server runs over STDIO, is safe by default, and exposes tools for:
VM lifecycle (create/start/stop/snapshots)
Full guest RAM dumps
In-guest debugger workflows and per-process core dumps
Artifact indexing/resources (metadata in tool output, file content via MCP resources)
Repository Layout
mcp_qemu_lab/server sourcetests/unit/integration testspyproject.tomlpackage + entrypointuv.lockpinned Python dependency lock file
Not tracked in git:
runtime workspaces/logs/artifacts (
.mcp-qemu-lab*/)local virtual envs (
.venv/)local tool caches (
tools/)local sample binaries (
test samples/)
Related MCP server: Protocol-SIFT-Async-Bridge
Host Requirements
Python 3.11+
uvpackage managerQEMU (
qemu-system-x86_64andqemu-img)OpenSSH client tools (
ssh,scp,ssh-keygen)
Install Host Dependencies
Windows
Install
uv:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Install QEMU (includes
qemu-system-x86_64.exeandqemu-img.exe):
winget install --id QEMU.QEMU --exact --accept-package-agreements --accept-source-agreementsEnsure OpenSSH Client is installed:
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0Verify:
qemu-system-x86_64 --version
qemu-img --version
ssh -VLinux (Ubuntu/Debian)
sudo apt update
sudo apt install -y qemu-system-x86 qemu-utils openssh-client cloud-image-utilsLinux (Fedora/RHEL family)
sudo dnf install -y qemu-system-x86 qemu-img openssh-clients cloud-utilsLinux (Arch)
sudo pacman -S --needed qemu-base qemu-desktop openssh cloud-utilsRun From GitHub URL (No Local Project Path Needed)
You can launch directly from GitHub with uvx:
uvx --from git+https://github.com/Kevin4562/QEMU-MCP.git mcp-qemu-labRecommended pin (branch/tag/commit):
uvx --from git+https://github.com/Kevin4562/QEMU-MCP.git@main mcp-qemu-labMCP Client Configuration
VSCode Codex (TOML)
Example config.toml:
Windows:
[mcp_servers.mcp-qemu-lab]
command = "uvx"
args = ["--from", "git+https://github.com/Kevin4562/QEMU-MCP.git@main", "mcp-qemu-lab"]
env = { MCP_QEMU_LAB_WORKSPACE = "C:\\Users\\User\\AppData\\Local\\mcp-qemu-lab" }Linux:
[mcp_servers.mcp-qemu-lab]
command = "uvx"
args = ["--from", "git+https://github.com/Kevin4562/QEMU-MCP.git@main", "mcp-qemu-lab"]
env = { MCP_QEMU_LAB_WORKSPACE = "/home/user/.local/share/mcp-qemu-lab" }Cursor (JSON)
Example mcp.json:
{
"mcpServers": {
"mcp-qemu-lab": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/Kevin4562/QEMU-MCP.git@main",
"mcp-qemu-lab"
],
"env": {
"MCP_QEMU_LAB_WORKSPACE": "/absolute/path/to/mcp-qemu-lab-workspace"
}
}
}
}Windows workspace example:
{
"mcpServers": {
"mcp-qemu-lab": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/Kevin4562/QEMU-MCP.git@main",
"mcp-qemu-lab"
],
"env": {
"MCP_QEMU_LAB_WORKSPACE": "C:\\Users\\User\\AppData\\Local\\mcp-qemu-lab"
}
}
}
}Safety Defaults
Guest networking default:
net_mode="none"No host directory sharing by default
guest_execallowlist unlessunsafe_allow_arbitrary_commands=trueper callTool outputs return JSON metadata only (no raw memory bytes)
Artifacts are stored on disk and exposed via MCP resources
Every tool call writes audit JSONL entries
Key Tools
ensure_dependenciesvm_create,vm_start,vm_status,vm_stopvm_snapshot_save,vm_snapshot_loadguest_wait_readyguest_exec,guest_copy_in,guest_copy_outprocess_list,process_mapsdebugger_attach,debugger_set_breakpoint,debugger_continue,debugger_read_registers,debugger_detachprocess_dump_coreguest_dump_memoryartifacts_listvm_logs_tail
Resources
artifact://{artifact_id}artifact contentartifact-index://allartifact metadata index
Development Setup (Optional Local Clone Workflow)
If you are developing this repo locally:
uv sync
uv run --extra dev pytest -qIntegration test (real VM boot):
MCP_QEMU_LAB_RUN_INTEGRATION=1 MCP_QEMU_LAB_INTEGRATION_TIMEOUT_SEC=1800 uv run --extra dev pytest -m integrationWindows PowerShell:
$env:MCP_QEMU_LAB_RUN_INTEGRATION = "1"
$env:MCP_QEMU_LAB_INTEGRATION_TIMEOUT_SEC = "1800"
uv run --extra dev pytest -m integrationTroubleshooting
dependency_missing: install QEMU/OpenSSH and verify binaries are onPATH.dependency_privilege_required: rerun install command with elevated permissions.ssh_unavailable: VM must be created withnet_mode="user"for SSH-based tools.gdb/attach failures: runguest_wait_ready(..., require_gdb=true)before debugger/core tools.
Available Tools
22 toolsartifacts_listB
List artifacts with hashes and provenance.
Inputs: vm_id. Returns: object
debugger_attachC
Create an in-guest debugger session handle for a target PID.
Inputs: vm_id (required), pid (required), ready_timeout_sec, pid_check_timeout_sec. Returns: object
debugger_continueC
Continue execution for debugger session.
Inputs: session_id (required), timeout_sec. Returns: object
debugger_detachB
Detach and mark debugger session inactive.
Inputs: session_id (required). Returns: object
debugger_read_registersC
Read process registers via in-guest gdb attach.
Inputs: session_id (required), timeout_sec. Returns: object
debugger_set_breakpointC
Set breakpoint (symbol or address) for a debugger session.
Inputs: session_id (required), location (required). Returns: object
ensure_dependenciesB
Checks and auto-installs host dependencies, prepares workspace, and records versions.
Inputs: no named parameters. Returns: object
guest_copy_inC
Copy a host file into the guest filesystem via SCP.
Inputs: vm_id (required), host_path (required), guest_path (required), timeout_sec. Returns: object
guest_copy_outC
Copy a file artifact out of the guest and return artifact metadata.
Inputs: vm_id (required), guest_path (required), host_subdir, timeout_sec. Returns: object
guest_dump_memoryC
Dump full guest memory to a host artifact file via QMP.
Inputs: vm_id (required), output_label, compress, timeout_sec. Returns: object
guest_execC
Execute an allowlisted guest command over SSH, with optional per-call unsafe override.
Inputs: vm_id (required), allowed_command (required), args, unsafe_allow_arbitrary_commands, +2 more. Returns: object
guest_wait_readyB
Wait for guest SSH/cloud-init readiness and optional debugger dependencies (gdb).
Inputs: vm_id (required), timeout_sec, poll_interval_sec, wait_for_cloud_init, +1 more. Returns: object
process_dump_coreC
Generate a process core dump in guest via gdb/gcore and copy artifact out.
Inputs: vm_id (required), pid (required), reason_label, gdb_timeout_sec, +1 more. Returns: object
process_listC
List guest processes with pid, user, and cmdline.
Inputs: vm_id (required), filter, timeout_sec. Returns: object
process_mapsB
Return parsed /proc//maps for a guest process.
Inputs: vm_id (required), pid (required), timeout_sec. Returns: object
vm_createC
Create a VM definition, disks, and cloud-init seed image.
Inputs: name (required), arch, cpu, mem_mb, +4 more. Returns: object
vm_logs_tailB
Fetch recent QEMU/serial/debug log tails and related audit lines for a VM.
Inputs: vm_id (required), lines, include_serial, include_debug, +1 more. Returns: object
vm_snapshot_loadC
Load a VM snapshot by name via QMP HMP bridge.
Inputs: vm_id (required), snapshot_name (required), timeout_sec. Returns: object
vm_snapshot_saveC
Save a VM snapshot by name via QMP HMP bridge.
Inputs: vm_id (required), snapshot_name (required), timeout_sec. Returns: object
vm_startC
Start a VM and return QMP/SSH endpoints.
Inputs: vm_id (required), qmp_wait_timeout_sec, qmp_command_timeout_sec. Returns: object
vm_statusB
Get VM runtime/QMP/SSH status and log file paths.
Inputs: vm_id (required), qmp_command_timeout_sec. Returns: object
vm_stopC
Stop a VM gracefully or forcefully.
Inputs: vm_id (required), mode, graceful_timeout_sec, force_timeout_sec, +1 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 22 tools
Each tool has a clearly distinct purpose with no ambiguity, as they target specific actions on well-defined resources like VM operations, guest interactions, debugging, or process management. For example, vm_start, vm_stop, and vm_status are distinct lifecycle actions, while debugger_attach, debugger_continue, and debugger_detach are separate debugging steps.
Tool names follow a highly consistent verb_noun pattern throughout, such as vm_start, guest_copy_in, debugger_attach, and process_list. This predictability makes it easy for agents to understand and select the right tool based on its naming convention.
With 22 tools, the count is slightly high but reasonable for the comprehensive scope of QEMU lab management, covering VM lifecycle, guest operations, debugging, and process handling. It feels slightly heavy but each tool appears to earn its place without obvious redundancy.
The tool set provides complete coverage for the QEMU lab domain, including VM creation, start/stop/status, snapshot management, guest file operations, process debugging, and dependency checks. There are no apparent gaps that would hinder agent workflows, as all essential operations are supported.
Maintenance
Related MCP Connectors
MCP server for Superserve sandboxes: create, exec, and manage Firecracker microVMs
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
Ovanek MCP: Model Context Protocol server for Ovanek platform tools; writes are dry-run by default.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn Model Context Protocol server that enables LLMs to autonomously reverse engineer applications by exposing Ghidra's decompilation and analysis tools. It allows AI agents to list code structures, rename methods, and analyze binaries directly through MCP-compatible clients.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceA production-grade, type-safe MCP server for memory forensics via Volatility 3, enabling LLM-assisted incident response without timeouts or evidence spoliation.1MIT
- AlicenseBqualityCmaintenanceMCP server wrapping GDB and GEF for dynamic analysis, enabling interactive debugging and memory inspection via GDB/MI protocol.141MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server for automated crash analysis using GDB.MIT