get_app_state
Capture a window's accessibility tree + screenshot.Called each turn before interaction.
How to use it
get_app_state is exposed by the Mac Cua MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the get_app_state tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Mac Cua
claude mcp add mac-cua -- uv run --directory /path/to/mac-cua python main.pyOther tools in Mac Cua (8)
Click by element index or pixel coordinates. Supports double-click, right-click. All clicks are background-targeted.
Drag between two pixel coordinates
List running and recently-used apps with bundle IDs and usage stats
Invoke non-primary AX actions (expand, collapse, zoom, raise)
Send key combos inxdotool syntax (super+c, Return, Tab) to a specific process
Scroll a specific element by direction and page count
Directly set an accessibility element's value— no focus or typing needed
Type literal text via background keyboard input— keys go to the target process, not your focused app