vm-lab-agent
An MCP server for managing home lab VMs and PNETLab topologies, enabling AI agents to power VMs, handle snapshots, and verify device configurations with explicit allowlists and confirmation gating.
README
vm-lab-agent
🚧 Status: Work in Progress
This is an active, incomplete project — parts of it are tested and working, parts are unverified against a real server, and there's a known dependency bug not yet fixed (see Known Issues below). Read
SECURITY.mdbefore running this against a lab you care about.
A small, sandboxed MCP server for students running network engineering / SOC analyst home labs (PNETLab, VMware Workstation, Wazuh, Kali, etc.). It lets an AI agent power VMs on/off, manage snapshots, build and control PNETLab topologies, and verify device configuration -- within an explicit allowlist you control, with every destructive action gated behind a confirmation step and every action logged.
Built for hands-on CCNP / Security+ / SOC-analyst practice: spin up a
topology, configure it yourself in PNETLab's own console (the actual
exam-relevant skill), and let the agent check your work with real
show command output afterward.
Compatible with any MCP client -- Claude Code, or any other tool that speaks the Model Context Protocol. Not locked to a single AI provider.
This project was designed and built with the assistance of Claude (Anthropic). See CREDITS.md. It is not an official Anthropic product and isn't endorsed by Anthropic.
Known issues (honest, not hidden)
- requirements.txt has a real, currently-unresolved dependency conflict. netmiko==4.7.0 requires paramiko<5.0; the two aren't simultaneously installable as currently pinned in this repo without manual adjustment. Workaround until fixed: pin paramiko==4.0.0 instead of whatever's currently in the file.
- pnetlab_lab_add_network and pnetlab_lab_connect_interface are built from an inferred API pattern, not a directly-observed working trace -- see SECURITY.md.
- dynamips and docker image types aren't supported by pnetlab_delete_image -- their directory layout wasn't confirmed with enough confidence to build against safely.
- VMware control tools aren't containerized the way the PNETLab SSH tools are -- vmrun needs to talk to VMware Workstation running on your actual host. See SECURITY.md for the full explanation.
None of these block basic use (VM power/snapshot/backup, PNETLab image search/install/delete, and node power/status on an existing topology all work and are tested) -- they're specifically the rough edges left from finishing this in one long build session.
Before you do anything else: read SECURITY.md
Seriously. SECURITY.md explains exactly what this agent can and can't touch. It also covers a real, dated MCP vulnerability (OX Security's April 2026 disclosure) and exactly why this project's design does and doesn't fall inside that exposure.
See REFERENCES.md for the primary sources behind every non-obvious design decision, and LEARNING.md if you want this project to double as CCNP/Security+/SOC-analyst study material rather than just a tool you install and forget.
What it does
| Tool | Confirm required? | What it does |
|---|---|---|
| list_managed_vms | No (read-only) | Lists VMs on your allowlist |
| vm_status | No (read-only) | Checks if a VM is running |
| vm_power_on | Yes | Powers on a VM |
| vm_power_off_soft | Yes | Graceful guest OS shutdown |
| vm_power_off_hard | Yes, + per-VM allow_destructive | Force power-off |
| vm_snapshot_create | Yes | Takes a snapshot |
| vm_snapshot_revert | Yes, + per-VM allow_destructive | Reverts to a snapshot |
| vm_clone_create | Yes | Creates a new VM by cloning an allowlisted one; new VM is not auto-allowlisted |
| vm_backup_to_location | Yes | Copies a VM's entire folder to a location you choose |
| vm_delete_permanently | Yes, + 3 more gates | Permanently deletes a VM. Not registered as a tool unless enable_vm_deletion: true. |
| pnetlab_search_image | No (read-only) | Searches PNETLab's ishare2 catalog |
| pnetlab_list_installed | No (read-only) | Lists images already installed, by type |
| pnetlab_pull_image | Yes | Downloads/installs an image |
| pnetlab_delete_image | Yes | Deletes an installed image (qemu + iol/bin only) |
| pnetlab_fix_permissions | Yes | Runs the standard post-install permission fix |
| device_read_config | No (read-only) | Runs a show command against a lab device -- only show commands accepted |
| pnetlab_lab_topology | No (read-only) | Reads a managed lab's current nodes |
| pnetlab_lab_node_status | No (read-only) | Reads running/stopped status of every node |
| pnetlab_lab_node_power | Yes | Starts or stops a specific node |
| pnetlab_lab_create | Yes | Creates a new empty lab; not auto-allowlisted |
| pnetlab_lab_add_node | Yes | Adds a router/switch/etc. to a lab's topology |
| pnetlab_lab_add_network | Yes | Adds a network/switch object (moderate confidence) |
| pnetlab_lab_connect_interface | Yes | Connects a node's interface to a network (moderate confidence) |
Setup
1. Prerequisites
- Python 3.12+
- VMware Workstation Pro/Player with vmrun installed
- A PNETLab server (optional -- only needed for PNETLab-related tools)
2. Install
git clone https://github.com/vikramjeet8105-engg/vm-lab-agent.git
cd vm-lab-agent
pip install -r requirements.txt
If this fails on a paramiko/netmiko conflict, open requirements.txt and change the paramiko line to paramiko==4.0.0, then retry.
3. Configure
cp config.example.yaml config.yaml
cp .env.example .env
Edit config.yaml: list the exact VMs (and optionally labs) you want the agent to touch. Anything not listed here is invisible to the agent -- read SECURITY.md for why this matters.
4. Test it locally
python -m pytest tests/ -v
5. Connect it to your MCP client
claude mcp add --transport stdio vm-lab-agent -- python -m src.server
Contributing
Issues and PRs welcome, especially fixes for anything in Known Issues above.
License
MIT -- see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。