Skip to main content
Glama
huiliyi37

dsh-computer-use-mcp

by huiliyi37

dsh-computer-use-mcp

英文 | 中文

独立的 Model Context Protocol 服务器,为 macOS 和 Windows 提供桌面 GUI 自动化 — "computer use"。任何 MCP 主机都可以驱动它:DeepSeek Harness (dsh)、Claude Code、Cursor 以及所有其他 MCP 客户端。

一个工具 computer_use,包含 23 个操作:带编号引用的无障碍树快照、点击 / 拖拽 / 输入(通过剪贴板支持中日韩文字)/ 快捷键、应用启动与聚焦、菜单选择、截图产物,以及用于浏览器标签页的 Chrome DevTools Protocol 快速通道。

亮点

  • 无障碍优先 — 快照返回带编号的树;后续每个操作都通过引用(ref)定位元素,而不是脆弱的坐标。

  • 跨平台 — macOS(通过 AppleScript/JXA 的 AX API)和 Windows(UIA3 COM 快速通道,带托管回退)。

  • 浏览器 CDP 快速通道 — Chrome 系列目标自动切换到 DevTools 会话,实现亚秒级快照和防遮挡输入(navigate / read_page / js_eval / tabs)。

  • 截图作为图像产物 — 视觉模型接收 PNG;文件持久保存在 CU_HOME 下用于审计。

  • 内置安全护栏 — 静态 danger-guard 拦截危险脚本载荷;每个应用的"始终允许"授权持久保存在专属表中。

安装

Node ≥ 20。

npm install -g dsh-computer-use-mcp   # then run: dsh-computer-use-mcp
# or one-shot:
npx -y dsh-computer-use-mcp

连接到你的主机

DeepSeek Harness (dsh)

dsh 通过 @deepseek-ai/dsh-mcp-client 桥接 MCP 服务器。在 dsh/computer-use.cordis.yml 中传入现成的覆盖配置:

dsh --profile <name> --patch /path/to/dsh-computer-use-mcp/dsh/computer-use.cordis.yml

模型将看到该工具为 mcp__computer-use__computer_use。参见 dsh/README.md 了解证明集成无需密钥的冒烟测试。

Claude Code

claude mcp add computer-use -- npx -y dsh-computer-use-mcp

Cursor / 通用 mcpServers JSON

{
  "mcpServers": {
    "computer-use": { "command": "npx", "args": ["-y", "dsh-computer-use-mcp"] }
  }
}

computer_use 工具

单个工具,按 action 分发。完整的 JSON 模式随 tools/list 提供。

分组

操作

读取 / 探测

check_permissions, list_apps, snapshot, find, wait_for, wait

输入

click, double_click, right_click, scroll, drag, type, set_value, key, paste_text

应用 / 窗口

focus_app, launch_app, menu_select

浏览器 (CDP)

navigate, read_page, js_eval, tabs, browser_adopt

典型循环:snapshot → 对编号树进行推理 → 按引用操作(click {ref})→ 操作后的反馈重新快照并报告 UI 差异。

安全模型 — 启用前请阅读

  • MCP 没有审批概念:工具调用会立即执行。启用主机端的工具审批 / 确认层;不要为不可信提示授予完全自主权。

  • danger-guard 在实现内部静态拦截危险脚本载荷。

  • 每个应用的"始终允许"授权 持久化在 CU_HOME(默认 ~/.tianshu-computer-use/)下,与主机自身的权限存储分离。

  • macOS:为运行此服务器的终端(或主机应用)授予 辅助功能屏幕录制 权限。check_permissions 操作会自检并报告缺失项。

环境变量

变量

效果

CU_HOME

授权和截图产物的数据目录(默认 ~/.tianshu-computer-use

CU_SESSION_ID

每个会话的产物子目录名(默认 mcp

RIVET_CU_CDP=0

禁用浏览器 CDP 快速通道

RIVET_CU_FEEDBACK=0

禁用操作后的 UI 反馈摘要

RIVET_CU_HOST=0

禁用脚本主机(macOS JXA / Windows PowerShell 通道)

RIVET_CU_COM=0

禁用 Windows UIA3 COM 快速通道(回退到托管构建器)

开发

npm install
npm run build                      # tsup → dist/index.js
npm run smoke                      # SDK-client stdio smoke (tools/list + wait)
node integration/verify-server.mjs # zero-dependency JSON-RPC smoke

integration/dsh-smoke.ts 是一个无需密钥的集成冒烟测试,针对 DeepSeek Harness 的真实插件组合 — 从 deepseek-harness 检出中运行(说明)。

huiliyi37/Tianshu-harness 提取 — tianshu(天枢)harness 仓库。impl/ 下的实现是其 computer-use 模块的冻结快照;本仓库现在是该代码的权威来源。

许可证

GNU AGPL-3.0 — 源代码可用,强 copyleft:修改后分发或通过网络服务必须共享。从任何 MCP 主机本地使用不受限制。可按需提供商业许可。

-
license - not tested
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.

  • MCP server for interacting with the Supabase platform

  • Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/huiliyi37/dsh-computer-use-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server