macos-ui-mcp
macos-ui-mcp
Una herramienta estilo Playwright que permite a Claude inspeccionar y controlar la interfaz de una app nativa de macOS mientras la construyes — sin permiso de Grabación de Pantalla.
En lugar de capturar la pantalla, la app se renderiza a sí misma. Un pequeño paquete Swift solo para depuración
(swift-harness/) expone el árbol de vistas de la app y un renderizador PNG en proceso a través de
HTTP en localhost; un servidor MCP (src/) convierte eso en herramientas que Claude puede llamar:
list_windows, get_ui_tree, screenshot, click, type, wait_for, invoke_action.
Consulta IDEA.md para conocer la justificación del diseño, la comparación de arquitecturas y los objetivos del proyecto.
Claude Code ──MCP(stdio)──> macos-ui-mcp server ──HTTP──> AppMCPHarness (in your app, DEBUG only)Estructura
Ruta | Qué es |
| el servidor MCP (TypeScript) |
| el formato de cable HTTP del harness (tipos + esquemas zod) |
| suite de vitest + un harness simulado en memoria; |
| harness de referencia listo para usar en la app de macOS |
| una app AppKit mínima que enlaza el harness — usada por la prueba e2e |
Related MCP server: Desktop Pilot MCP
Cómo usarlo
1. Añade el harness a tu app de macOS (solo builds DEBUG)
Consulta swift-harness/README.md. Una línea en tu AppDelegate:
#if DEBUG
AppMCP.start() // opens http://127.0.0.1:8787
#endif2. Compila el servidor MCP
npm install
npm run build3. Regístralo con 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" }
}
}
}Ahora, con tu app ejecutándose en un build de depuración, pide a Claude que llame a get_ui_tree o
screenshot — sin aviso de Grabación de Pantalla.
Desarrollo
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 es la prueba de los objetivos: verifica que get_ui_tree ve los
controles, que screenshot devuelve un PNG real en proceso, y que click / type cambian la
interfaz en vivo — sin permiso de Grabación de Pantalla.
Gramática de selectores
Usada por click, type, screenshot, wait_for:
Forma | Coincide |
| nodo cuyo id es |
| rol |
| cualquier nodo con etiqueta |
| cualquier nodo con rol |
click / type rechazan selectores ambiguos (más de una coincidencia) e informan los ids candidatos.
Estado
v0.1 — macOS / AppKit. Las 7 herramientas implementadas. 38 pruebas unitarias + una prueba de extremo a extremo de 5 casos que controla la app
showcase/a través del harness Swift real. Verificado: árbol, captura PNG en proceso, toque, establecimiento de texto, hooks de acción — Grabación de Pantalla desactivada.Aún no — árbol nativo de SwiftUI (solo introspección de AppKit por ahora), adaptador de Windows, inspección de apps de terceros mediante la API de Accesibilidad.
Licencia
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