Authorization notice. macOS Harness is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.
Who it is forA developer using Claude Code or Codex who hits a task that only an app's own UI can do, such as a settings panel with no API.
The problemCoding agents can run shell commands but cannot see or use the windows of apps on the Mac.
The outcomeThe agent reads a window as numbered text, clicks the element it needs, and reads the window again to confirm the result.
What you need first
- A Mac running macOS, since the project is macOS only
- Python 3.12 and uv, to install macOS Harness
- Accessibility and Screen Recording permissions, which every call needs
- A coding agent CLI such as Claude Code or Codex to run the commands
Steps
- Install or upgrade macOS Harness from https://github.com/browser-use/macos-harness with uv using Python 3.12.
- Run
macos-harness install --agent claudefor Claude Code, or the matching agent name for your CLI. (inferred, check the README) - Run
macos-harness doctorand grant any missing macOS permission when asked. - Run
macos-harness get_app_state --app "TextEdit"to read the window as numbered text. - Run
macos-harness click --app "TextEdit" --element_index 12on the element you need, then runmacos-harness get_app_state --app "TextEdit"again.
Prompt for your agent
Using the macos-harness repo at https://github.com/browser-use/macos-harness, run `macos-harness get_app_state --app <app name>` on the target app and list the numbered elements in its window. Verify that the output contains at least one numbered element and a screenshot path before you click anything.
Caveat. The project is experimental and macOS only, and no call works until Accessibility and Screen Recording are granted.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for browser-use/macos-harness and "Let a coding agent operate a running Mac app"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer