DEV Community

Cover image for Claude Code Can Now Control Your Mac. Here's How to Use It
Preecha
Preecha

Posted on

Claude Code Can Now Control Your Mac. Here's How to Use It

TL;DR

Claude Code can now control your Mac from the same terminal session where it writes code. It can open apps, click through UIs, run tests, capture screenshots, and use the results to patch code. The feature is a research preview for Pro and Max plan subscribers on macOS.

Try Apidog today

To enable it, run /mcp in Claude Code, enable the computer-use MCP server, then grant macOS Accessibility and Screen Recording permissions.

Claude can now use your computer

Anthropic announced Claude Code computer use on March 23, 2026. The workflow is simple: Claude writes code, runs it, interacts with the UI, observes the result, and fixes issues without you leaving the terminal.

Before computer use, Claude could generate a macOS menu bar app, but you still had to compile it, launch it, click through the UI, and report back what failed.

Now you can ask for the whole loop:

Build this app and make sure it works.
Enter fullscreen mode Exit fullscreen mode

Claude can compile the project, launch the binary, interact with controls, screenshot failures, inspect the relevant source, patch the issue, and re-run the flow.

That changes the unit of work from:

Write this feature.
Enter fullscreen mode Exit fullscreen mode

to:

Build this feature, run it, and verify the UI behavior.
Enter fullscreen mode Exit fullscreen mode

If you’re building on APIs, this is useful for GUI-driven flows that do not expose a CLI or API. Claude can verify the app behavior visually, and you can then build automated API test suites in Apidog to validate the same flows programmatically.

What you can do with it

Build and validate native apps end-to-end

Use computer use when you want Claude to verify the result in the actual app, not just generate code.

Example prompt:

Build the MenuBarStats target, launch it, open the preferences window,
and verify the interval slider updates the label. Screenshot the
preferences window when done.
Enter fullscreen mode Exit fullscreen mode

Claude can:

  • Run xcodebuild
  • Launch the compiled app
  • Open the preferences window
  • Move the slider
  • Check whether the label updates
  • Screenshot the final state
  • Patch and re-test if something fails

You get a verified build instead of a code-only draft.

Run UI checks without setting up a test framework

For early-stage projects, you may not want to configure Playwright, Selenium, or XCTest yet.

Prompt Claude with the flow:

Open the app, click through the onboarding screens, and tell me if any
screen takes more than a second to load.
Enter fullscreen mode Exit fullscreen mode

Claude can open the app, click through the UI, screenshot each step, and flag slow or broken transitions.

This is useful for:

  • Electron apps
  • Native macOS apps
  • iOS Simulator flows
  • GUI-only tools
  • Prototypes without formal test coverage

It is not a replacement for deterministic production test suites, but it is fast for exploratory validation.

Debug visual and layout bugs

Visual bugs are often hard to describe precisely. With computer use, Claude can reproduce the UI state directly.

Example:

The settings modal clips its footer on narrow windows. Resize the app
window until you can reproduce it, screenshot the clipped state, then
check the CSS for the modal container.
Enter fullscreen mode Exit fullscreen mode

Claude can:

  • Resize the app window
  • Capture the broken layout
  • Inspect the relevant CSS
  • Apply a fix
  • Re-test the same window size

This works well for issues such as:

  • Overflow bugs
  • Clipped footers
  • Broken responsive layouts
  • Misaligned controls
  • Modals that fail at narrow widths

Drive GUI-only tools

Some tools do not expose useful automation APIs. Examples include design tools, hardware control panels, proprietary enterprise apps, and simulators.

With computer use, you can describe the interaction in natural language and let Claude operate the UI.

Open the simulator, launch the app, tap through onboarding, and screenshot
each screen where the UI changes.
Enter fullscreen mode Exit fullscreen mode

Image

How to enable computer use

Computer use is disabled by default. It ships as a built-in MCP server named computer-use, and you enable it per project.

