How to Build an AI Agent That Controls Your Mac: Claude Code Computer Use Setup Guide
Claude Code Computer Use lets your AI agent take screenshots, click buttons, and control any macOS app. Here's how to set it up and 8 real use cases.
What Claude Code Computer Use Is (And Why It’s Different)
Most AI tools respond to text. Claude Code Computer Use does something fundamentally different — it can actually see your screen, move your cursor, click buttons, and type into any application on your Mac.
This is Anthropic’s Claude Code Computer Use capability, and it turns Claude from a conversational assistant into an agent that operates your computer like a person would. That means it can control apps without APIs, fill in forms across multiple tools, navigate GUI-heavy software, and complete multi-step tasks that previously required a human to sit and click through them manually.
This guide walks through exactly how to set it up on macOS, covers the permission requirements, and gives you eight real use cases worth building toward.
How Claude Code Computer Use Actually Works
Before touching a terminal, it helps to understand the mechanics. Claude Code is Anthropic’s agentic coding tool — it runs in your terminal and has access to a set of tools it can call during a task.
When computer use is active, Claude gains four additional tools:
- Screenshot — captures the current state of your screen so Claude can “see” what’s happening
- Click — moves the cursor and clicks at a specific coordinate or element
- Type — inputs text into the focused field
- Key — triggers keyboard shortcuts (like
Cmd+C,Enter, orTab)
The agent operates in a loop: take a screenshot, decide what to do, take an action, take another screenshot, assess the result, repeat. It’s not magic — it’s computer vision combined with reasoning and action. But for the user, it looks a lot like watching someone else control your Mac.
This is fundamentally different from browser automation tools like Playwright or Selenium. Those work by interacting with web page structure. Claude Code Computer Use works at the pixel level — it can interact with any app, including desktop applications, legacy software, and anything else visible on screen.
What You Need Before Starting
The setup is lightweight, but you need a few things in place before Claude Code can take control of your Mac.
Requirements:
- macOS Ventura (13) or later — earlier versions may have permission quirks
- Node.js 18 or later (for installing Claude Code via npm)
- An Anthropic account with access to Claude Code (currently available via Anthropic’s console or a Pro/Max subscription)
- A terminal emulator: Terminal.app works, but iTerm2 gives you more flexibility for long-running agents
- Enough Anthropic credits or a plan that includes Claude Code usage — computer use tasks consume more tokens than standard queries because of repeated screenshot processing
Not required: a special Mac model, Apple Silicon, or any third-party automation software. Claude Code runs entirely through your terminal.
Step-by-Step Setup on macOS
Step 1: Install Claude Code
Open your terminal and run:
npm install -g @anthropic-ai/claude-code
Once installed, authenticate by running:
claude
This will prompt you to log in via browser with your Anthropic account. Follow the OAuth flow, and you’ll be returned to the terminal with an active session.
Step 2: Grant Screen Recording Permission
Claude Code needs to capture screenshots of your screen. macOS requires explicit permission for this.
Go to: System Settings → Privacy & Security → Screen Recording
Find your terminal application in the list (Terminal.app, iTerm2, or whatever you’re using) and toggle it on. If it doesn’t appear, click the + button and navigate to it manually.
You’ll likely need to quit and reopen your terminal after granting this.
Step 3: Grant Accessibility Permission
Clicking, typing, and keyboard shortcuts require Accessibility access. This is what lets Claude Code actually control your mouse and keyboard.
Go to: System Settings → Privacy & Security → Accessibility
Again, find your terminal application and enable it. This permission is more sensitive — macOS treats Accessibility as high-trust because it can interact with everything on screen.
If you’re running Claude Code through a script or a wrapper process, that process may also need Accessibility access. Troubleshoot this by checking which process is actually sending system events.
Step 4: Run Claude Code with Computer Use
With permissions granted, start a Claude Code session:
claude
From within the session, you can explicitly ask Claude to use the computer. For example:
Can you open Safari, navigate to my company's Notion workspace, and find all tasks assigned to me that are due this week?
Claude will confirm it’s about to take control, then begin operating your screen. You’ll see it taking screenshots and performing actions in real time.
Some users run Claude Code with specific flags or configuration files to pre-authorize computer use without the confirmation step on every session — check the Anthropic Claude Code documentation for the latest flags and configuration options, as these change with version updates.
Step 5: Test with a Simple Task
Before throwing complex workflows at it, test with something verifiable:
Open TextEdit, create a new document, type "Computer use test successful", and save it to the Desktop as test.txt.
Watch the agent work. If it completes the task, your setup is correct. If it fails, check:
- Whether the terminal has both Screen Recording and Accessibility permissions
- Whether you’re logged in to the correct Anthropic account
- Whether your session has enough credits for the request
8 Real Use Cases for Claude Code Computer Use
1. Automating Desktop Apps That Have No API
This is probably the most immediately valuable use case. A lot of internal business software — ERP systems, accounting tools, legacy CRM platforms — doesn’t expose an API. You’re stuck clicking through a GUI manually.
Claude Code can operate these apps directly. Give it instructions like “export last month’s invoices from QuickBooks as CSV” and it will navigate the menus, apply filters, and trigger the export — the same way a person would.
2. Cross-Application Data Transfer
Copying information from one app and pasting it into another is tedious. If that transfer happens dozens of times a day across your team, it’s a real cost.
Claude Code can handle these multi-app workflows: read from a spreadsheet, switch to a CRM, enter the data in the right fields, confirm the save, move to the next row. No API integration required, no custom script, no Zapier workaround.
3. Automated UI Testing
QA teams testing desktop applications or complex web apps often rely on tools that require significant setup and maintenance. Claude Code can perform exploratory UI testing with plain-language instructions:
Test the checkout flow. Add a product to the cart, apply the discount code SAVE10, complete the purchase with the test card, and take screenshots at each step.
This isn’t a replacement for formal test automation frameworks — but for ad-hoc QA, regression checks, or documenting a workflow, it’s fast.
4. Browser-Based Form Filling at Scale
If you regularly fill out the same web forms — expense reports, permit applications, vendor onboarding — Claude Code can handle those. Unlike browser automation that depends on CSS selectors that break when a site redesigns, computer use works visually and adapts to layout changes more gracefully.
You can give it structured data (from a CSV or pasted text) and have it fill forms field by field, even across multiple browser tabs.
5. Multi-Step Research and Data Collection
Set Claude Code on a research task that requires visiting multiple sites, pulling specific data, and compiling it somewhere:
Go to each of these five competitor websites, find their pricing page, and add their plan names and prices to this spreadsheet.
It will open each URL, locate the pricing information, switch to the spreadsheet, and fill in the data. This kind of task is normally an hour of manual work.
6. File and Folder Organization
Claude Code can see your Finder and take action on it. You can ask it to reorganize a messy Downloads folder by file type and date, rename files according to a pattern, or move project assets into the right directory structure.
Combined with its shell access, it can also do this more efficiently — but for tasks involving visual inspection of file names or content, the screenshot-based approach sometimes catches edge cases that pure shell scripting misses.
7. Email and Calendar Workflows
Claude Code can open Mail.app or a web-based email client, read messages, draft replies based on context you give it, and send them. Same with calendar — creating recurring events, rescheduling meetings, or copying availability from one calendar system to another.
These aren’t things Gmail’s API makes easy. Computer use skips the integration entirely.
8. Legacy Software Automation
Older desktop applications — especially in industries like manufacturing, healthcare, or government — often run on 15-year-old software with no automation layer. If a human can click through it, Claude Code probably can too.
This is a genuinely novel unlock. The alternative is building a wrapper or waiting years for a vendor to add an API. Computer use lets you automate legacy tools right now.
Common Mistakes and How to Avoid Them
Giving instructions that are too vague. Claude Code needs enough context to know what success looks like. “Handle my emails” isn’t actionable. “Find emails from vendors that contain invoices, download the attachments, and save them to the Invoices folder on my Desktop” is.
Not specifying which app to use. If you have multiple browsers open, Claude may pick the wrong one. Be explicit: “In Chrome, not Safari…”
Running sensitive tasks without oversight. Computer use agents can make irreversible actions — sending emails, deleting files, submitting forms. Always supervise first runs. Consider using a test environment or sandbox account when validating new automations.
Ignoring token consumption. Every screenshot is an image sent to the API. Long tasks with frequent screenshots can consume significant credits. For repetitive tasks, break them into smaller chunks or verify the first instance works before running it at scale.
Forgetting about screen resolution and scaling. If you have display scaling turned on (common on Retina displays), coordinates can behave unexpectedly. Test on your actual display settings before deploying a workflow.
Letting it run unattended too soon. Before you trust Claude Code to run unsupervised, run it supervised several times with the same task. Observe how it handles edge cases, errors, and unexpected UI states. Only then consider running it in the background.
Where MindStudio Fits Into Agentic Workflows
Claude Code Computer Use is a powerful primitive — but it’s still a single agent operating on a single machine, running tasks one at a time through a terminal session.
If you want to scale that capability into something repeatable, shareable, and connected to the rest of your business tools, that’s where MindStudio comes in.
MindStudio’s Agent Skills Plugin (@mindstudio-ai/agent) is built specifically for scenarios where Claude Code (or any other agentic AI) needs to call into broader infrastructure — sending emails, querying databases, triggering workflows, generating reports — without building all of that from scratch.
For example: imagine you’ve built a Claude Code computer use workflow that extracts data from a legacy desktop app every morning. With MindStudio’s Agent Skills Plugin, that same agent can then call agent.sendEmail() to send a formatted summary to your team, or agent.runWorkflow() to push the data through an approval process — all with a simple method call, no separate integrations required.
If you’re not writing code and just want to build automated workflows that incorporate AI reasoning across multiple steps and tools, MindStudio’s visual no-code builder lets you do that in an afternoon. It supports 200+ models and 1,000+ integrations, and you can get started free at mindstudio.ai.
The two approaches aren’t competing — they complement each other. Claude Code Computer Use handles the local, GUI-driven side of automation. MindStudio handles the cloud-connected, multi-tool orchestration side. Together, they cover the full surface area of most business workflows.
Frequently Asked Questions
Is Claude Code Computer Use safe to use on my main machine?
Generally yes, but with caveats. Claude Code operates with your user-level permissions — it can access anything you can access. That includes files you’d rather not delete, forms you’d rather not submit, and emails you’d rather not send. Always supervise new workflows, run sensitive tasks in sandboxed accounts when possible, and don’t leave the agent running unattended until you’re confident in how it handles edge cases. Treat it like a contractor who’s good at their job but needs to know your preferences.
What’s the difference between Claude Code Computer Use and Anthropic’s Computer Use API?
Anthropic’s Computer Use API is the underlying capability — it provides the screenshot, click, type, and key tools. Claude Code is a fully-featured agentic CLI that bundles those tools along with file editing, bash execution, and other capabilities into a coherent development environment. Claude Code Computer Use is the practical way most developers and power users will access computer use on their Mac, rather than building their own agent loop against the raw API.
Does this work on Windows or Linux?
Claude Code runs cross-platform, but the permission setup differs. On macOS, Screen Recording and Accessibility are the key gates. On Linux, you typically need to configure xdotool or similar for input simulation, and screenshot tools depend on your desktop environment. Windows requires separate configuration. This guide focuses on macOS because the setup is the most streamlined and well-documented.
How much does Claude Code Computer Use cost?
Claude Code usage is billed based on token consumption. Computer use tasks are more expensive than standard text interactions because screenshots (sent as images) consume additional input tokens. A complex multi-step task might use several hundred thousand tokens. Anthropic offers Claude Code through Max plans and usage-based billing through their API. Check Anthropic’s pricing page for current rates — they update periodically as the product matures.
Can Claude Code see and interact with any app, including full-screen apps?
Yes, as long as Screen Recording permission is granted to the terminal running Claude Code, it can capture any visible window — including full-screen apps, Electron apps, native macOS apps, and web browsers. The main limitation is that it can’t interact with content inside virtual machines or remote desktop sessions unless those are also configured with the appropriate permissions.
What happens if Claude Code makes a mistake mid-task?
Claude Code will typically notice when something goes wrong — it takes a screenshot after each action and can see if the result doesn’t match what was expected. It will usually attempt to recover or report back that it couldn’t complete the task. For high-stakes tasks (submitting a payment, sending a mass email), build in a confirmation step: ask Claude Code to pause and describe what it’s about to do before taking the final action.
Key Takeaways
- Claude Code Computer Use gives Claude the ability to see your screen, click, type, and control any macOS application — including apps with no API.
- Setup on macOS requires two System Settings permissions: Screen Recording and Accessibility, both granted to your terminal application.
- The most valuable use cases are automating legacy desktop software, cross-app data transfer, and any repetitive GUI task that would otherwise require a person clicking through it.
- Start supervised. Run new workflows manually several times before trusting them to run without oversight.
- For broader automation that connects Claude Code’s local capabilities to cloud tools, email, and multi-step workflows, MindStudio’s Agent Skills Plugin handles the infrastructure layer so your agents can focus on the task.
If you’re building AI-powered workflows and want something that works alongside tools like Claude Code, try MindStudio free — no API keys or complex setup required.