DSH Codex Computer Use
Enables agents to control arbitrary macOS applications through the Accessibility API and window screenshots: listing running/recent apps, reading an app's window as an accessibility tree plus screenshot, then clicking elements or coordinates, setting field values, typing, pressing key combinations, selecting text, scrolling, dragging, and triggering secondary accessibility actions — with operations performed in the background on Apple Silicon Macs running macOS 14.4+.
Wraps OpenAI's official Codex / ChatGPT Computer Use engine (the signed Node runtime, CLI, and Computer Use client/service, pinned to a fixed official version and verified by SHA256 and Apple signature) and exposes its observe-and-act capabilities as MCP tools, including handling the official app-access authorization flow.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DSH Codex Computer UseOpen Reminders and add 'Buy milk' to my Groceries list"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
很多事只能在图形界面里做:内部 IM、设计工具、没有 API 的老系统、系统设置……Agent 能写代码,却点不了按钮。
DSH Codex Computer Use 把 OpenAI 随 Codex / ChatGPT 桌面端发布的官方 Computer Use 引擎,作为 mcp__codex_cu__* 工具交给 DSH 里的 Agent——它能看懂窗口里的界面结构,在后台点击、输入、滚动、拖拽,不抢你的鼠标和前台窗口。
实验版(
0.1.0-experimental)。与 dsh-kimi-computer-use 使用独立的工具命名空间,可以并存,按 profile 自由切换。
亮点
装上就能用 ——
dsh plugin add一条命令;不要求你先装 Codex 或 ChatGPT 桌面端,缺的官方组件安装时自动准备,装包时跳过了也会在首次启动时补齐。能复用就不下载 —— 本机已有兼容的 ChatGPT / Codex 桌面端时,逐组件校验后直接引用,零下载;只缺哪一块才补哪一块。
按字节只取需要的 —— 需要下载时,用 HTTP Range 从固定的官方 ZIP 里只取运行必需的文件:约 174 MB,而不是 719 MB 的完整安装包(省约 76%)。
全程官方签名 —— Node、CLI、Computer Use 都来自 OpenAI 官方发布,逐文件 SHA256 + Apple 签名(Team ID
2DC432GLL2)校验;不重签名、不修改官方二进制、不绕过系统安全机制。界面结构 + 截图双通道 —— 每次观察同时拿到辅助功能树(元素编号、可写字段、二级操作)和窗口截图,能按元素精确操作,也能按坐标点选。
自带操作 skill —— 内置参考 Codex 官方行为改写的
codex-computer-useskill:先观察再动手、每步复核、高风险操作先征得你同意。不碰你的账号 —— 不读取、不复制你的 Codex 登录凭据、配置或会话;需要私有运行目录时与
~/.codex完全分开。
Related MCP server: blade-computer-use
Agent 能做什么
装好后直接用自然语言下指令,例如:
「打开提醒事项,新建列表『下周计划』,把 周报.md 里的两项逐条加进去。」
「在 Wea 里找到第一条未读消息,根据上下文写一段回复填进输入框,先别发送。」
「把系统设置里的『勿扰模式』排程改成每天 22:00 到 8:00。」
背后是这 10 个工具(参数以运行时 MCP schema 为准,详见 docs/native-tool-schemas.json):
工具 | 作用 |
| 列出正在运行和最近使用的应用 |
| 读取应用主窗口:辅助功能树 + 截图(每轮操作前先调用) |
| 按元素编号或截图坐标点击,支持双击、右键 |
| 直接写入可编辑元素的值(输入框、搜索框等) |
| 在当前焦点输入文字、按键或组合键(如 |
| 选中文字,或把光标放到指定文字前后 |
| 按页滚动元素、按坐标拖拽 |
| 触发元素暴露的二级辅助功能操作 |
三步用起来
要求:Apple Silicon Mac,macOS 14.4 或更高;已安装 DSH(@deepseek-ai/dsh,Node ≥ 22.19)。
安装插件(实验版请带
@experimental标签):dsh plugin --profile web add dsh-codex-computer-use@experimental如果 DSH 提示构建被拦截(pnpm 默认禁止安装脚本),在该 profile 的
pnpm-workspace.yaml里允许本包后重跑:allowBuilds: dsh-codex-computer-use: true本机 npm 默认源是内部镜像时,可临时指定公共源:
npm_config_registry=https://registry.npmjs.org dsh plugin ...。启动 DSH:
dsh --profile web(或dsh web)。几秒后mcp__codex_cu__*工具就会出现。首次授权:第一次操作时,按 macOS 提示给官方 Computer Use 授予「辅助功能」和「屏幕录制」权限。插件不会替你修改系统隐私设置。
想确认一切就绪,可以跑一次只读体检(不点击、不输入):
dsh-codex-cu-doctor轻量又可信的运行时
flowchart LR
agent(["dsh 里的 Agent"]) -- "mcp__codex_cu__*" --> bridge["dsh-mcp-client<br/>(通用 MCP 桥)"]
bridge --> node["OpenAI 签名 Node<br/>+ 权限代理"]
node --> cu["官方 Computer Use<br/>client / service"]
cu -- "辅助功能 + 截图" --> apps["你的 Mac 应用"]
style node fill:#0A84FF,stroke:#0A84FF,color:#fff为什么要签名 Node? 用普通 Node 直接启动官方 Computer Use,会被 -10000 Sender process is not authenticated 拒绝。本插件用 OpenAI 签名的 Node 运行一个很小的 MCP 权限代理,再拉起官方 client;同时提供官方 CLI 路径(缺少它会报 -10005),并实现 elicitation/create 回调,使应用访问授权能在 DSH 中正常走完。
运行时从哪来,按以下顺序,能省则省:
顺序 | 来源 | 下载量 |
1 | 本机 | 0 |
2 | 按组件复用:Node、CLI、Computer Use 分别校验,合格的直接引用 | 0 |
3 | 只缺的组件用 HTTP Range 从官方 ZIP 精确取出 | 只缺 CU 约 36 MB · 只缺 CLI 约 98 MB · 只缺 Node 约 39 MB · 全缺约 174 MB |
4 | 服务器不支持 Range(返回 200 / 416)时,才下载并校验完整官方 ZIP,再裁剪成同样的轻量布局 | 719 MB |
校验什么:固定的官方 URL 与文件大小;ZIP 中央目录 SHA256;每个文件压缩数据与解压内容的 SHA256、类型、权限;组装后 Node / CLI / Computer Use 的完整 Apple 签名。任何一项不符直接失败,绝不静默降级。
当前兼容版本固定为 26.1007.30912(官方 ZIP),不会自动追随 latest,也不会把不同版本的组件拼在一起。清单见 runtime-source.json 与 runtime-components.json。这些 SHA256 是维护者从官方 HTTPS 下载、验证官方签名后固定的,不代表 OpenAI 发布过这份清单。
准备好的运行时缓存在
~/Library/Caches/dsh-codex-computer-use/runtime,按版本分目录;临时目录验证通过后才原子发布,有跨进程安装锁,不会把半成品当成就绪。本机原有的 app 被更新、删除或损坏时,引用自动失效,下次重新检测。
本包只分发安装器、桥接代码和 skill;Computer Use 等官方专有组件不做镜像,始终从官方来源获取。详见 依赖分发策略。
权限与安全
默认 config: {} 即可:自动准备运行时,permissionMode: allow-all——自动接受已识别的官方「应用访问」请求,不逐个应用弹窗确认。
| 行为 |
| 自动允许访问应用 |
| 每个应用首次访问时请你确认 |
| 只允许 |
任何模式下,账号、token、URL 跳转、未知表单和已取消的请求都会被拒绝。
请注意:放开应用访问,意味着 Agent 能读取、操作这些应用里的内容,只在你信任当前任务时使用。它不等于发送消息、删除、购买、发布等业务授权——内置 skill 会要求 Agent 在这些不可逆操作前先征得你同意。切回 prompt / deny 并重启即可收紧。
在 profile 里覆盖稳定的 row id:
- id: computer-use-codex-cu
config:
autoSetup: true # false:首次使用也不自动下载
runtimeDir: /absolute/path/private-runtime-cache
permissionMode: allow-all # allow-all | prompt | deny
allowedApps: [] # deny 模式下的白名单(应用显示名称)
toolCallTimeoutMs: 60000mode: direct保留直连诊断模式;同时提供appPath/nodePath/cliPath(均须为绝对路径)会跳过自动准备,但插件不会因此宣称它们是官方签名。显式
codexHome优先;自定义目录需自行满足computer-use的标准布局。环境变量:
DSH_CODEX_CU_SKIP_SETUP=1跳过 npm 安装钩子(首次使用仍会补装);DSH_CODEX_CU_ARCHIVE指定本地官方 ZIP;DSH_CODEX_CU_SKIP_LOCAL=1不复用本机已装的 app。
平时不需要手动运行;遇到问题时可用:
dsh-codex-cu-setup # 准备 / 补齐运行时
dsh-codex-cu-setup --check # 只检查就绪标记,不下载
dsh-codex-cu-setup --force # 重新校验并准备同一固定版本(完成前不影响旧缓存)
dsh-codex-cu-setup --archive /absolute/path/official-pinned.zip --skip-local # 用同一官方 ZIP 离线准备
dsh-codex-cu-doctor # 真实只读体检:initialize / listTools / list_apps--runtime-dir 指定绝对缓存目录;--source-app 只接受版本和签名都正确的官方 app。
卸载与回退
dsh plugin --profile web remove dsh-codex-computer-use卸载不会终止共享的 Computer Use 服务,也不会删除原有的 Codex / ChatGPT 安装或任何账号文件。确认没有客户端在使用后,可手动清理 ~/Library/Caches/dsh-codex-computer-use。想换回 KimiCU,切换到装有 dsh-kimi-computer-use 的 profile 即可。
开发
DSH_CODEX_CU_SKIP_SETUP=1 npm install
npm run check # 构建 + 单元测试
npm run test:pack # 校验发布包内容
npm run setup # 在本机准备运行时
npm run doctor # 真实只读体检路径 | 内容 |
| 签名 Node 中运行的 MCP 权限代理 |
| 本地复用与轻量运行时准备 |
| HTTP Range 精确下载与逐文件校验 |
| DSH 插件入口( |
| 内置操作 skill |
|
发布:通过 GitHub Actions 发布到 npm,使用 Trusted Publishing(OIDC)并附带 Provenance,不保存长期 npm token。
本插件代码以 MIT 许可发布(保留 KimiCU 原始归属)。MIT 不延伸到运行时下载的 OpenAI 专有组件,这些组件保留其官方版权、许可与签名。本项目是第三方互操作插件,不代表 OpenAI 或 DeepSeek 的背书、合作或长期支持承诺。
DSH App 家族
DSH App 是为 DeepSeek Harness(dsh)打造的一组客户端与插件。它们都接入你电脑上同一个 dsh——会话、模型与插件处处互通,按需组合即可。下载与文档见 dshapp.github.io。
flowchart LR
subgraph pc["你的电脑"]
mac["macOS App"] --> dsh(["dsh"])
cc["dsh-chrome-control"] --- dsh
mb["dsh-mobile-bridge"] --- dsh
cu["dsh-kimi-computer-use"] --- dsh
codex["dsh-codex-computer-use"] --- dsh
cs["dsh-claude-subscription"] --- dsh
ext["Chrome 扩展"] <--> cc
end
android["Android App"] --> proxy["dsh-proxy"]
mini["微信小程序"] --> proxy
proxy <--> mb
style codex fill:#0A84FF,stroke:#0A84FF,color:#fff项目 | 做什么 | 链接 | |
客户端 | macOS App | 原生 SwiftUI 客户端,托管本机 dsh,一站式开启各个扩展 | |
Android App | 口袋里的 DSH:审批、提问、通知,端到端加密连回电脑 | ||
微信小程序 DSH Remote | 免安装,iPhone / Android 的微信里扫码接管 DSH | ||
Chrome 扩展 | 浏览器侧栏里的 DSH 客户端,也是浏览器控制的执行端 | ||
dsh 插件 | 浏览器控制 | 把你已登录的 Chrome 作为 | |
移动端桥接 | 经 Noise 加密隧道把 dsh 交给已配对的手机,不开端口 | ||
电脑操作(Kimi) | 让 Agent 在后台操作没有 API 的 Mac 应用 | ||
电脑操作(Codex) ← 你在这里 | 用 OpenAI 官方 Computer Use 操作 Mac 应用,自动准备官方签名运行时 | ||
Claude 订阅 | 用 Claude Code 订阅在 DSH 里跑 Claude 模型,不用另买 API Key | ||
基础设施 | 中转服务 | 手机远程唯一的公网组件:单端口、只转发密文、无状态 | |
产品站 | 下载、文档与更新日志 |
This server cannot be deployed
Maintenance
Related MCP Connectors
Let your AI agent control real iPhones: screenshots, tap, swipe, type and open apps.
1Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides native macOS computer control tools including mouse and keyboard simulation, screenshot capture, and application management for MCP-compatible agents. It enables AI assistants to directly interact with the macOS operating system and installed apps through standard tool calls.247 npm8MIT
- AlicenseNot gradedqualityDmaintenanceEnables MCP clients to control macOS via accessibility and screen recording, providing tools to list apps, observe UI, click, type, press keys, and scroll.MIT
- AlicenseAqualityDmaintenanceEnables AI agents to control macOS desktop apps via screenshots, mouse clicks, keyboard input, accessibility queries, and AppleScript.116 npmMIT
- AlicenseNot gradedqualityBmaintenanceProvides 146 MCP tools for AI agents to control macOS, including screenshots, mouse, keyboard, window management, app automation, file system, OCR, and built-in app semantics like Calendar, Mail, Safari, Music, Messages. Enables full control over macOS through natural language.1MIT