Before you start, confirm these requirements:

  • macOS only
  • Claude Code v2.1.85 or later
  • Pro or Max plan
  • Authentication through claude.ai
  • Interactive Claude Code session
  • Not using the -p non-interactive flag

Check your Claude Code version:

claude --version
Enter fullscreen mode Exit fullscreen mode

Update if needed:

npm install -g @anthropic-ai/claude-code
Enter fullscreen mode Exit fullscreen mode

Step 1: Open the MCP menu

In an active Claude Code session, run:

/mcp
Enter fullscreen mode Exit fullscreen mode

This opens the server list.

Find:

computer-use
Enter fullscreen mode Exit fullscreen mode

It should appear as disabled.

Step 2: Enable the server

Select computer-use, then choose Enable.

This setting persists per project. You only need to enable it once for each project where you want Claude to control the GUI.

Step 3: Grant macOS permissions

The first time Claude tries to control your screen, macOS prompts for two permissions:

  • Accessibility: allows Claude to click, type, and scroll
  • Screen Recording: allows Claude to see what is on screen

The prompts include links to the relevant System Settings panes.

After granting Screen Recording, restart Claude Code if the permission does not take effect immediately.

Step 4: Run a GUI verification prompt

Try a small, low-risk workflow first:

Build the app target, launch it, and click through each tab to confirm
nothing crashes. Screenshot any error states you find.
Enter fullscreen mode Exit fullscreen mode

Start with test apps or isolated development environments before using computer use on workflows that contain sensitive data.

How Claude works on your screen

Only one session can control your Mac

Computer use uses a machine-wide lock.

If another Claude Code session is already using computer use, new requests fail with a message showing which session holds the lock.

To continue:

  1. Finish the active computer use task.
  2. Exit the other Claude Code session.
  3. Retry the request.

Other apps hide while Claude works

When Claude takes control, visible apps hide so Claude interacts only with approved apps.

Your terminal stays visible, but it is excluded from screenshots. This prevents Claude from seeing its own prompts on screen.

When Claude finishes a turn, hidden apps restore automatically.

You can stop it immediately

When Claude acquires the lock, macOS shows a notification:

Claude is using your computer - press Esc to stop.
Enter fullscreen mode Exit fullscreen mode

You can stop computer use in either of these ways:

  • Press Esc from anywhere
  • Press Ctrl+C in the terminal

Claude releases the lock, restores hidden apps, and returns control to you.

Per-app approval

Enabling computer-use does not give Claude access to every app.

The first time Claude needs a specific app in a session, Claude Code shows a terminal approval prompt with:

  • Which apps Claude wants to control
  • Any extra permissions requested, such as clipboard access
  • How many other apps will hide while Claude works

You can choose:

  • Allow for this session
  • Deny

Approvals last only for the current session. You approve apps again in the next session.

Apps with extra warnings

Some app categories show additional warnings because they grant broad access.

Warning Apps
Equivalent to shell access Terminal, iTerm2, VS Code, Warp, other terminals and IDEs
Can read or write any file Finder
Can change system settings System Settings

These apps are not blocked automatically. The warning exists so you can decide whether the task needs that level of access.

App control tiers

Claude’s control level depends on the app category.

Control level App types
View-only Browsers, trading platforms
Click-only Terminals, IDEs
Full control All other apps

Browsers are view-only because they can expose account data and sensitive information. If you need full browser automation, use Claude in Chrome instead.

How Claude decides when to use computer use

Computer use is Claude’s last resort.

Claude chooses the most precise available tool first:

  1. MCP server for the service, if configured
  2. Bash for shell commands
  3. Claude in Chrome for browser tasks, if configured
  4. Computer use when no programmatic interface can reach the target

For example, if you ask:

Run the tests.
Enter fullscreen mode Exit fullscreen mode

Claude should use a shell command such as:

npm test
Enter fullscreen mode Exit fullscreen mode

It should not click a UI button unless the target workflow requires GUI interaction.

Use computer use for tasks like:

  • Native desktop app validation
  • iOS Simulator flows
  • GUI-only tools
  • Visual bug reproduction
  • App interactions without a CLI or API

