Antigravity Computer Use
Provides background, non-intrusive macOS desktop automation, including accessibility-tree inspection, mouse and keyboard input, live screen streaming, and sandboxed script execution without stealing focus.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Antigravity Computer Use (Codex-Style)
将 Google Antigravity 的 computer-use / computer-use-js 改造为与 Codex 一致的macOS 后台无感操控 + 右侧 Aux Pane 实时小窗体验。
核心特性
后台无感操作(不置顶、不抢焦点、不误拉起已退出应用、无桌面悬浮光标)
复用本机已公证签名并授权的
Open Computer Use.app(可选依赖open-computer-use),同时通过持久化WindowOcclusionKeepAlive让被遮挡的后台窗口持续渲染。全链路禁用原生前台恢复(
window_placement: "keep"),由 Broker 接管非激活状态回读与 Focus-Steal Guard(毫秒级防抢焦点清扫 + 自适应SelfActivationTracker),不调用activate、AXRaise或在用户退出应用后误重启。未启动应用仅在显式请求时通过
open -g后台静默拉起;Cmd+H隐藏应用仅后台unhide()不抢焦点;左键单双击与键盘输入优先走无激活窗口局部投递或 SkyLight 后台通道,并隐藏桌面悬浮光标。
对话右侧实时小窗(Antigravity Aux Pane Sidecar)
通过双原生通道隔离 AX 元素索引与实时画面流,支持
CUADesktopHelper.app的 ScreenCaptureKit + VideoToolbox H.264 硬件推流与 WebCodecs 解码,并在不支持时自动降级到同目标 JPEG 流。严格贯彻同窗坐标契约(Same-Window Proof):只有确认小窗画面与派发目标为同一活体窗口且几何一致时才允许坐标点击,否则自动降级只读。
实时展示虚拟光标轨迹、快照与护盾计数,并支持直接在小窗内单双击/右键/滚动/发送文本与快捷键,以及一键「跟随」、「暂停」与「置顶」。
人类接管急停与独立沙箱脚本执行
人类接管刹车(
TakeoverController):识别小窗交互、命中目标真实窗口的鼠标按下、系统切换手势与全局急停热键(默认Control+Option+Escape),在写入原生 IPC 前同步拦停在途请求。独立沙箱脚本(
CUAScriptRunner.app):computer-use-js每次执行在全新进程内启用 macOS Seatbelt 默认拒绝策略(禁止网络、文件写入与进程派生)与禁用 JIT/WASM/eval的 JavaScriptCore 环境,并支持跨轮次可序列化变量与 app 句柄持久化。
常驻毫秒级无障碍桥接 & 活体句柄防护
常驻热桥
PersistentAxBridge:免去反复启动osascript的冷启动开销,实现亚帧级焦点检测与抢焦点拉回。活体
AXUIElementRef闭环防护(STALE_REF):为每次快照与query签发@sN:index并在热桥内绑定真实控件句柄与相对几何;后台窗口刷新、节点销毁或模态弹窗切换时在点击前拦截。后台按需唤醒 Electron / Chromium 懒加载无障碍树(
AXManualAccessibility = true),并对AXSecureTextField自动脱敏且禁止走按键旁路。
Related MCP server: cua-jev
环境要求
操作系统:macOS 14.0 (Sonoma) 及以上
Node.js:>= 18(推荐 Node.js 22)
宿主应用:Google Antigravity
源码编译依赖:Xcode Command Line Tools(包含
swiftc、clang、codesign,仅从源码构建时需要;一键安装包内已包含预编译产物)
安装与卸载
方式一:从源码安装(推荐开发者)
git clone https://github.com/w893713584-ai/antigravity-computer-use.git
cd antigravity-computer-use
# 1. 编译原生 Swift/C 助手 (CUADesktopHelper.app 与 CUAScriptRunner.app)
npm run build:native
# 2. 部署到 ~/.gemini/codex-style-computer-use 并配置 Antigravity MCP 与 Sidecar
npm run install-agy方式二:构建一键分享安装包
npm run pack-share
# 生成 dist/Codex风格ComputerUse一键安装包.zip解压后可运行目录内的 双击安装.command(或在终端执行 bash 双击安装.command);完整步骤与 macOS Gatekeeper 说明见 使用说明.txt。
首次使用授权(macOS 隐私与安全性)
首次使用请在「系统设置 → 隐私与安全性」按需开启以下权限(未全部开启时会自动降级对应能力):
辅助功能 (Accessibility):
Antigravity.app、Open Computer Use.app、~/.gemini/codex-style-computer-use/native-runtime/CUADesktopHelper.app录屏与系统录音 (Screen Recording):
Open Computer Use.app、CUADesktopHelper.app(启用 H.264 实时推流)输入监控 (Input Monitoring):
CUADesktopHelper.app(启用真人接管刹车与急停热键)
卸载还原
npm run uninstall-agy
# 或运行安装目录中的 双击卸载.command项目结构与文档
src/:Broker 服务、MCP / REPL Server、策略守护、无障碍桥接、坐标契约、WebSocket 视频推流与 Sidecar UInative/DesktopHelper/:Swift 原生桌面采集、H.264 硬件编码与输入监控助手native/ScriptRunner/:Swift/C Seatbelt + JavaScriptCore 沙箱脚本执行器(内嵌acorn解析器)scripts/:原生构建(build-native.mjs)、安装/卸载器与一键安装包打包脚本test/:单元测试套件(使用注入替身,CI 下无需 TCC 弹窗)架构与领域文档:
GLOSSARY.md — 领域术语表
docs/deepening-spec.md — 深模块架构重构说明
docs/adr/ — 架构决策记录(ADR 0001–0006)
docs/design/option-a-blueprint.md — 原生刹车、沙箱与视频流设计蓝图
开发测试与参与贡献
# 运行完整单元测试
npm test欢迎提交 Issue 和 Pull Request!提交前请阅读 CONTRIBUTING.md 中的后台无感与安全红线;如发现安全漏洞请遵循 SECURITY.md 私密上报。
许可证与致谢
本项目源码基于 MIT License 开源。
第三方组件与设计参考声明见 THIRD_PARTY_NOTICES.md,特别致谢:
iFurySt/open-computer-use(MIT License)及其上游
trycua/cua、asmvik/yabai、libwebpvercel-labs/agent-desktop(Apache-2.0 License,无头
AXSelectedText与AXScrollBar设计参考)acornjs/acorn(MIT License,内嵌用于沙箱顶层语法解析)
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Reach your own computers from any AI app: files, commands, screen and mouse, approvals and alerts.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceA local daemon for macOS that gives any MCP-capable AI client eyes, hands, and a face — screen capture, accessibility tree, mouse/keyboard actions, and an overlay — with a built-in security ceiling.-
- AlicenseNot gradedqualityBmaintenanceEnables controlling macOS apps in the background, letting Claude Code or Codex act on native app UI elements without foregrounding them.1MIT

K-Browserofficial
AlicenseNot gradedqualityBmaintenanceEnables local AI agents on macOS to drive the user's own signed-in Chrome through their own isolated tabs, with per-client tokens, blocked site categories, masked secrets and human hand-offs. Agents can open and navigate tabs, read pages, send real clicks and typing, inspect network requests, and hand tabs back to the user, all without touching other tabs or stealing focus.232 npm1MIT- AlicenseNot gradedqualityBmaintenanceEnables AI agents to discover and control allowed macOS apps in the background through accessibility trees, window screenshots, and semantic actions over a local stdio interface.MIT