
xcforge - iOS MCP Server & CLI
io.github.justinthevoid由 GitHub 账号 justinthevoid 发布v1.0.0更新于 Oct 27, 2026
95 MCP tools for iOS — build, test, simulate, automate UI, capture, and diagnose.
概览
本地 MCP 服务器兼 CLI,为 AI 助手提供 100 多个工具,用于在模拟器和真机上构建、测试、自动化操作与调试 iOS 应用。
- 可以做什么
- 构建和清理 Xcode 工程、发现 scheme,并执行仅编译的快速检查
- 在模拟器上运行测试,解析 xcresult 得到通过/失败、失败详情、覆盖率与测试计划
- 管理模拟器与真机:启动、安装、运行、截图、录屏、模拟定位
- 通过 WebDriverAgent 与无障碍桥接做 UI 自动化:查找、点击、滑动、输入、处理弹窗
- 采集并按主题过滤日志与控制台输出,对基线做视觉回归像素比对
- 附加 LLDB 调试:断点、变量、调用栈、单步执行;另含 SPM、Git 与无障碍审计
- 适用场景
- 适合让助手完整跑通 iOS 开发闭环:构建、测试、复现 UI 流程、截图与抓日志、定位问题,而不必在 Xcode、simctl 和多个自动化工具之间切换。它只支持 iOS,对 Android、watchOS 或 visionOS 工作没有帮助。
- 运行要求
- 以本地二进制运行,需要 macOS 13+ 与 Xcode 15+;从源码构建还需 Swift 6.0+。可通过 Homebrew 安装或从源码编译,然后在 MCP 客户端配置中注册命令(部分客户端需填绝对路径)。UI 自动化还需一个 WebDriverAgent 工程,并通过 XCFORGE_WDA_DIR 环境变量指定;真机自动化需要签名团队,并在设备上开启 UI 自动化。
安装
在 SourceWeft 中
- 打开 控制台中的 xcforge - iOS MCP Server & CLI,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
xcforge
[License: MIT] [Platform] [Swift 6.0] [MCP] [Homebrew] [GitHub release] [PRs Welcome]
An MCP server and CLI for iOS development — build, test, automate, and diagnose from any AI agent or terminal.
104 MCP tools. 19 CLI command groups. Single native binary (~8 MB stripped, ~18 MB with debug symbols). Zero external runtime dependencies.
Install
Homebrew (recommended)
Claude Code (one-liner)
This registers xcforge as an MCP server in your current project. Run it after installing via Homebrew.
From source
Uninstall
Homebrew
From source
Remove MCP configuration
After uninstalling the binary, remove the "xcforge" entry from your MCP client config file (see Configure for file locations).
For Claude Code:
Configure
Add xcforge to your MCP client. Each client has a different config format and file location.
Claude Code
The fastest way is the CLI command shown above under Install. To configure manually, add to .mcp.json in your project root (or ~/.claude/.mcp.json for global):
Claude Desktop
File: ~/Library/Application Support/Claude/claude_desktop_config.json
Note: Claude Desktop does not inherit your shell PATH. Use the full Homebrew path —
/opt/homebrew/bin/xcforgeon Apple Silicon,/usr/local/bin/xcforgeon Intel.
Cursor
File: .cursor/mcp.json in your project root (or ~/.cursor/mcp.json for global)
Note: Same PATH caveat as Claude Desktop — use the absolute path. Restart Cursor after changes.
VS Code (GitHub Copilot)
File: .vscode/mcp.json in your project root
Note: VS Code uses
"servers"not"mcpServers". Requires the GitHub Copilot extension with agent mode enabled. VS Code typically resolves PATH from your shell, so the bare command works.
Windsurf
File: ~/.codeium/windsurf/mcp_config.json
Note: Full path recommended. Restart Windsurf after editing.
Zed
File: ~/.config/zed/settings.json (or .zed/settings.json per-project)
Note: Zed uses
"context_servers"with a nested"command.path"— different from every other client.
Config quick reference
Claude Code Skill
xcforge ships an agent skill: the tool reference an agent loads when it works on iOS tasks. The binary carries it, so installing it needs nothing else:
Re-run xcforge skill install after upgrading xcforge to refresh the copy; only changed files are rewritten. It won't overwrite an xcforge skill directory it didn't create unless you pass --force. xcforge skill uninstall removes it.
Once installed, Claude will automatically load the right reference files when you use xcforge tools — exact parameters, return values, and usage patterns for each category (build, test, simulator, UI automation, logs, LLDB, diagnosis, and more).
Two Modes, Same Tools
Every tool available over MCP has a matching CLI command. Every CLI command supports --json.
Tools Overview
Key Capabilities
Structured Test Results
Test output is parsed from .xcresult bundles — the structured format Xcode generates internally — not from raw xcodebuild stdout/stderr.
A single test_sim call returns: pass/fail counts, failure messages with source location, exported failure screenshots, and the xcresult path for deeper inspection via test_failures or test_coverage.
Fast Screenshots
The screenshot tool reads the simulator framebuffer via CoreSimulator's IOSurface API, falling back to ScreenCaptureKit, then simctl. Typical latency is ~300ms.
UI Automation Without Appium
xcforge communicates directly with WebDriverAgent over HTTP and supplements it with a native Accessibility API bridge (AXPBridge). This means:
find_elementwithscroll: trueauto-scrolls using 3 fallback strategieshandle_alertsearches across SpringBoard, ContactsUI, and the active app —accept_allclears multiple permission dialogs in one calldrag_and_dropworks with element IDs, not just coordinatesget_sourcereturns the full view hierarchy in ~20ms
Topic-Filtered Logs
start_log_capture streams os_log through 4 filter layers:
- Noise exclusion — strips 15 known noisy processes at the stream level
- Capture modes —
smart(broad + topic-ready),app(tight, auto-detected bundle),verbose - Topic filtering —
read_logsclassifies lines into 8 topics (app, crashes, network, lifecycle, springboard, widgets, background, system) and shows only app + crashes by default - Deduplication — collapses repeated lines
The response includes a topic menu with counts, so the agent can pull in specific topics on demand without re-querying.
Interactive LLDB Debugger
8 tools for attaching LLDB to running simulator processes, setting breakpoints, inspecting variables, viewing stack traces, and stepping through code. Sessions persist for 30 minutes, so you can attach once and run multiple debugging operations. CLI commands are one-shot (attach → operation → detach). Includes:
- Session management:
lldb_attach(by bundle ID or PID),lldb_detach - Breakpoints: set by file+line or function name, remove by ID
- Inspection: evaluate expressions at the current frame, view stack traces
- Execution control: continue, step over, step into, step out (with 10-second timeout)
- Raw passthrough: run arbitrary LLDB commands
Use alongside logs and screenshots for systematic root-cause analysis.
Diagnosis Workflows
10 tools (off by default: turn them on with XCFORGE_TOOL_GROUPS=+diagnose or tool_groups) that chain together into structured diagnostic pipelines — start a session, build, launch, capture runtime signals, collect evidence (screenshots, logs, accessibility state), compare against previous runs, and verify fixes. Designed for agents to systematically debug issues across multiple iterations.
Physical Device Support
Tools wrapping Apple's devicectl for real devices: list connected devices, install, launch (with deep links and environment variables) and terminate apps, and take screenshots. xcforge wda start --device <udid> --team <TEAM> (MCP wda_start) builds, signs and starts WebDriverAgent on the device so the UI automation tools work there too; see device-tools.md.
CLI Examples
Alternatives
There are several iOS-focused MCP servers worth knowing about:
- XcodeBuildMCP — The most popular iOS MCP server. Backed by Sentry. Covers build, test, and simulator management well. If you only need build/run workflows, it's a solid choice.
- ios-simulator-mcp — Focused on simulator UI interaction — screenshots, taps, swipes, accessibility tree. Good if you only need simulator automation.
- xcode-mcp-server — Early MCP server for Xcode project management. Basic integration — no simulator automation, testing, or device support.
- iosef — Agent-optimized simulator CLI with clean ergonomics. Narrow scope but thoughtful design. Swift native.
- Appium MCP — Cross-platform (iOS + Android) via the Appium ecosystem. Requires Node.js + Java + Appium server — heavier dependency chain.
Where xcforge fits: It combines fast compile checks, build, test, pixel-accurate UI automation, screenshot grids, screen-targeted launch, log analysis, visual regression, device support, SPM, accessibility auditing, and multi-step diagnosis in a single zero-dependency binary. The trade-off is iOS-only — no Android, watchOS, or visionOS.
UI Automation Setup
UI automation tools require a WebDriverAgent (WDA) backend running on the simulator. xcforge manages the WDA connection automatically — you just need to point it at a WDA project.
xcforge tries two backends in order:
- xcforgeWDA (preferred) — xcforge's own WDA fork (
com.xcforge.wda.runner). Auto-built and deployed whenXCFORGE_WDA_DIRis set. - Original WebDriverAgent (fallback) — Facebook/Appium's WDA. Picked up automatically if WDA is already running on port 8100.
Quick setup
Clone appium/WebDriverAgent, rename the project and scheme for xcforge, then set XCFORGE_WDA_DIR:
Then add XCFORGE_WDA_DIR to your MCP config:
xcforge builds and deploys WDA automatically on the first UI tool call on a simulator (~30–60s on first run, instant thereafter). For a physical device run xcforge wda start --device <udid> --team <TEAM> (MCP wda_start) first, with the device unlocked and Settings > Developer > Enable UI Automation on. See the full UI Automation Setup guide for alternative configurations, custom ports, and troubleshooting.
Requirements
- macOS 13+
- Xcode 15+
- Swift 6.0+ (source builds only)
- WebDriverAgent (UI automation only — see UI Automation Setup)
Web Baseline (Story 1.1)
The Web workspace is isolated under Web/ and uses Astro Starlight plus Svelte with Bun-only package/script usage and Biome-only lint/format checks.
Local route assumptions after bun run dev:
- Marketing route:
http://localhost:4321/ - Docs route:
http://localhost:4321/docs - Docs depth route:
http://localhost:4321/docs/getting-started
If setup fails, run:
Remediation steps are documented in Web/README.md.
Support
If xcforge saves you time, consider supporting development:
[Buy Me a Coffee] [Ko-fi] [GitHub Sponsors]
License
MIT — see LICENSE.
Contributing
Issues and PRs welcome. See CONTRIBUTING.md.
来源:README.md,提交 513fcdb
工具
0版本历史
1- v1.0.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分