Safety model

Computer use runs on your real desktop. That is different from Claude’s sandboxed Bash tool.

The Bash tool runs in an isolated environment with limited filesystem and network access. Computer use can interact with apps on your actual machine, depending on what you approve.

Anthropic built several guardrails into the feature.

Per-app approval

Claude can only control apps you explicitly allow in the current session.

There is no blanket machine-wide approval.

Sentinel warnings

Apps that expose shell access, filesystem access, or system settings changes are flagged before approval.

This helps you understand what level of access you are granting.

Terminal excluded from screenshots

Claude does not see your terminal window in screenshots.

This prevents on-screen terminal prompts from being fed back into the model.

Global escape

Pressing Esc aborts computer use from anywhere.

The key press is consumed by Claude Code, so prompt injection attacks cannot use it to dismiss dialogs.

Lock file

Only one Claude Code session can control your screen at a time.

This prevents concurrent computer use sessions from competing for the same machine.

Prompt injection detection

Claude checks actions and flags on-screen content that appears to be an attempt to redirect its behavior.

Anthropic’s guidance is to avoid sensitive workflows until you are comfortable with how computer use behaves on your machine. Start with sandboxed apps, test environments, and non-sensitive data.

Example workflows

End-to-end Swift app validation

Prompt:

Build the MenuBarStats target, launch it, open the preferences window,
and verify the interval slider updates the label. Screenshot the
preferences window when done.
Enter fullscreen mode Exit fullscreen mode

Expected Claude workflow:

  1. Run xcodebuild
  2. Launch the app
  3. Open the preferences window
  4. Move the interval slider
  5. Verify that the label updates
  6. Capture a screenshot
  7. Report failures with source locations
  8. Patch and re-test if needed

Reproduce a layout bug

Prompt:

The settings modal clips its footer on narrow windows. Resize the app
window down until you can reproduce it, screenshot the clipped state,
then check the CSS for the modal container.
Enter fullscreen mode Exit fullscreen mode

Expected Claude workflow:

  1. Resize the window in increments
  2. Capture the clipped state
  3. Inspect modal.css
  4. Identify the overflow issue
  5. Apply a layout fix
  6. Re-test at the failing size

Test an iOS Simulator flow without XCTest

Prompt:

Open the iOS Simulator, launch the app, tap through the onboarding
screens, and tell me if any screen takes more than a second to load.
Enter fullscreen mode Exit fullscreen mode

Claude controls the Simulator through the GUI. You do not need to create XCTest targets, UI test selectors, or Instruments configuration for this exploratory pass.

Validate an Electron onboarding flow

Prompt:

Launch the desktop app in dev mode, complete the signup flow using
test@example.com, and screenshot each step. Flag any step where the
button is not clickable or the UI shows an error.
Enter fullscreen mode Exit fullscreen mode

Claude can:

  • Start the app
  • Fill form fields
  • Click through each onboarding screen
  • Capture screenshots
  • Report blocked buttons or UI errors

Using computer use with API testing

Claude Code computer use pairs well with Apidog for full-stack API verification.

A practical workflow:

  1. Claude writes or updates a local server.
  2. Claude builds and launches the app.
  3. Claude uses computer use to trigger a user action in the UI.
  4. You capture or inspect the underlying API call in Apidog.
  5. You create an automated API test for the same request.
  6. Future regressions are caught by the API test instead of manual UI validation.

This gives you two layers:

  • Claude validates the user-facing flow through the GUI.
  • Apidog validates the underlying API behavior programmatically.

The GUI pass confirms the happy path. The API test guards that behavior going forward, including in CI.

Differences between CLI and Desktop app

The CLI and Desktop app use the same computer use engine, but some settings are Desktop-only for now.

Feature Desktop CLI
Enable Settings > Desktop app > General /mcp > enable computer-use
Denied apps list Configurable in Settings Not available yet
Auto-unhide toggle Optional Always on
Dispatch integration Yes Not applicable

