Computer use
Let Claude Code open apps, click, type and see your screen on macOS from the CLI, to test native apps, reproduce visual bugs and drive tools that have no API.
Computer use gives Claude Code eyes and hands on your Mac. From the terminal it can build a Swift app, launch it, click through every control and screenshot the result, all in the same conversation where it wrote the code. I use it mostly for native and Electron apps where there is no browser to automate and no CLI to script.
Note: Computer use in the CLI is a research preview on macOS, for Pro and Max plans only (not Team or Enterprise). It needs an interactive session, so it does not work with
-p. The desktop app offers the same capability on macOS and Windows.
Good uses
- Verify native builds. Ask for a menu bar app; Claude writes it, compiles it, opens it and tries every control before you look.
- End-to-end UI checks. "Test the onboarding flow in the Electron app": Claude clicks through signup and screenshots each step, with no Playwright config or test harness.
- Visual and layout bugs. "The modal clips on small windows": Claude resizes the window, reproduces it, screenshots it, fixes the CSS and checks again.
- GUI-only tools. Design tools, hardware control panels, the iOS Simulator, proprietary apps without an API.
Where it fits among Claude's tools
Screen control is the broadest and slowest option, so Claude prefers more precise tools first:
- An MCP server for the service, if you have one.
- The shell, if the task is a command.
- Claude in Chrome, for browser work, if it is set up.
- Computer use, for everything else.
In practice that means native apps, simulators and API-less tools.
Turning it on
Computer use is a built-in MCP server called computer-use, disabled by default.
-
In an interactive session, run
/mcpand findcomputer-use(listed as disabled). -
Select it and choose Enable. This is remembered per project.
-
The first time Claude tries to use the screen, you are asked to grant two macOS permissions, with links to the right System Settings panes:
- Accessibility, so Claude can click, type and scroll.
- Screen Recording, so Claude can see the screen.
Grant both, then choose Try again. macOS may insist you restart Claude Code after granting Screen Recording.
Then ask for something that needs a GUI:
build the Debug scheme, launch the app, open every item in the sidebar and screenshot anything that shows an error or an empty state
Approving apps
Enabling the server does not unlock your whole machine. The first time Claude needs a particular app in a session, the terminal shows a prompt listing the apps it wants, any extra permissions (such as clipboard access) and how many other apps will be hidden. Choose Allow for this session or Deny. Several apps can be approved together.
Some apps carry an extra warning because of how much they can reach:
| Warning | Shown for |
|---|---|
| Equivalent to shell access | Terminal, iTerm, VS Code, Warp and other terminals and IDEs |
| Can read or write any file | Finder |
| Can change system settings | System Settings |
These are not blocked; the warning is there so you decide whether the task justifies it. You need to approve Finder for Claude to click the desktop, the Dock or a Finder window.
The level of control also depends on the app's category: browsers and trading platforms are view-only, terminals and IDEs are click-only, and everything else gets full control. The desktop page details the tiers.
What happens while Claude works
One session at a time. A session takes a lock on its first computer use action and holds it until the session exits (not when the task ends). Another session trying to use the screen gets an error naming the lock holder.
Other apps are hidden. Only approved apps stay visible. Your terminal stays on screen for you but is excluded from Claude's screenshots, so it never sees its own output. Hidden apps come back when the turn ends.
Screenshots are downscaled. You do not need to change resolution on a Retina display. A 16-inch MacBook Pro capturing at 3456×2234 is scaled to about 1372×887, keeping the aspect ratio. There is no setting for this; if text is too small to read after scaling, enlarge it in the app.
You can stop it any time. On the first screen action of each turn, macOS shows "Claude is using your computer · press Esc to stop." Press Esc anywhere, or Ctrl+C in the terminal, and Claude stops, unhides your apps and hands back control. Another notification appears when it finishes. The session keeps the lock until it exits.
Safety
Warning: Unlike the sandboxed Bash tool, computer use acts on your real desktop with whatever apps you approve. Claude checks each action and flags possible prompt injection from on-screen content, but the trust boundary is different. Approve only what the task needs.
Built-in guardrails, with no configuration needed:
- Per-app approval for the current session only.
- Warnings on apps that grant shell, filesystem or system settings access.
- Terminal excluded from screenshots, so text in your session cannot feed back to the model.
- Global
Esc, which is consumed when pressed so injected content cannot use it to dismiss dialogs. - A lock so only one session controls the machine.
Worked examples
Check a native build end to end
build the ClipboardHistory target, launch it, add three entries by copying text, then open preferences and confirm the "max items" stepper changes the list length. screenshot preferences at the end
Claude runs xcodebuild, launches the app, interacts with it and reports back.
Chase a layout bug
the export dialog cuts off its Cancel button when the window is narrow. shrink the window until it happens, screenshot it, then look at the dialog's layout constraints
Drive the iOS Simulator
open the iOS Simulator, launch the app, go through the three onboarding screens and tell me if any of them takes more than a second to appear
Claude uses the simulator as you would with a mouse. (In the desktop app, the same request opens the dedicated iOS Simulator pane instead.)
CLI versus desktop app
| Desktop | CLI | |
|---|---|---|
| Platforms | macOS and Windows | macOS only |
| How to enable | Settings > This computer > System toggle | Enable computer-use in /mcp |
| Denied apps list | Configurable | Not yet available |
| Auto-unhide | Optional | Always on |
| Dispatch | Dispatch sessions can use it | Not applicable |
Troubleshooting
"Computer use is in use by another Claude session". Another session holds the lock until it exits. Exit it. If it crashed, the lock is released automatically once Claude notices the process has gone.
The macOS permission prompt keeps coming back. macOS often needs the requesting process restarted after granting Screen Recording. Quit Claude Code completely and start again. If it persists, check System Settings > Privacy & Security > Screen Recording and make sure your terminal app is listed and enabled.
computer-use is missing from /mcp. It only appears when all of these hold:
- You are on macOS (on Windows, use the desktop app).
- You are on Pro or Max; confirm with
/status. - You are signed in through claude.ai, not Bedrock, Google Cloud or Foundry (a separate claude.ai account works if needed).
- The session is interactive, not
-p.