macos-ui-mcp
macos-ui-mcp
Ein Playwright-artiges Tool, mit dem Claude die Benutzeroberfläche einer nativen macOS-App inspizieren und steuern kann, während du sie entwickelst — ohne Bildschirmaufnahme-Berechtigung.
Statt den Bildschirm zu erfassen, rendert sich die App selbst. Ein winziges, nur für Debug-Zwecke gedachtes Swift-Paket (swift-harness/) stellt den View-Baum der App und einen In-Process-PNG-Renderer über localhost HTTP bereit; ein MCP-Server (src/) macht daraus Werkzeuge, die Claude aufrufen kann: list_windows, get_ui_tree, screenshot, click, type, wait_for, invoke_action.
Siehe IDEA.md für die Design-Grundlagen, den Architekturvergleich und die Projektziele.
Claude Code ──MCP(stdio)──> macos-ui-mcp server ──HTTP──> AppMCPHarness (in your app, DEBUG only)Layout
Pfad | Was |
| der MCP-Server (TypeScript) |
| das HTTP-Wire-Format des Harness (Typen + Zod-Schemas) |
| vitest-Suite + ein In-Memory-Mock-Harness; |
| Drop-in-Referenz-Harness für die macOS-App |
| eine minimale AppKit-App, die das Harness einbindet — verwendet vom e2e-Test |
Related MCP server: Desktop Pilot MCP
Verwendung
1. Füge das Harness zu deiner macOS-App hinzu (nur DEBUG-Builds)
Siehe swift-harness/README.md. Eine Zeile in deinem AppDelegate:
#if DEBUG
AppMCP.start() // opens http://127.0.0.1:8787
#endif2. Baue den MCP-Server
npm install
npm run build3. Registriere ihn bei 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" }
}
}
}Wenn deine App nun in einem Debug-Build läuft, bitte Claude, get_ui_tree oder screenshot aufzurufen — keine Bildschirmaufnahme-Abfrage.
Entwicklung
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 ist der Beweis für die Ziele: Es prüft, dass get_ui_tree die Steuerelemente sieht, screenshot ein echtes In-Process-PNG zurückgibt und click / type die Live-UI verändern — ohne Bildschirmaufnahme-Berechtigung.
Selektorgrammatik
Verwendet von click, type, screenshot, wait_for:
Form | Entspricht |
| Knoten, dessen ID |
| Rolle |
| jeder Knoten mit Label |
| jeder Knoten mit Rolle |
click / type lehnen mehrdeutige Selektoren ab (mehr als eine Übereinstimmung) und melden die Kandidaten-IDs.
Status
v0.1 — macOS / AppKit. Alle 7 Werkzeuge implementiert. 38 Unit-Tests + ein End-to-End-Test mit 5 Fällen, der die
showcase/-App über das echte Swift-Harness steuert. Verifiziert: Baum, In-Process-PNG-Snapshot, Tippen, Text setzen, Aktions-Hooks — Bildschirmaufnahme aus.Noch nicht — SwiftUI-nativer Baum (derzeit nur AppKit-Introspection), Windows-Adapter, Inspektion von Drittanbieter-Apps über die Accessibility-API.
Lizenz
MIT © 2026 Thang Duong
macos-ui-mcp
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