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.

已驗證STDIO僅桌面瀏覽器自動化開發者工具

概覽

AI 產生的概覽

本機 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 自動化。
安裝前請注意
工具會作用於真實專案與裝置:建置、安裝、啟動 App、Git 提交與分支變更,以及包含任意指令轉送的 LLDB 操作,都可能改動程式碼、儲存庫與裝置狀態。UI 自動化需要建置並簽署 WebDriverAgent,實機流程需要簽署團隊。diagnose 工具群組預設關閉,需明確啟用。未宣告任何憑證,但此二進位檔以你本機的開發者權限執行。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 xcforge - iOS MCP Server & CLI,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

xcforge

[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)

bash
brew tap justinthevoid/tap && brew install xcforge

Claude Code (one-liner)

bash
claude mcp add xcforge -- xcforge

This registers xcforge as an MCP server in your current project. Run it after installing via Homebrew.

From source

bash
git clone https://github.com/justinthevoid/xcforge.gitcd xcforge && swift build -c releasecp .build/release/XCForgeCLI /usr/local/bin/xcforge

Uninstall

Homebrew

bash
brew uninstall xcforgebrew untap justinthevoid/tap   # optional: remove the tap

From source

bash
rm /usr/local/bin/xcforge

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:

bash
claude mcp remove xcforge

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):

json
{  "mcpServers": {    "xcforge": {      "command": "xcforge",      "args": [],      "type": "stdio"    }  }}

Claude Desktop

File: ~/Library/Application Support/Claude/claude_desktop_config.json

json
{  "mcpServers": {    "xcforge": {      "command": "/opt/homebrew/bin/xcforge",      "args": []    }  }}

Note: Claude Desktop does not inherit your shell PATH. Use the full Homebrew path — /opt/homebrew/bin/xcforge on Apple Silicon, /usr/local/bin/xcforge on Intel.

Cursor

File: .cursor/mcp.json in your project root (or ~/.cursor/mcp.json for global)

json
{  "mcpServers": {    "xcforge": {      "command": "/opt/homebrew/bin/xcforge",      "args": []    }  }}

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

json
{  "servers": {    "xcforge": {      "command": "xcforge",      "args": [],      "type": "stdio"    }  }}

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

json
{  "mcpServers": {    "xcforge": {      "command": "/opt/homebrew/bin/xcforge",      "args": []    }  }}

Note: Full path recommended. Restart Windsurf after editing.

Zed

File: ~/.config/zed/settings.json (or .zed/settings.json per-project)

json
{  "context_servers": {    "xcforge": {      "command": {        "path": "/opt/homebrew/bin/xcforge",        "args": []      },      "settings": {}    }  }}

Note: Zed uses "context_servers" with a nested "command.path" — different from every other client.

Config quick reference

ClientConfig keyFile locationNeeds absolute path?
Claude CodemcpServers.mcp.jsonNo
Claude DesktopmcpServers~/Library/Application Support/Claude/claude_desktop_config.jsonYes
CursormcpServers.cursor/mcp.jsonYes
VS Codeservers.vscode/mcp.jsonNo
WindsurfmcpServers~/.codeium/windsurf/mcp_config.jsonYes
Zedcontext_servers~/.config/zed/settings.jsonYes

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:

bash
xcforge skill install            # this repo: .claude/skills/xcforge (commit it to share with the team)xcforge skill install --global   # every project: ~/.claude/skills/xcforgexcforge skill install --dir <skills-dir>      # any other agent's skills directoryxcforge skill status             # where it's installed and whether it matches this xcforgexcforge skill show references/test-tools.md   # print one file without installing

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

bash
xcforge                          # MCP server (stdio JSON-RPC, 104 tools)xcforge build --scheme MyApp     # CLI mode (19 command groups)

Every tool available over MCP has a matching CLI command. Every CLI command supports --json.


Tools Overview

CategoryCountHighlights
Build6build_sim, build_compile (fast compile-only), build_run_sim, clean, project/scheme discovery
Test7test_sim with xcresult parsing, test_failures, test_coverage, list_tests, test_plan_inspect, agent output mode, known-failures gating
Simulator18Full lifecycle + video recording, location simulation, dark mode toggle, status bar override, info
Physical Devices10Via devicectl — list, install, launch (deep links, env), screenshot, WebDriverAgent on device
UI Automation20WebDriverAgent + native AX bridge — find, tap (point or pixel), swipe, drag, type, alerts
Screenshots3Framebuffer capture (0.3s), point-space coordinate alignment, optional grid overlay
Visual Regression3Pixel-diff baselines, multi-device checks (Dark Mode, Landscape, iPad), bless workflow
Logs44-layer filtered capture, 8 topic categories, regex wait
Console3stdout/stderr capture for launched apps
SPM5Resolve, update, show deps, reset, clean
Accessibility5Audit labels, traits, VoiceOver order, contrast
Git5Status, diff, log, commit, branch
LLDB Debugger8Attach, breakpoints, inspect variables, backtrace, step/continue, arbitrary commands
Diagnosis10Multi-step workflows: build, run, inspect, capture evidence, compare, verify
Plan Execution2Scripted multi-step automation with assertions
Session3Persistent defaults, .xcforge.yaml repo config, session profiles

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_element with scroll: true auto-scrolls using 3 fallback strategies
  • handle_alert searches across SpringBoard, ContactsUI, and the active app — accept_all clears multiple permission dialogs in one call
  • drag_and_drop works with element IDs, not just coordinates
  • get_source returns the full view hierarchy in ~20ms

