
Baepsae
io.github.oozoofrog由 GitHub 帳號 oozoofrog 發布v6.3.0更新於 Oct 24, 2026
Local MCP server for iOS Simulator and macOS app automation with a native Swift bridge
概覽
本機 MCP 伺服器,透過原生 Swift 橋接讓助理檢查與操作 iOS 模擬器及 macOS 應用程式。
- 可以做什麼
- 檢查並查詢 UI 無障礙樹,依識別碼或標籤執行點擊、輸入、滑動、捲動、拖放與設值,支援切換分頁、偵測對話框、等待 UI 變化,並以 run_steps 串接多步操作。送出鍵盤輸入、按鍵序列與組合鍵、觸控輸入,並列出或切換輸入來源。管理模擬器:列出裝置、截圖、錄製或串流影片、開啟網址,以及安裝、啟動、終止或解除安裝應用程式。操作 macOS 應用程式與視窗:列出應用程式和視窗、啟用或聚焦視窗、擷取應用程式畫面、右鍵、使用右鍵選單與選單操作、讀取剪貼簿、監看通知。執行診斷:提供說明、版本與 doctor 環境檢查工具。
- 適用情境
- 適合在模擬器中開發或測試 iOS 應用程式、或在 Mac 上自動化 macOS 應用程式時使用,讓助理檢查介面、執行點擊與輸入、截圖或錄影,並管理應用程式的安裝與啟動。僅支援 macOS,Linux 與 Windows 無法使用。
- 執行需求
- 需要 macOS 14 或更新版本,並安裝 Xcode 或 Xcode 命令列工具(用於 xcrun simctl 及 Swift 6+ 編譯原生二進位檔),以及 Node.js 18 或更新版本;可透過 npx 或 npm 安裝。必須為啟動它的終端機、MCP 用戶端或執行時程序(node)授予輔助使用權限,授權後可能需要重新啟動該程序。模擬器功能需要已啟動的模擬器。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Baepsae,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
mcp-baepsae
Baepsae (Vinous-throated Parrotbill) — A tiny Korean bird. Round, chubby, and constantly hopping around chirping. Known for its grit — even when a little bird tries to keep up with a stork, it never gives up. This project is small too, but it pecks away at your simulators tirelessly.
Local MCP server for iOS Simulator and macOS app automation with a TypeScript MCP layer and a Swift native bridge.
한국어 문서는 README-KR.md를 참고하세요.
Table of Contents
- Prerequisites
- Platform Support
- Install
- Permissions
- MCP Setup (Recommended)
- Client Matrix
- For LLM
- Manual Setup (Fallback)
- Project Structure
- Commands
- MCP Tool Status
- Usage Examples
- Troubleshooting
Prerequisites
- macOS 14+
- Xcode + iOS Simulator
- Node.js 18+
- Swift 6+
Platform Support
Why macOS only?
The Swift native bridge (baepsae-native) uses macOS-specific frameworks (AppKit, CoreGraphics, Accessibility) to interact with iOS Simulator and macOS applications. These frameworks are not available on Linux or Windows. The TypeScript MCP layer also relies on xcrun simctl, which is part of Xcode Command Line Tools and only available on macOS.
Requirements summary:
- macOS 14 or later -- required for iOS Simulator automation and Accessibility API access.
- Xcode or Xcode Command Line Tools -- required for Swift 6+ compilation of the native binary and
xcrun simctlcommands. - Node.js >= 18.0.0 -- required to run the TypeScript MCP server.
Permissions
Accessibility permission is required for UI inspection and input automation features (use unified generic tools such as analyze_ui, tap, right_click).
The important detail is that permission usually needs to be granted to the automation host / runtime process, not to the target app you are automating.
Which process usually needs permission?
- Direct native binary invocation
- Example:
baepsae-native ... - Most relevant entry: the
baepsae-nativebinary itself, plus the terminal/shell app that launched it
- Example:
- Node / npx MCP runtime
- Example:
node dist/index.js,npx -y mcp-baepsae@latest - Most relevant entry: the runtime process (
node), plus the terminal or MCP client app that launched it
- Example:
- Desktop / CLI MCP clients
- Example: Claude Code, Codex CLI/Desktop, Gemini CLI
- Relevant entries can include the MCP client app, the terminal host, and the runtime process depending on launch path
Recommended setup flow
- Open System Settings > Privacy & Security > Accessibility.
- Enable the terminal or MCP client app you actually use.
- Enable the runtime process if listed (
node,bun, etc.). - For direct native invocation, also enable the
baepsae-nativebinary entry if it appears separately. - If an entry is missing, click
+and add it manually.
Important note
After granting permission, the launching process may need to be restarted before macOS applies the change.
If the error persists, quit and relaunch the terminal, MCP client, or runtime process that started mcp-baepsae.
For simulator targets, selector-based actions (tap / right_click with id or label) search in-app content by default. Set all: true to include Simulator chrome UI.
Install
Option A) npm (easiest)
On macOS, the Swift native binary is built automatically during install. If Swift is not available, the server still works with simctl-based features.
If you plan to use UI inspection or input automation right away, grant Accessibility permission to the terminal / MCP client / runtime process you will actually launch the server with.
Option B) From source
MCP Setup (Recommended)
Use the installer script that calls each client's MCP install flow directly.
Client Matrix
For LLM
If you are an LLM agent setting up this MCP server, here is everything you need:
Before trying UI automation tools, remember that Accessibility permission usually belongs to the host/runtime process (
node, terminal, MCP client), not the target app under automation.
Quick start (one command)
If you installed via npm instead of cloning the repo, use npx:
Automation flags
Runtime options
The installer supports multiple runtimes via --runtime:
Manual Setup (Fallback)
Use this when you do not want to run scripts/install.sh.
Using npx (recommended for npm users)
When using npx, the relevant Accessibility entry is commonly the spawned node runtime plus the terminal / MCP client that launched it.
Using local build
When using a local build, check permission on both the runtime (node) and the app that launched it.
If you invoke baepsae-native directly for debugging, check permission on the native binary entry itself as well.
Project Structure
- MCP server entry point:
src/index.ts - Tool modules:
src/tools/(info, simulator, ui, input, media, system) - Shared utilities:
src/utils.ts,src/types.ts - Native binary entry point:
native/Sources/main.swift - Native command handlers:
native/Sources/Commands/ - Native binary output:
native/.build/release/baepsae-native - TS tests:
tests/mcp.contract.test.mjs,tests/unit.test.mjs,tests/mcp.real.test.mjs - Swift tests:
native/Tests/BaepsaeNativeTests/
Commands
MCP Tool Status
43 tools implemented end-to-end.
Official public MCP surface: unified generic tools
The public API surface is intentionally single-scheme: use unified generic tools with a target argument, rather than sim_* / mac_* names.
Target routing is explicit in the arguments: udid for simulator, bundleId / appName for macOS.
type_text policy
type_text accepts exactly one input source: text, stdinText, or file.
method: "auto"resolves to:pastefor simulator targetskeyboardfor macOS targets
method: "paste"uses the simulator pasteboard for simulator targets and a temporary host clipboard replace/restore flow for macOS targets.method: "keyboard"always types character-by-character.
When paste is used, simulator targets update the simulator pasteboard without touching the host clipboard, while macOS targets temporarily overwrite the host clipboard and restore it after submission. Successful responses report the input source, target kind, requested method, used method, paste transport, and any auto fallback that was applied.
tap_tab policy
tap_tab is semantic-first, geometry-last.
- First it tries actionable descendants exposed under the tab bar.
- If SwiftUI/Simulator does not expose real tab button descendants, it can use a semantic proxy row (for example, app-provided top navigation buttons that map cleanly to the same tabs).
- Only if neither semantic path exists does it fall back to tab-bar geometry.
This matters because SwiftUI TabView in Simulator may expose the tab bar as a generic AXGroup text="Tab Bar" without actionable child buttons.
Usage Examples
Switch tabs by index with semantic-first fallback:
Unified simulator app accessibility quickstart (inside app UI):
Open a URL (iOS Simulator):
Manage Apps (iOS Simulator):
macOS App Automation:
Troubleshooting
Accessibility permission checklist
-
The permission target is usually the automation host/runtime process, not the target app.
-
Run
doctorfirst to inspect host process, parent process, native binary, booted simulator availability, and accessibility readiness in one place. -
Check the error message for:
- current host process
- parent process
- inferred launch mode
-
If you launched through
npx/node, grant permission to the runtime and the launching terminal / MCP client. -
If you launched
baepsae-nativedirectly, grant permission to the native binary entry and the launching terminal / shell app. -
After changing permission, restart the launching process before retrying.
-
Invalid environment variable formaton Claude setup:- Use current script (
scripts/install.sh) orclaude mcp add --env="KEY=value" ...format.
- Use current script (
-
Missing native binaryerror:- Run
npm run buildand confirmnative/.build/release/baepsae-nativeexists.
- Run
-
Accessibility permission error is ambiguous:
- Current versions include host/parent process diagnostics and inferred launch mode in the error text so you can see which executable path likely needs permission.
-
Real smoke test diagnostics:
- Run
npm run test:real:preflightto print environment and capability diagnostics without executing the full suite. - Run
npm run test:real:simto focus on simulator-capability coverage, ornpm run test:real:macfor the macOS Safari subset.
- Run
-
Multiple Simulator windows are open and selectors hit the wrong device:
- Current versions scope simulator selectors to the target
udidwindow first. - If you intentionally need Simulator chrome/system UI, use
all: true.
- Current versions scope simulator selectors to the target
-
OpenCode does not show
baepsae:- Re-run
bash scripts/install.sh --tool opencode --skip-install --skip-buildand check~/.config/opencode/opencode.json.
- Re-run
-
Copilot not auto-registered:
- Copilot MCP flow is interactive/session-based. Re-run installer with
--interactive.
- Copilot MCP flow is interactive/session-based. Re-run installer with
-
Real smoke test skipped:
- Boot an iOS simulator first, then run
npm run test:real.
- Boot an iOS simulator first, then run
來源:README.md,提交 4e36492
工具
0版本歷史
1- v6.3.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分