For most development workflows, the CLI version covers the core computer use flow.

Troubleshooting

“Computer use is in use by another Claude session”

Another Claude Code session holds the machine lock.

Fix:

  1. Exit the other session.
  2. If it crashed, wait for Claude Code to detect that the process is gone.
  3. Retry the computer use request.

macOS permissions prompt keeps reappearing

macOS may require a process restart after granting Screen Recording.

Fix:

  1. Quit Claude Code completely.
  2. Start a new Claude Code session.
  3. Open System Settings > Privacy & Security > Screen Recording.
  4. Confirm your terminal emulator is listed and enabled.

Also check Accessibility permissions in the same Privacy & Security area.

computer-use does not appear in /mcp

Check the following:

  • You are on macOS.
  • claude --version shows v2.1.85 or later.
  • You are on a Pro or Max plan.
  • /status confirms the expected account.
  • You are authenticated through claude.ai.
  • You are not using Bedrock, Vertex AI, or another third-party provider.
  • You are in an interactive session.
  • You are not using the -p flag.

Claude cannot see the app after approval

Make sure you selected Allow for this session in the per-app approval prompt.

If you accidentally denied the app:

  1. Exit the Claude Code session.
  2. Start a new session.
  3. Retry the task.
  4. Approve the app when prompted.

Approvals and denials reset each session.

FAQ

Which Claude Code version do I need?

You need Claude Code v2.1.85 or later.

Check your version:

claude --version
Enter fullscreen mode Exit fullscreen mode

Update if needed:

npm install -g @anthropic-ai/claude-code
Enter fullscreen mode Exit fullscreen mode

Does it work on Windows or Linux?

No. Computer use is macOS-only in the current research preview.

Anthropic has not announced a timeline for Windows or Linux support.

Can I use computer use through Amazon Bedrock or Google Vertex AI?

No. Computer use requires authentication through a claude.ai account on a Pro or Max plan.

Third-party providers such as Amazon Bedrock, Google Vertex AI, and Microsoft Foundry do not support this feature.

Is it available on Team or Enterprise plans?

No. During the research preview, it is available only on Pro and Max plans.

What happens if I do not grant Screen Recording permission?

Claude may still click and type if Accessibility is granted, but it cannot verify visual results without Screen Recording.

Most useful computer use workflows require both permissions.

Can Claude access apps I did not approve?

No. Claude can only control apps you explicitly approve in the current session.

The approval prompt appears the first time Claude needs each app.

How do I revoke computer use access completely?

Disable the MCP server:

/mcp
Enter fullscreen mode Exit fullscreen mode

Then disable:

computer-use
Enter fullscreen mode Exit fullscreen mode

To remove macOS permissions:

  1. Open System Settings > Privacy & Security.
  2. Remove your terminal app from Accessibility.
  3. Remove your terminal app from Screen Recording.

Is computer use safe for sensitive work?

Anthropic recommends avoiding sensitive data during the research preview.

Start with:

  • Isolated test environments
  • Local development apps
  • Non-production accounts
  • Non-sensitive datasets

Review Anthropic’s computer use safety guidance before using it with credentials, personal data, production systems, or regulated workflows.

Can multiple Claude Code sessions use computer use at the same time?

No. Computer use holds a machine-wide lock.

Only one Claude Code session can control your screen at a time. If another session holds the lock, Claude Code shows an error with the session details.

How is this different from Playwright or Selenium?

Playwright and Selenium are scripted test frameworks. They require selectors, assertions, configuration, and test maintenance.

Computer use lets Claude interact with an app through natural language, without a test harness.

Use computer use for:

  • Exploratory testing
  • Quick UI validation
  • Visual bug reproduction
  • GUI-only tools
  • Apps that do not expose automation APIs

Use Playwright, Selenium, XCTest, or similar tools for:

  • Deterministic regression tests
  • CI pipelines
  • Repeatable production test coverage
  • Complex assertions
  • Long-term test suites

Computer use is faster to start. Scripted tests are more reliable over time.

Top comments (0)