
用于控制QEMU虚拟机的MCP服务器——让你的AI安全地获得完整的计算机访问权限
概览
让Claude(或任何兼容MCP的大型语言模型)看到你的屏幕、移动鼠标、敲击键盘和执行命令——所有这些都在一个隔离的QEMU虚拟机中完成。非常适合AI驱动的自动化、测试和计算机实验,同时不会危及主机系统。 一个模型上下文协议(MCP)服务器,用于通过SSH控制QEMU虚拟机。该服务器使LLM能够通过鼠标/键盘控制、截图和SSH命令执行与虚拟机交互。 - - 移动光标和点击按钮 - - 输入文本并发送键组合 - - 一次调用内执行一系列UI操作 - - 捕获并检索虚拟机截图 - - 在虚拟机上运行shell命令 - - 通过SFTP上传和下载文件 - - 将输出整理到包含日志、结果和建议的项目文件夹中 - - 保存并检索未来LLM会话的技巧 - Python 3。
概述(AI 翻译)
让你的人工智能安全地完全获得计算机访问权限。
让Claude(或任何兼容MCP的大型语言模型)看到你的屏幕、移动鼠标、敲键盘并执行命令——所有这些都在一个隔离的QEMU虚拟机中完成。非常适合AI驱动的自动化、测试和计算机实验,同时不会危及主机系统。
一个模型上下文协议(MCP)服务器,用于通过SSH控制QEMU虚拟机。该服务器使LLM能够通过鼠标/键盘控制、截图和SSH命令执行与虚拟机交互。
目录
- 特色
- 先决条件
- QEMU/libvirt 设置
- 安装
- 配置
- 使用情况
- 工具参考
- 典型工作流程
- 大型语言模型自动化的最佳实践
- 建筑学
- 已知问题与局限性
- 故障排除
特色
- 鼠标控制 - 移动光标和点击按钮
- 键盘输入 - 输入文本并发送键组合
- 动作批处理 - 在一次调用中执行一系列UI动作
- 截图 - 捕获并检索虚拟机截图
- SSH 命令执行 - 在虚拟机上运行 shell 命令
- 文件传输 - 通过SFTP上传和下载文件
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCP QEMU VM Control
Give your AI full computer access — safely.
Let Claude (or any MCP-compatible LLM) see your screen, move the mouse, type on the keyboard, and run commands — all inside an isolated QEMU virtual machine. Perfect for AI-driven automation, testing, and computer-use experiments without risking your host system.
A Model Context Protocol (MCP) server for controlling QEMU virtual machines via SSH. This server enables LLMs to interact with VMs through mouse/keyboard control, screenshots, and SSH command execution.
Table of Contents
- Features
- Prerequisites
- QEMU/libvirt Setup
- Installation
- Configuration
- Usage
- Tools Reference
- Typical Workflow
- Best Practices for LLM Automation
- Architecture
- Known Issues & Limitations
- Troubleshooting
Features
- Mouse Control - Move cursor and click buttons
- Keyboard Input - Type text and send key combinations
- Action Batching - Execute sequences of UI actions in one call
- Screenshots - Capture and retrieve VM screenshots
- SSH Command Execution - Run shell commands on the VM
- File Transfer - Upload and download files via SFTP
- Project Management - Organize outputs into project folders with logs, results, and advice
- Advice System - Save and retrieve tips for future LLM sessions
Prerequisites
Host System
- Python 3.12+
uv(recommended) orpip- QEMU/KVM with libvirt
- virt-manager (optional, for GUI management)
VM Requirements
- Linux with X11 desktop environment
- SSH server enabled
- Required packages:
openssh,xdotool,scrot,xrandr,xinput
QEMU/libvirt Setup
1. Install virtualization packages
Arch/Manjaro:
sudo pacman -S qemu-full libvirt virt-manager dnsmasq iptables-nft
Debian/Ubuntu:
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients virt-manager bridge-utils
Fedora:
sudo dnf install @virtualization
2. Configure libvirt
# Enable and start libvirtd
sudo systemctl enable --now libvirtd
# Add your user to libvirt group
sudo usermod -aG libvirt $USER
# Log out and back in, then verify
groups # should show 'libvirt'
3. Set up the default network
libvirt provides a default NAT network (192.168.122.0/24) that VMs use to communicate with the host:
# Check network status
virsh -c qemu:///system net-list --all
# If 'default' is not active, start it
virsh -c qemu:///system net-start default
# Enable autostart
virsh -c qemu:///system net-autostart default
The default network configuration:
- Bridge:
virbr0 - Host IP:
192.168.122.1 - DHCP range:
192.168.122.2-192.168.122.254 - Mode: NAT (VMs can access internet, host can access VMs)
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →