
pluginslab/vphone-mcp 是从 https://github.com/pluginslab/vphone-mcp. 导入的 MCP 服务器候选
概览
pluginslab/vphone-mcp 是从 https://github.com/pluginslab/vphone-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
MCP 服务器用于对 vphone-cli iOS 虚拟机的程序化控制。通过将虚拟机的显示、触摸输入和导航作为 MCP 工具,实现 AI 驱动的端对端测试。
它是如何运作的
每个操作都会在响应中内联返回一个紧凑的灰度截图(~20-30KB),这样LLM可以在不进行单独调用的情况下看到发生了什么。
布置
需要 uv 和运行的 vphone-cli 虚拟机,启用主机控制套接字(PR #261)。
克劳德·科德
加到~/.claude/settings.json:
克劳德桌面
加到~/Library/Application Support/Claude/claude_desktop_config.json:
工具
硬件钥匙
| 工具 | 描述 |
|---|---|
go_home |
按下主页键 |
press_power |
锁定/唤醒屏幕 |
volume_up |
音量提升 |
volume_down |
音量降低 |
截图
| 工具 | 描述 |
|---|---|
screenshot |
捕获虚拟机显示(返回嵌入图像) |
预先绘制导航
| 工具 | 描述 |
|---|---|
open_app(name) |
从主屏幕按名称打开应用 |
tap_back |
点击iOS返回按钮(左上角) |
scroll_down |
往下滚动到当前画面 |
scroll_up |
在当前屏幕上向上滚动 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
vphone-mcp
MCP server for programmatic control of vphone-cli iOS VMs. Enables AI-driven E2E testing by exposing the VM’s display, touch input, and navigation as MCP tools.
How it works
Claude Code / Claude Desktop
│ MCP (stdio)
▼
vphone-mcp (Python)
│ Unix socket (JSON)
▼
vphone-cli (Swift, vm/vphone.sock)
│ Virtualization.framework
▼
iOS 26 VM
Every action returns a compact grayscale screenshot (~20-30KB) inline in the response, so the LLM can see what happened without a separate call.
Setup
Requires uv and a running vphone-cli VM with the host control socket enabled (PR #261).
git clone https://github.com/pluginslab/vphone-mcp.git
cd vphone-mcp
uv sync
Claude Code
Add to ~/.claude/settings.json:
{
"mcpServers": {
"vphone": {
"command": "uv",
"args": ["--directory", "/path/to/vphone-mcp", "run", "vphone-mcp"],
"env": {
"VPHONE_SOCK": "/path/to/vphone-cli/vm/vphone.sock"
}
}
}
}
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"vphone": {
"command": "uv",
"args": ["--directory", "/path/to/vphone-mcp", "run", "vphone-mcp"],
"env": {
"VPHONE_SOCK": "/path/to/vphone-cli/vm/vphone.sock"
}
}
}
}
Tools
Hardware Keys
| Tool | Description |
|---|---|
go_home |
Press home button |
press_power |
Lock/wake the screen |
volume_up |
Volume up |
volume_down |
Volume down |
Screenshots
| Tool | Description |
|---|---|
screenshot |
Capture the VM display (returns embedded image) |
Pre-mapped Navigation
| Tool | Description |
|---|---|
open_app(name) |
Open an app by name from the home screen |
tap_back |
Tap the iOS back button (top-left) |
scroll_down |
Scroll down on current screen |
scroll_up |
Scroll up on current screen |
open_notification_center |
Swipe down from top-left |
open_control_center |
Swipe down from top-right |
open_app_switcher |
Slow swipe up from bottom |
open_search |
Tap the home screen Search bar |
swipe_to_next_page |
Swipe to next home screen page |
swipe_to_previous_page |
Swipe to previous home screen page |
Supported app names for open_app: FaceTime, Calendar, Photos, Mail, Notes, Reminders, Clock, TV, Games, App Store, Maps, Health, Wallet, Settings, Phone, Safari, Messages, Music.
Raw Interaction
| Tool | Description |
|---|---|
tap(x, y) |
Tap at pixel coordinates (1290x2796) |
swipe(x1, y1, x2, y2, duration_ms) |
Swipe between two points |
Use screenshot() first to identify coordinates for app-specific UI elements.
Example session
User: Open Settings and navigate to General > About
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"vphone": {
"command": "uv",
"args": ["--directory", "/path/to/vphone-mcp", "run", "vphone-mcp"],
"env": {
"VPHONE_SOCK": "/path/to/vphone-cli/vm/vphone.sock"
}
}
}
}