macos-ui-mcp
Provides tools to inspect and drive native macOS app UI, including listing windows, getting UI trees, taking screenshots, clicking, typing, waiting for elements, and invoking actions, without requiring Screen Recording permission.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@macos-ui-mcpInspect the UI tree, find the Save button, click it, and screenshot the result."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
macos-ui-mcp
A Playwright-style tool that lets Claude inspect and drive a native macOS app's UI while you build it — without Screen Recording permission.
Instead of capturing the screen, the app renders itself. A tiny debug-only Swift package
(swift-harness/) exposes the app's view tree and an in-process PNG renderer over
localhost HTTP; an MCP server (src/) turns that into tools Claude can call:
list_windows, get_ui_tree, screenshot, click, type, wait_for, invoke_action.
See IDEA.md for the design rationale, the architecture comparison, and the project goals.
Claude Code ──MCP(stdio)──> macos-ui-mcp server ──HTTP──> AppMCPHarness (in your app, DEBUG only)Layout
Path | What |
| the MCP server (TypeScript) |
| the harness HTTP wire format (types + zod schemas) |
| vitest suite + an in-memory mock harness; |
| drop-in reference harness for the macOS app |
| a minimal AppKit app that links the harness — used by the e2e test |
Related MCP server: Desktop Pilot MCP
Use it
1. Add the harness to your macOS app (DEBUG builds only)
See swift-harness/README.md. One line in your AppDelegate:
#if DEBUG
AppMCP.start() // opens http://127.0.0.1:8787
#endif2. Build the MCP server
npm install
npm run build3. Register it with 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" }
}
}
}Now, with your app running in a debug build, ask Claude to call get_ui_tree or
screenshot — no Screen Recording prompt.
Develop
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 is the proof of the goals: it asserts get_ui_tree sees the
controls, screenshot returns a real in-process PNG, and click / type change the
live UI — with no Screen Recording permission.
Selector grammar
Used by click, type, screenshot, wait_for:
Form | Matches |
| node whose id is |
| role |
| any node with label |
| any node with role |
click / type refuse ambiguous selectors (more than one match) and report the candidate ids.
Status
v0.1 — macOS / AppKit. All 7 tools implemented. 38 unit tests + a 5-case end-to-end test that drives the
showcase/app through the real Swift harness. Verified: tree, in-process PNG snapshot, tap, set-text, action hooks — Screen Recording off.Not yet — SwiftUI-native tree (AppKit introspection only for now), Windows adapter, third-party-app inspection via the Accessibility API.
License
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