A from-scratch Swift reimplementation of macOS computer-use tooling (Codex Computer Use reverse-engineering + drop-in @oai/sky-compatible JS bridge + MCP server)
View on GitHub ↗A from-scratch Swift 6 reimplementation of macOS computer-use tooling, built from a clean-room reverse-engineering study of the Codex Computer Use.app service — with a drop-in @oai/sky-compatible JS bridge and an MCP server.
中文简介:本项目对一个 macOS 上的 Computer Use 后台服务做了完整逆向(App 结构 / IPC 协议 / 权限与锁屏安全模型 / AX·截图·输入引擎),然后用 Swift 6 从零重写了一套功能等价的实现: 常驻服务 + cua 命令行 + MCP server + 与 @oai/sky 同形的 JS 客户端。 与 OpenAI 无任何关系,不包含其代码,不包含任何私有 API 调用。
组件 说明 ------ CUAService LSUIElement 后台服务:AFUNIX socket、JSON-RPC 2.0(4B LE 长度前缀)、按会话授权 App、权限门 CUAEngine 无障碍树抓取(AXUIElement)+ 元素索引表、常驻 ScreenCaptureKit 窗口流(系统共享预览)、CGEventPostToPid 后台输入、应用与窗口枚举 PiP 预览 服务内 AppKit 浮窗(320×220 HUD)+ 菜单栏状态项,实时显示受控窗口、可拖动/停止共享/自动淡出 cua 命令行:ping/apps/windows/state/click/press-key/type/scroll/set-value/drag/paste/select-text/action/screenshot/doctor/session/call cua mcp stdio MCP server,16 个工具(含 findtext / clicktext) @swiftcua/sky Node 客户端:sky.listapps()、sky.getappstate() … 与原 @oai/sky 同形,另有 findtext/clicktext swiftcua-mcp Node MCP server,提供 cuarepl 风格 js / jsreset / turnended 工具
1. 打开「系统设置 → 隐私与安全性 → 屏幕录制」,添加/勾选 SwiftCUA.app 2. 打开「系统设置 → 隐私与安全性 → 辅助功能」,添加/勾选 SwiftCUA.app 3. launchctl kickstart -k gui/$(id -u)/dev.v1ki.swiftcua.service
助手:./scripts/open-permissions.sh 会直接打开这两个设置面板(授权仍需手点)。
签名身份:scripts/build-app.sh 会自动挑选钥匙串里的第一个 Apple Development 身份; 也可用 CUASIGNIDENTITY="Apple Development: ..." make app 指定。 用固定身份签名,TCC 授权才能在重编译后保留;ad-hoc 签名每次重建都会被系统当成新 App。
From the project README.
Add the radar badge to your README — it shows your project was picked up by MCP Radar and links to this page:
[](https://mcp.liqiwa.com/s/V1ki--swift-computer-use.html)
Free, open-source screen recorder for macOS. A share link the moment you stop, then auto-zoom, smooth cursor and captions under the same link. Native Swift, your own S3/R2 bucket, CLI and MCP server.
ostapondo/PlonkA macOS window manager with snap zones you draw yourself and workspaces that reopen your apps on the right monitor — plus on-device OCR, keep-awake, screenshot annotation, pointer tools, a shortcut gu
MarlonJD/apple-debug-mcpLocal, capability-aware MCP server for authorized AI-assisted macOS and iOS debugging, Simulator/device workflows, Apple binary analysis, profiling, and reproducible evidence.
gignit/leap-mcpLeap gives any AI agent x-ray vision into desktop apps (native accessibility and screenshots) along with full mouse and keyboard control. It works in the background without taking over your screen, us
EphraimElgrabli/gesherYour AI, meet your Mac. Native MCP access to Reminders, Calendar, Contacts, Notes, Maps, Weather and Freeform. Experimental.
haplollc/VesaliusA map of your codebase for Claude Code: an on-device code graph with an MCP server, a CLI, a Mac app and a VS Code extension.
The top new MCP servers of the week, every Monday. No spam, unsubscribe anytime.