DEV Community

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

Posted on • Originally published at apidog.com

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

TL;DR

Claude Code now supports direct Mac automation: opening apps, clicking UI elements, running tests, and capturing screenshots—all from the same terminal where it writes your code. This feature is available as a research preview for Pro and Max plan subscribers on macOS. To enable, run /mcp in Claude Code, turn on the computer-use server, and grant Accessibility and Screen Recording permissions in System Settings.

Try Apidog today

Claude can now use your computer

On March 23, 2026, Anthropic introduced Claude Code computer use. This lets Claude not only write code, but also execute and verify it by operating your Mac just like you would.

Previously, you needed to compile, launch, and manually test macOS apps written by Claude. Now, Claude completes the full loop: it compiles, launches, interacts with UI controls, screenshots errors, and patches code—all within your terminal session.

This shifts the workflow from “write this app” to “build and ensure this app works.”

💡
If your workflow involves APIs, Claude can now automate GUI testing for tools without a CLI or API interface. After Claude validates the UI, use Apidog to build automated API test suites for the same flows.

What you can do with it

Build and validate native apps end-to-end

Prompt example:

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 will:

  • Run xcodebuild
  • Launch the binary
  • Interact with preferences
  • Report and patch issues
  • Provide verified builds

UI testing without a test framework

Skip Playwright, Selenium, or XCTest setup. Just describe 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:

  • Navigates UI screens
  • Captures screenshots
  • Flags slow steps Works for Electron, native macOS, and iOS Simulator apps.

Debug visual and layout bugs

Automate layout bug reproduction:

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:

  • Resizes windows
  • Screenshots UI state
  • Reads and patches CSS

Drive GUI-only tools

Claude can control tools without CLI/API—design software, hardware panels, proprietary enterprise apps, iOS Simulator, etc.—based on your terminal instructions.

Claude controlling GUI-only tools

How to enable it

Computer use is disabled by default. Enable it per project as follows:

Requirements:

  • macOS only
  • Claude Code v2.1.85+
  • Pro or Max plan
  • Authenticated via claude.ai
  • Interactive session (not with -p flag)

Step 1: Open the MCP menu

In an active Claude Code session, run:

/mcp
Enter fullscreen mode Exit fullscreen mode

Find computer-use in the server list (should appear as disabled).

Step 2: Enable the server

Select computer-use and choose Enable. This setting is per project.

Step 3: Grant macOS permissions

On first use, macOS will prompt for:

  • Accessibility (for clicking/typing/scrolling)
  • Screen Recording (for visual access)

Approve both. You may need to restart Claude Code after granting Screen Recording.

Test with:

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

How Claude works on your screen

One session at a time

Computer use holds a machine-wide lock. If another session is active, new requests will fail with a lock message. End any other session first.

Apps hide while Claude works

While active, Claude hides other visible apps (except your terminal) to interact only with approved targets. Hidden apps restore automatically afterward.

Stop at any time

A macOS notification appears when Claude takes control: “Claude is using your computer - press Esc to stop.” Press Esc (anywhere) or Ctrl+C to abort and regain control.


Per-app approval

Enabling computer-use does not grant access to all apps. First time Claude needs an app, you'll see a terminal prompt listing:

  • Apps Claude wants to control
  • Extra permissions requested
  • Number of apps to hide

Choose Allow for this session or Deny. Approvals last only for the current session.

Extra warnings appear for:
| Warning | Apps |
|---------------------------------|-----------------------------------------|
| Equivalent to shell access | Terminal, iTerm2, VS Code, Warp, IDEs |
| Can read or write any file | Finder |
| Can change system settings | System Settings |

You decide if access is warranted.

App control tiers

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

Browsers are view-only for safety; use Claude in Chrome for browser automation.


How Claude decides when to use computer use

Claude selects the most targeted tool:

  1. MCP server (if configured)
  2. Bash for shell commands
  3. Claude in Chrome for browser tasks
  4. Computer use if no programmatic interface is available

Claude uses screen control only for tasks that require it (native apps, simulators, GUI-only tools).

Safety model

Computer use operates on your real desktop (not a sandbox). Built-in safeguards include:

  • Per-app approval (session-specific)
  • Sentinel warnings for high-risk apps
  • Terminal excluded from screenshots
  • Global escape (Esc aborts at any time)
  • Lock file (one session at a time)
  • Prompt injection detection

Start with test environments or sandboxed apps, especially if dealing with sensitive data.

Example workflows

End-to-end Swift app validation

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 will:

  • Compile with xcodebuild
  • Launch and interact with the app
  • Check and screenshot results
  • Report failures with code locations

Reproducing a layout bug

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

Claude resizes, captures, diagnoses, patches, and re-tests.

iOS Simulator testing without XCTest

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

No test targets or config needed—Claude operates the Simulator via UI.

Electron app onboarding flow

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 fills forms, clicks through onboarding, and logs screenshots/errors.

Using computer use with API testing

Combine Claude's computer use with Apidog for full-stack API validation:

  1. Claude writes/builds a local server
  2. Claude triggers UI actions via computer use
  3. Capture the API call in Apidog and build a programmatic test
  4. Use Apidog tests for regression in CI

This gives you both end-to-end UI verification and automated API checks for robust coverage.

Differences between CLI and Desktop app

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

CLI version covers most dev workflows.

Troubleshooting

“Computer use is in use by another Claude session”

  • Exit the other Claude Code session.
  • If crashed, the lock auto-releases when the process ends.

macOS permissions prompt keeps reappearing

  • Restart Claude Code after granting Screen Recording.
  • Confirm your terminal app is enabled in System Settings > Privacy & Security > Screen Recording.

computer-use doesn’t appear in /mcp

Check:

  • You're on macOS (not Linux/Windows)
  • claude --version is v2.1.85+
  • You're on a Pro or Max plan (/status to confirm)
  • Authenticated via claude.ai
  • In an interactive session (not using -p)

Claude can’t see the app after approval

  • Click Allow for this session when prompted.
  • If denied, restart the session; approvals reset per session.

FAQ

Which Claude Code version do I need?

Version v2.1.85 or later.
Check: claude --version
Update: npm install -g @anthropic-ai/claude-code

Does it work on Windows or Linux?

No. MacOS only (no announced support for Windows/Linux).

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

No. Requires claude.ai authentication (Pro or Max).

Is it available on Team or Enterprise plans?

No. Pro and Max only during research preview.

What if I don't grant Screen Recording?

Claude can click/type with Accessibility, but can't verify UI visually. Most workflows require both permissions.

Can Claude access apps I didn't approve?

No. Only explicitly approved apps for the current session.

How do I revoke computer use access completely?

  • Disable computer-use via /mcp in Claude Code.
  • Remove your terminal app from Accessibility and Screen Recording in System Settings > Privacy & Security.

Is computer use safe for sensitive data?

Anthropic recommends against using it for sensitive data during the preview. Use test environments and review the computer use safety guide before handling credentials or production systems.

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

No. One session at a time (machine-wide lock).

How is this different from Playwright or Selenium?

Playwright/Selenium require test scripts and configuration. Computer use lets Claude automate any app with natural language—no test harness needed. Scripted tests are more deterministic; computer use is faster for exploratory/manual flows, especially for apps without automation hooks. For regression, use scripted tests; for quick or UI-only automation, use computer use.

Top comments (0)