Computer Use:让 Claude 真的操作你的电脑
CLI 原文:https://code.claude.com/docs/en/computer-use Desktop 原文:https://code.claude.com/docs/en/desktop(
#let-claude-use-your-computer段) 官方定位:Lets Claude open apps, control your screen, and work on your machine the way you would. 状态:Research Preview · macOS + Windows(CLI 仅 macOS)· Pro / Max 才有(Team / Enterprise 不开放)
🔥 影响力卡片
| 维度 | 数据 |
|---|---|
| 引入版本(CLI) | Claude Code v2.1.85+ |
| 支持平台 | macOS + Windows(Desktop app);仅 macOS(CLI) |
| 订阅门槛 | Pro / Max 限定(Team / Enterprise 明确不开放);Bedrock/Vertex/Foundry 都不支持 |
| 在 CLI 里的形态 | built-in MCP server computer-use(在 /mcp 里 enable) |
| 在 Desktop 里的形态 | Settings > General > Computer use toggle |
| 麦克权限要求(macOS) | Accessibility + Screen Recording 两项 system permission |
| 跨 session 排他 | 机器级 lock — 同一时间只能一个 Claude session 用 |
🎯 为什么必读
1. 这是 Claude Code 体系里”最后一米”能力。
之前所有能力都是间接 + 数字化:Bash 跑命令、Edit 改文件、Chrome 扩展点网页、MCP 调 API。Computer Use 让 Claude 直接做”鼠标键盘 + 看屏幕”,触达任何 GUI-only 应用:Figma 桌面、Xcode、iOS Simulator、硬件控制面板、proprietary 软件。
2. 它解释了你截图里那个 “Enable computer use” 开关
你看到的 Dispatch 设置面板里那项 = Desktop app 全局开关 Settings > General > Computer use 的对应。打开后,从手机 dispatch 过来的 Code session 也能用 computer use(30 分钟 per-session 重审)。
3. 跟 Cowork 的关系最终澄清
不是”Cowork 拥有 Computer Use,Code 没有”。实际是:
- Computer Use = 底层能力(模型 + Anthropic 服务)
- Cowork mode = 包装好的产品,给 non-dev 用
- Code mode(Desktop)= 同样有这个能力,只是面向 dev
- CLI = 通过
computer-useMCP server 解锁
4. 这是 Anthropic 跟 OpenAI / Microsoft Copilot 最强的差异点
OpenAI 的 Operator 是云端的,只能开浏览器。Computer Use 是本机的,能开任何本地 app + 看本地屏幕。这是 Anthropic 在 agentic 领域押的最大一注。
一句话总结
Computer Use = Claude 的”眼睛 + 鼠标 + 键盘”。打开后,Claude 能截屏看你的屏幕、点窗口、按键盘,对所有 GUI-only 软件都能操作。CLI 通过
/mcp启computer-useserver 解锁;Desktop 通过Settings > General > Computer usetoggle 解锁。
💎 金句墙
★ “Screen control is reserved for things nothing else can reach: native apps, simulators, and tools without an API.” “屏幕控制是留给其他工具够不着的东西的:native app、模拟器、没 API 的工具。” —— 🟢 设计原则 — Computer Use 永远是 fallback,Connector / Bash / Chrome 都优先
★ “Unlike the sandboxed Bash tool, computer use runs on your actual desktop with access to the apps you approve.” “跟沙箱 Bash 不一样,Computer Use 跑在你真实桌面上,能动你批准过的 app。” —— 🟢 信任边界显著扩大 — 没沙箱保护,只有”per-app 批准”防线
★ “A macOS notification appears: ‘Claude is using your computer · press Esc to stop.’” “macOS 通知:‘Claude 在用你的电脑 · 按 Esc 停止。’” —— 🟢 全局 Esc 紧急刹车 — Anthropic 的 dead-man switch 设计
★ “Approvals last for the current session, or 30 minutes in Dispatch-spawned sessions.” “批准在当前 session 有效;Dispatch 触发的 session 里只 30 分钟,然后重新问。” —— 🟢 Dispatch(远程触发)有更严格的时效 — 因为你不在场,降低盲点
📋 核心精读 — Computer Use 能做什么(7 大场景)
1. 构建并验证 native app(macOS)
Build the MenuBarStats target, launch it, open the preferences window,
and verify the interval slider updates the label. Screenshot the
preferences window when you're done.
Claude 跑 xcodebuild → 启动 app → 操作 UI → 截屏报告。完整闭环:写代码 + 跑代码 + 验证 UI。
2. 端到端 UI 测试(替代 Playwright config)
Open the Electron app at /path/to/my-app, test the onboarding flow:
signup → email verify → first-task creation. Screenshot each step.
不需要写 Playwright / Selenium 配置 / test harness。Claude 像人一样点。
3. Debug 视觉 / 布局 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 and propose a fix.
关键:Claude 看你看到的。CSS bug、对齐问题、暗色模式失效 — 它能复现+ 截图 + 改。
4. 驱动 GUI-only 工具
- Figma 桌面 app(网页版可以用 MCP,桌面版只有 Computer Use)
- iOS Simulator(模拟 tap / swipe / 屏幕旋转)
- Xcode(build settings 改、scheme 切)
- Android Studio / Studio Code(虚机调试)
- 硬件控制面板(打印机驱动 / 视频卡设置)
- proprietary 行业软件(CAD / 财务 / 医疗影像)
5. 跨 app 数据流转(macOS 自动化的进阶版)
Open Mail.app, find the latest invoice from Stripe, screenshot the
amount, then open Numbers, append a row to Q2-revenue.numbers with
today's date and the amount.
替代 AppleScript / Automator。自然语言描述流程就行。
6. 视觉回归 / 设计核对
Compare the Figma design at <url> with the current implementation at
localhost:3000. Take screenshots of both, identify spacing / color /
font differences, list them.
跟 Claude 的 vision 能力深度结合 — Anthropic 比绝大多数竞品强的领域。
7. iOS / Android 模拟器自动化
Open the iOS Simulator, launch my app, tap through onboarding screens,
report any screen taking > 1 second to load.
不写 XCTest / Espresso。Claude 像真用户一样测。
📋 核心精读 — 安全模型
Per-app 批准 + 3 级权限
每次 Claude 想用一个新 app,terminal 弹批准对话框。3 个权限级别(按 app 类别硬绑定,不能改):
| 级别 | Claude 能做什么 | 哪些 app |
|---|---|---|
| View only(看) | 只截屏,不能点 | 浏览器、交易平台 |
| Click only(点) | 点 + 滚动,不能打字 / 用快捷键 | terminals、IDEs |
| Full control(全) | 点 / 打字 / 拖拽 / 快捷键 | 其他所有 app |
为什么 IDE 是 click-only:防止 Claude 通过 IDE 间接执行任意代码(IDE 等价于 shell access)。
4 种高警告 app(批准前会被特别标记)
| 警告 | 等价于 |
|---|---|
| Equivalent to shell access | Terminal、iTerm、VS Code、Warp 等 |
| Can read or write any file | Finder / File Explorer |
| Can change system settings | System Settings / Settings |
这些不被阻止,但批准时会有显式警告 — 让你确认任务值不值得放这么大权限。
2 个内置防线(无需配置)
- Terminal 永远不进 screenshot:你本机 terminal 窗口被 macOS 截屏 API 排除 — Claude 看不到自己的 output,防止 prompt injection 循环
- Esc 全局拦截:Esc 键被 Computer Use 优先消费 — 即使 prompt injection 想让 Claude “按 Esc 关闭” 也做不到
1 个排他锁
机器级 lock 文件 — 同一时间只能一个 Claude session 用 Computer Use。其他 session 试图启用时会显式告诉你哪个 session 占着。
“Apps are hidden while Claude works”(macOS-specific)
Claude 工作时,未批准的 app 窗口被自动隐藏(只剩被批准的 app + terminal),避免 Claude 误点。结束后自动恢复。可在 Desktop Settings > General > Unhide apps when Claude finishes 关掉。
📋 核心精读 — 跟 Chrome 扩展、MCP 等的取舍
官方明确的优先级:MCP > Bash > Chrome 扩展 > Computer Use
| 工具 | 何时优于 Computer Use |
|---|---|
| MCP server(Linear / Notion / GitHub) | 服务有 API 且有 MCP 包装 — 永远先用 |
| Bash | 任务是 shell 能跑的 — 文件 / 命令 / curl |
Chrome 扩展(--chrome) | 任务在浏览器内 — 比 Computer Use 快 / 准 / 便宜 |
| WebFetch / WebSearch | 只读公开内容 — 不需要交互 |
何时 Computer Use 不可替代:
- 没 API 的桌面 app(Figma 桌面、proprietary 软件)
- iOS / Android 模拟器
- 视觉 bug debug(需要 Claude 看到屏幕)
- 跨 app 工作流(Mail → Numbers / Photoshop → Web)
- macOS 系统设置 / 偏好
📋 核心精读 — CLI vs Desktop 差异
| 特性 | Desktop(Cowork / Code mode) | CLI |
|---|---|---|
| 平台 | macOS + Windows | 仅 macOS |
| 启用方式 | Settings > General > Computer use toggle | /mcp 里 enable computer-use server |
| Denied apps 列表 | ✅ Settings 里可配 | ❌ 还不支持 |
| Unhide apps 选项 | ✅ 可关 | ❌ 总是开 |
| Dispatch 联动 | ✅ Dispatch 触发 session 可以用 | ❌ 不适用 |
| Pro / Max 限定 | 同 | 同 |
→ 如果你在 Windows,只能走 Desktop app(CLI 没 Computer Use)
→ 如果你在 macOS 且重度用 CLI,可以用 CLI 的 computer-use server
→ 如果你想从手机 dispatch,必须 Desktop
📋 核心精读 — 启用步骤(CLI 端)
1. claude --version # 确认 v2.1.85+
2. /status # 确认 Pro 或 Max plan
3. (开一个 interactive session,不能 -p 模式)
4. /mcp
5. 找 `computer-use` server → Enable
6. 第一次使用时:macOS 会弹两个权限对话框
- Accessibility(让 Claude 点 / 打字 / 滚动)
- Screen Recording(让 Claude 看屏幕)
7. 同意后可能需要 quit Claude Code 重启(macOS 限制)
8. 提示 Claude 做 GUI 任务,看 Claude 干活
enable per project 持久化 — 装一次,这个项目永远开。换项目要再来一遍。
📋 核心精读 — Dispatch 触发的 Computer Use
回到你那张截图揭示的:
你手机
↓ 消息
Cowork tab 里的 Dispatch
↓ Dispatch 判断:"这是代码任务" → spawn 一个 Code session
Code tab 出现新 session(标 Dispatch badge)
↓ "Enable computer use" 已开
Claude 可以用 Computer Use
↓ 不过 30 分钟后会重新弹 app permission(比普通 Code session 严格)
Dispatch 把 Computer Use 推到了”你不在电脑前”的场景 — 这是 Anthropic 押的核心场景:你在咖啡馆,让电脑帮你跑一个需要看 UI 的任务。
🟢 译者总评
1. Computer Use 是 Anthropic 押的”AI agent 终极形态”
Computer Use 不只是个功能,是 Anthropic 对”AI 真正帮你干活”的定义。它的逻辑很简单:软件是给人用的,有屏幕键盘鼠标的人。所以 AI 也应该用屏幕键盘鼠标 — 这样任何软件都能被 AI 使用,不需要等 vendor 出 API。
这是 OpenAI Operator(只浏览器)/ Google Project Astra(只 mobile)等竞品还做不到的层级。
2. 但它的代价同样可观
- 慢:每个 action 都要截屏 → vision → reason → 再 action
- 贵:每张截图都是 vision input,长任务 token 烧得快
- 错率高:UI 一变 Claude 可能找错按钮(retina + 高 DPI 还要 downscale)
- 安全面大:approve 一次 = 给 Claude 整个 app 的 control
所以 official 优先级是对的:能用 Bash / MCP / Chrome 扩展先用,Computer Use 真的是 last resort。
3. 独立开发者最值得用的两个场景
a. 前端 demo / 原型验证
Open the demo at localhost:5173, test all 5 particle effects:
1. Click each control button
2. Wait for transition (~2s)
3. Screenshot the result
4. Report any visual glitches or console errors
→ Claude 真在浏览器里点,看效果。比手动测每个交互快 10×,而且会自动截图存档。
b. macOS app 灵感原型
如果你想做 SwiftUI / Electron / Tauri 桌面 app demo,Computer Use 让 Claude 从 build 到 click-through verify 一条龙。
4. 但要避开的反模式
- ❌ 用 Computer Use 跑回归测试(成本爆炸 — 用 Playwright)
- ❌ 用 Computer Use 自动化办公(发邮件 / 填表)— 用 MCP server 更稳
- ❌ 在 unattended 长跑里用 Computer Use(Dispatch 30 min 限制是有道理的)
- ❌ 给 Computer Use 配
--dangerously-skip-permissions— 等于让 Claude 不受监管在你桌面操作
5. 关于你截图揭示的认知更正
我之前的产品矩阵描述有问题,现在的正确理解:
Claude Desktop app(macOS / Windows)
├── 顶部 mode 切换
│ ├── Chat
│ ├── Cowork(agentic knowledge work)
│ └── Code(Claude Code,跟 CLI 平行)
├── 左侧 sidebar(跨 mode 共享)
│ ├── New task
│ ├── Projects(workspace 分组)
│ ├── Scheduled(类似 routines)
│ ├── Live artifacts
│ ├── Dispatch (Beta) — 从手机触发
│ └── Customize
└── Settings > General
├── Computer use toggle ← 全局开关
├── Denied apps
└── Unhide apps when finished
→ Dispatch 设置里看到的 "Enable computer use" 是把全局开关
暴露在 Dispatch 上下文里的快捷入口
→ 不是 Dispatch 独占
→ Cowork 和 Code mode 都能用 Computer Use
→ CLI 端也能用(macOS only),通过 /mcp 启 server
🔗 延伸阅读
- 同系列:
03-chrome-extension.md(浏览器优先于 Computer Use)、07-mcp-ecosystem.md(MCP 优先于 Computer Use)、99-claude-product-matrix.md(全 Anthropic 产品定位) - 官方:
/en/desktop— Desktop app 完整文档(三个 mode + Dispatch) - 官方:
/en/sandboxing— Bash 沙箱 vs Computer Use 信任边界对比 - 官方:Computer Use Safety Guide — Anthropic 的 best practices
- 官方:Dispatch help article — Dispatch 设置 / pairing
🔗 调研来源(可校验)
- 主原文 1:
https://code.claude.com/docs/en/computer-use(CLI 端) - 主原文 2:
https://code.claude.com/docs/en/desktop(Desktop 端#let-claude-use-your-computer) - 用户截图:Claude Desktop app 的 Dispatch 设置面板,2026-05-14 实拍
- changelog v2.1.85:CLI 端引入
computer-useMCP server(本机raw/scan/CHANGELOG.md可 grep) - Pro / Max 限定:文档明确标
plan-availability: feature=computer-use plans=pro,max - macOS-only(CLI):文档明确;Windows 用户走 Desktop