Topic-Filtered Logs

start_log_capture streams os_log through 4 filter layers:

  1. Noise exclusion — strips 15 known noisy processes at the stream level
  2. Capture modes — smart (broad + topic-ready), app (tight, auto-detected bundle), verbose
  3. Topic filtering — read_logs classifies lines into 8 topics (app, crashes, network, lifecycle, springboard, widgets, background, system) and shows only app + crashes by default
  4. 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

bash
xcforge init                                     # Scaffold a committed .xcforge.yaml (repo defaults)xcforge build                                    # Build (auto-detects project, scheme, sim)xcforge build compile --scheme MyApp             # Fast compile-only check (~5s)xcforge build --scheme MyApp --simulator "iPhone 16 Pro"xcforge test --scheme MyApp --json               # Run tests, JSON outputxcforge test --for agent                         # Agent-optimized slim JSONxcforge test --gate                              # Subtract known-failures.yamlxcforge test rerun-failed                        # Replay last run's failuresxcforge test plan inspect --plan AllTests        # Inspect .xctestplanxcforge build-test --env BLESS_BASELINE=1        # Inject env var into test processxcforge test failures --xcresult /path/to.xcresultxcforge test coverage --min-coverage 80xcforge bless --baseline login --tests "UITests/LoginTests"  # Baseline+test+diff in one callxcforge sim list                                 # List simulatorsxcforge sim boot "iPhone 16 Pro"xcforge sim info                                 # Booted simulator screen size and scalexcforge ui find --aid "loginButton"              # Find by accessibility IDxcforge ui tap --element el-0                    # Tap element at point coordinatesxcforge ui tap-pixel --x 750 --y 1334            # Tap at pixel coordinatesxcforge screenshot                               # Screenshot to stdoutxcforge screenshot --grid --output /tmp/x.png    # Screenshot with point-coordinate gridxcforge pose Settings                            # Build, install, launch to a screenxcforge log start                                # Start log capturexcforge log read --include network               # Read with topic filterxcforge spm resolve                              # Resolve packagesxcforge device list                              # Connected physical devicesxcforge debug attach --bundle-id com.example.App    # Attach debuggerxcforge debug breakpoint set --bundle-id com.example.App --file ViewController.swift --line 42xcforge debug inspect --bundle-id com.example.App --expression "self.count"xcforge debug backtrace --bundle-id com.example.App # Show stack tracexcforge debug continue --bundle-id com.example.App --mode step-overxcforge diagnose start --scheme MyApp            # Start diagnosis session

Alternatives

There are several iOS-focused MCP servers worth knowing about:

ServerStarsScopeBuildTestUI AutomationScreenshotsVisual RegressionAccessibilityPhysical DevicesSPMGitLogs
xcforge—104 toolsYesYesYesYesYesYesYesYesYesYes
XcodeBuildMCP~5k~15 toolsYesYesPartialNoNoNoNoNoNoNo
ios-simulator-mcp~1.8k~10 toolsNoNoYesYesNoNoNoNoNoNo
xcode-mcp-server~370~8 toolsPartialNoNoNoNoNoNoNoNoNo
iosef<10~5 toolsNoNoYesNoNoNoNoNoNoNo
Appium MCP<50~10 toolsNoNoYesYesNoNoPartialNoNoNo
  • 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:

  1. xcforgeWDA (preferred) — xcforge's own WDA fork (com.xcforge.wda.runner). Auto-built and deployed when XCFORGE_WDA_DIR is set.
  2. 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:

bash
git clone https://github.com/appium/WebDriverAgent.git xcforgeWDA
# Copy project with xcforge name and remap bundle IDcp -r xcforgeWDA/WebDriverAgent.xcodeproj xcforgeWDA/xcforgeWDA.xcodeprojsed -i '' 's/com\.facebook\.WebDriverAgentRunner/com.xcforge.wda.runner/g' \  xcforgeWDA/xcforgeWDA.xcodeproj/project.pbxproj
# Add xcforgeWDARunner schemecp xcforgeWDA/xcforgeWDA.xcodeproj/xcshareddata/xcschemes/WebDriverAgentRunner.xcscheme \   xcforgeWDA/xcforgeWDA.xcodeproj/xcshareddata/xcschemes/xcforgeWDARunner.xcschemesed -i '' 's/WebDriverAgent\.xcodeproj/xcforgeWDA.xcodeproj/g' \  xcforgeWDA/xcforgeWDA.xcodeproj/xcshareddata/xcschemes/xcforgeWDARunner.xcscheme

Then add XCFORGE_WDA_DIR to your MCP config:

json
{  "mcpServers": {    "xcforge": {      "command": "xcforge",      "env": {        "XCFORGE_WDA_DIR": "/path/to/xcforgeWDA"      }    }  }}

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.

bash
cd Webbun installbun run typecheckbun run lintbun run validate

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:

bash
cd Webbun run doctor

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
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分