macos-ui-mcp
macos-ui-mcp
Claude がネイティブ macOS アプリの UI を、構築中に検査・操作できるようにする Playwright 風のツール — 画面収録の許可は不要です。
画面をキャプチャする代わりに、アプリ自身が自分をレンダリングします。デバッグ専用の小さな Swift パッケージ(swift-harness/)が、アプリのビューツリーとプロセス内 PNG レンダラーを localhost HTTP で公開します。MCP サーバー(src/)がそれを Claude が呼び出せるツールに変換します:list_windows、get_ui_tree、screenshot、click、type、wait_for、invoke_action。
設計の根拠、アーキテクチャ比較、プロジェクトの目標については IDEA.md を参照してください。
Claude Code ──MCP(stdio)──> macos-ui-mcp server ──HTTP──> AppMCPHarness (in your app, DEBUG only)レイアウト
パス | 内容 |
| MCP サーバー(TypeScript) |
| ハーネスの HTTP ワイヤーフォーマット(型 + zod スキーマ) |
| vitest スイート + インメモリのモックハーネス。 |
| macOS アプリ用のドロップイン参照ハーネス |
| ハーネスをリンクする最小限の AppKit アプリ — e2e テストで使用 |
Related MCP server: Desktop Pilot MCP
使い方
1. ハーネスを macOS アプリに追加する(DEBUG ビルドのみ)
swift-harness/README.md を参照してください。AppDelegate に 1 行追加するだけです:
#if DEBUG
AppMCP.start() // opens http://127.0.0.1:8787
#endif2. MCP サーバーをビルドする
npm install
npm run build3. Claude Code に登録する
// .mcp.json
{
"mcpServers": {
"macos-ui-mcp": {
"command": "node",
"args": ["/absolute/path/to/macos-ui-mcp/dist/index.js"],
"env": { "MACOS_UI_MCP_HARNESS_URL": "http://127.0.0.1:8787" }
}
}
}これで、デバッグビルドでアプリを実行している状態で、Claude に get_ui_tree や screenshot を呼び出すよう依頼できます — 画面収録のプロンプトは表示されません。
開発
npm test # 38 unit tests, no real app needed (mock harness); e2e is skipped
npm run typecheck
npm run dev # run the server against a live harness
npm run test:e2e # builds showcase/, launches it, runs the real tools against the
# real Swift harness. Needs a logged-in macOS GUI session.npm run test:e2e が目標の証明です:get_ui_tree がコントロールを認識すること、screenshot が実際のプロセス内 PNG を返すこと、click / type がライブ UI を変更すること — すべて画面収録の許可なしで確認できます。
セレクター文法
click、type、screenshot、wait_for で使用します:
形式 | 一致条件 |
| id が |
| ロールが |
| ラベルが |
| ロールが |
click / type は曖昧なセレクター(複数一致)を拒否し、候補の id を報告します。
ステータス
v0.1 — macOS / AppKit。7 つのツールすべて実装済み。38 のユニットテスト + 実際の Swift ハーネスを通じて
showcase/アプリを操作する 5 ケースのエンドツーエンドテスト。検証済み:ツリー、プロセス内 PNG スナップショット、タップ、テキスト設定、アクションフック — 画面収録オフ。未対応 — SwiftUI ネイティブツリー(現時点では AppKit イントロスペクションのみ)、Windows アダプター、Accessibility API によるサードパーティアプリの検査。
ライセンス
MIT © 2026 Thang Duong
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables Claude to see and interact with any macOS application using natural language commands. Perfect for testing Mac applications, UI automation, and app development with AI assistance.32
- AlicenseNot gradedqualityDmaintenanceEnables high-speed native macOS automation for Claude by interacting directly with the Accessibility API, AppleScript, and UI trees instead of using screenshots. It allows users to read app states, click elements, and type text semantically across any macOS application.910MIT
- AlicenseNot gradedqualityAmaintenanceEnables Claude to capture and analyze screen content across Windows, macOS, and Linux with zero native runtime dependencies.325MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to control the local desktop via screenshot, mouse, keyboard, and clipboard operations.MIT
Related MCP Connectors
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
Live browser debugging for AI assistants — DOM, console, network via MCP.
Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/thangduonghuu/macos-ui-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server