lazy-desktop-mcp

MCP安全风控

提供方 leaf76 · 包名 lazy-desktop-mcp

安全风控 stdio · 本地进程 会话登录 社区 / 第三方 ClaudeCursorCodex
查看接入方式

A local-first desktop control MCP server that provides secure app/window/input/screenshot automation with an operator Presence UI, compatible with macOS and Windows platforms.

一句话选型结论

按资料字段整理

lazy-desktop-mcp 属于安全风控类 MCP 服务器,stdio · 本地进程,会话登录,可直接接入 Claude、Cursor、Codex,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类安全风控 传输方式stdio · 本地进程 鉴权会话登录 部署方式本地部署
GitHub 星标 1 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

安全风控
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

Local Deployment MCP server Desktop automation Rust Computer control macOS support Windows support Rust development Security policy

支持客户端

适用场景

Local DeploymentMCP serverDesktop automation

安装与配置

stdio · 本地进程 会话登录
客户端在本机拉起子进程,数据不出本机
# One-time: build + install the UI next to host data dir npm run install:presence-ui # Then start MCP as usual (Codex / npx lazy-desktop-mcp) # Host logs on control: "Launched Presence UI: …" # Host logs after last session.close: "Quit Presence UI (…)"

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 rust,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
资产与漏洞排查

盘点资产、扫漏洞、看暴露面。

日志与审计

汇总日志、查异常行为。

合规检查

按规则检查配置与权限是否合规。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude、Cursor、Codex,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 使用前要准备好会话登录对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在安全风控场景里让模型直接调用外部能力的人。
  • 已经在用 Claude、Cursor 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
lazy-desktop-mcp当前 未标注 stdio · 本地进程 本地部署 有 2026-08-22
Cyber Strike AI 75 未标注 未标注 无 2026-05-17
mcp-for-beginners 未标注 stdio · 本地进程 本地部署 有 2026-04-13
casdoor 未标注 stdio · 本地进程 本地部署 有 2026-04-12
kubeshark 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Modelcontextprotocol C22988b0 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

安全风控
字段来自项目仓库与公开索引,中文说明由本站标注
提供方leaf76上游标注的维护方 leaf76
分类安全风控本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式会话登录远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时lazy-desktop-mcp · rust本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-08-22上游最后核验时间

详细介绍

12.9 KB
来自项目仓库与上游目录的原文,未做删改

lazy-desktop-mcp

Local-first desktop control MCP server (computer use): a Rust host process plus an npm-distributed Node launcher for safe app/window/input/screenshot automation with an operator Presence UI.

Works with Codex, Claude Code, and other MCP clients over stdio. Defaults are locked down until you configure a host policy.

Keywords: MCP server, desktop automation, computer use, macOS, Windows, Rust, Codex, policy-gated control, Presence UI.

Platforms: macOS (full backend + Presence UI) and Windows (Win32 window/input/screenshot backend; see docs/windows.md).

Clients: Tool names use underscores (app_list, not app.list) so Grok, Codex, Claude Code, OpenAI-style hosts, and other strict MCP clients all register tools correctly. See docs/client-compatibility.md.

What Ships

  • desktop-core: shared types, policy evaluation, audit payload handling, and host wire protocol
  • desktop-host: local privileged host with audit storage, session handling, screenshot capture, and platform adapters
  • desktop-mcp: MCP stdio server that proxies tool calls to desktop-host
  • lazy-desktop-mcp: Node launcher published to npm so Codex can start the MCP server with npx or a global install

Presence UI (AI is controlling…)

While the host handles desktop actions it publishes operator-facing status to:```text
{artifact_dir}/presence/current.json
{artifact_dir}/presence/events.jsonl
{artifact_dir}/presence/STOP # operator halt (host denies gated actions)
{artifact_dir}/presence/PAUSE # operator pause (host waits until cleared)


`desktop.runtime` includes `presence_state_path`, `presence_events_path`, `presence_stop_path`, `presence_pause_path`, plus `presence_ui_app_path` / `presence_ui_running`.
See docs/presence-ui.md for menu bar / HUD design and STOP/PAUSE semantics.

### Presence UI lifecycle (macOS)

**End-user guide:** docs/FOR_USERS.md

`desktop-host` opens **ComputerUsePresence.app** (HUD, edge glow, AI cursor) when a session opens or gated desktop control runs — **not** on idle host/MCP startup.

When the **last** automation session is closed (`session.close`) — or the host process exits — the host **quits** Presence UI so the menu bar/glow does not keep looking like AI is still controlling the Mac.```bash
# One-time: build + install the UI next to host data dir
npm run install:presence-ui

# Then start MCP as usual (Codex / npx lazy-desktop-mcp)
# Host logs on control: "Launched Presence UI: …"
# Host logs after last session.close: "Quit Presence UI (…)"
Env Effect
LAZY_DESKTOP_AUTO_LAUNCH_PRESENCE_UI=0 Disable auto-launch on control
LAZY_DESKTOP_AUTO_QUIT_PRESENCE_UI=0 Keep Presence running after session close / host exit
LAZY_DESKTOP_PRESENCE_UI_PATH Explicit path to .app
LAZY_DESKTOP_PRESENCE_UI_SOURCE Source tree for install:presence-ui

desktop.runtime reports presence_ui_auto_launch, presence_ui_auto_quit, and presence_ui_running.
Agents can also call presence.ui.quit anytime to force-quit the Presence HUD (always available).

Installed location:```text
~/Library/Application Support/dev.lazy.desktop-mcp/PresenceUI/ComputerUsePresence.app


**Lifecycle (defaults):** control starts → launch Presence → last `session.close` or host exit → **host quits Presence**. The app also has an optional ~180s idle auto-quit; do not rely on it alone. Closing the HUD does **not** stop the agent unless you enable “Write STOP when HUD is closed”.

## Security Defaults

The public package is intentionally locked down until the operator configures a host policy file.

- `desktop.capabilities`, `desktop.permissions`, `desktop.runtime`, `presence.ui.quit`, `session.open`, and `session.close` are always available
- standalone capabilities such as `app.list` and `observe.capture` are disabled until allowed by host policy
- session capabilities such as `app.launch` are disabled until allowed by host policy
- raw coordinate input is disabled unless explicitly enabled by host policy
- window-scoped screenshots require `capture_scope` other than `primary`
- full OCR text requires `ocr_allow_full`; screenshots stay on disk and are never returned as MCP image bytes
- MCP tool results are compact by default (`detail=full` for diagnostics)
- on macOS and Windows, out-of-policy app, window, and session-scope requests can trigger a local user approval dialog that persists a target-only allowlist overlay (expires after `overlay_max_age_seconds`)
- `desktop-mcp` refuses to start if it cannot find the expected `desktop-host` binary

See SECURITY.md and docs/security-model.md before enabling desktop control features.

## Installation

The npm package builds native binaries during `postinstall`, so the target machine needs:

- Node.js 20+
- Rust and Cargo
- On Windows: the MSVC toolchain (Visual Studio Build Tools with C++ / VCTools)

Install globally:```bash
npm install -g lazy-desktop-mcp

Or run without a global install:```bash
npx -y lazy-desktop-mcp


The published package was smoke-tested from the npm registry with `npx -y lazy-desktop-mcp` on macOS, including a real MCP `initialize` handshake. Windows host builds are verified with `cargo test` and local MCP tool smoke tests (see docs/windows.md).

If you want to skip the install-time build for CI or packaging experiments:```bash
LAZY_DESKTOP_SKIP_POSTINSTALL=1 npm install
npm run build:native

Host Policy

The host reads a JSON policy file from LAZY_DESKTOP_POLICY_PATH or its local application data directory. Start from the shipped example:```bash
cp config/policy.example.json /path/to/policy.json
export LAZY_DESKTOP_POLICY_PATH=/path/to/policy.json


Example policy:```json
{
  "allowed_standalone_capabilities": ["app_list", "observe_capture", "ocr_read"],
  "allowed_session_capabilities": ["app_launch"],
  "allowed_apps": ["TextEdit"],
  "allowed_windows": [],
  "allowed_screens": ["primary"],
  "allow_raw_input": false,
  "max_actions_per_minute": 30,
  "capture_scope": "primary",
  "capture_max_long_edge": 1280,
  "capture_format": "jpeg",
  "capture_retain_seconds": 300,
  "ocr_max_chars": 500,
  "ocr_allow_full": false,
  "lists_max_items": 30,
  "overlay_max_age_seconds": 86400
}

For repeatable local development, this repository also ships:

  • config/client-config.json: canonical development config source for client wiring
  • config/policy.dev.json: generated development policy for interactive desktop workflows

Use the sync script to regenerate policy.dev.json and upsert the matching client entries:```bash
npm run sync:clients


Preview the rendered policy and client config without writing files:```bash
npm run sync:clients:dry

The sync flow defaults to both Codex and OpenCode. Override the target set with LAZY_DESKTOP_CLIENTS=codex, LAZY_DESKTOP_CLIENTS=opencode, or explicit config paths via CODEX_CONFIG_PATH and OPENCODE_CONFIG_PATH.

Runtime Approval Overlay

When the host policy enables a capability class but the requested app, window, or screen target is outside the configured allowlist, the macOS system backend can ask the logged-in user for approval.

  • the dialog is local to the target machine and uses the native macOS dialog UI
  • Allow persists only the requested target into a local policy-overlay.json
  • overlay grants expire after overlay_max_age_seconds (default 24 hours)
  • Deny, closing the dialog, or timeout keeps the request blocked
  • runtime approval never enables a new capability class and never enables raw coordinate input

The overlay file is stored under the host application data directory and merged with the base policy at startup. Delete that overlay file if you need to clear previously approved targets.

Client Setup

The published package can still be registered manually with Codex:```bash
codex mcp add lazy-desktop \
-- npx --prefix ~/.codex/mcp-cache/lazy-desktop-mcp -y lazy-desktop-mcp


The isolated `--prefix` keeps npm's execution context stable even when Codex is launched from a repository that has the same package name as the published MCP package.

If you need an explicit config entry:```toml
[mcp_servers.lazy-desktop]
command = "npx"
args = ["--prefix", "/absolute/path/to/.codex/mcp-cache/lazy-desktop-mcp", "-y", "lazy-desktop-mcp"]

[mcp_servers.lazy-desktop.env]
LAZY_DESKTOP_POLICY_PATH = "/absolute/path/to/policy.json"

If you prefer a fully deterministic local install, npm install -g lazy-desktop-mcp and pointing Codex at the global lazy-desktop-mcp binary also works.

For local repository development, prefer npm run sync:clients; it wires both Codex and OpenCode to the checked-out target/release binaries and the repo-managed development policy.

Desktop App Development

lazy-desktop-mcp is meant to sit above framework-specific desktop stacks.

  • Tauri: use it for launch, window targeting, input orchestration, screenshot capture, OCR, and local operator approval loops around a real packaged or dev-run desktop shell
  • PyQt: use it for native widget smoke tests, focused regression checks, and screenshot-driven debugging when browser tooling is not available
  • keep framework-native tests for deterministic unit/component coverage; use the MCP for end-to-end operator flows and local exploratory validation

The standard local development workflow is:

  1. Build the native binaries with npm run build:native
  2. Sync the repo-managed client config with npm run sync:clients
  3. Grant OS permissions when needed (macOS: Accessibility / Automation / Screen Recording; Windows: see docs/windows.md)
  4. Start the target Tauri or PyQt app
  5. Verify live availability with desktop.capabilities, desktop.permissions, and desktop.runtime
  6. Open a scoped session, then run app/window/input/capture/OCR or vision steps as needed

For interactive flows, prefer the higher-level tools first (low token cost):

  • app_activate when you want to bring an app to the front without depending on an exact window title
  • selector-based window_focus using window_id, exact title, partial title_contains, or app
  • input_click_target for OCR-matched text or window-relative clicks before falling back to raw coordinates
  • window_list / app_list with a query instead of dumping the full desktop
  • observe_capture only when selectors fail; it returns an artifact id, not pixels. If it reports unchanged, skip OCR/vision. Do not loop full-screen capture plus vision_describe.

See docs/desktop-app-development.md for a more detailed workflow and troubleshooting notes.

Runtime Availability

The development policy enables app launch, window control, screenshot capture, OCR, and interactive input by default. Vision remains optional and only becomes available when a local vision command is configured. Actual runtime availability still depends on:

  • the current backend implementation on the active platform (docs/windows.md for the Windows matrix)
  • local OS permissions such as Accessibility, Automation, and Screen Recording (macOS) or interactive-desktop / elevation constraints (Windows)
  • optional dependencies such as tesseract
  • optional vision command wiring

Use desktop.capabilities, desktop.permissions, and desktop.runtime as the source of truth for the current machine instead of assuming a static capability matrix.

If a capability shows Disabled by the host security policy, inspect desktop.runtime first. The default MCP response is compact (policy basename and counts). Pass detail=full (or verbose=true) to see full paths and policy snapshots. A common local-development mistake is wiring the client to config/policy.example.json instead of the repo-managed config/policy.dev.json; rerun npm run sync:clients and restart the client after rebuilding when that happens.

Local Development

Build native binaries:```bash
npm run build:native
npm run sync:clients


Run the full verification stack:```bash
npm run security
npm run verify
npm run pack:dry

Prepare an npm release without publishing yet:bash npm run release:prep npm run release:notes npm run release:check

The verification flow runs:

  • JavaScript wrapper tests
  • cargo fmt --check
  • cargo clippy -D warnings
  • cargo test
  • cargo audit
  • npm pack --dry-run

Publishing

Before npm publish, make sure:

  • the version in package.json matches the Rust workspace version in Cargo.toml
  • the canonical client config in config/client-config.json still produces the intended development policy
  • the policy example still matches the shipped host behavior
  • the README and security docs reflect the actual supported capabilities
  • npm run release:prep passes with a clean worktree and a version that is newer than the latest git tag
  • npm run release:notes produces the release note draft you intend to ship

See docs/publishing.md for the release checklist.

Related

  • lazy-media-mcp — image/video prep for AI vision
  • lazy_mobile_mcp — Android/iOS mobile automation MCP
  • session-collab-mcp — multi-session collaboration MCP

License

MIT © leaf76

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
lazy-desktop-mcp 怎么安装?

在客户端按下面的安装命令接入:# One-time: build + install the UI next to host data dir npm run install:presence-ui # Then start MCP as usual (Codex / npx lazy-desktop-mcp) # Host logs on control: "Launched Presence UI: …" # Host logs after last session.close: "Quit Presence UI (…)"。对应的包名是 lazy-desktop-mcp。装完在客户端配置里引用同一个包或端点。

lazy-desktop-mcp 怎么在 Claude、Cursor、Codex 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

lazy-desktop-mcp 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

lazy-desktop-mcp 需要 API Key 吗?

资料标注需要会话登录认证,使用前准备好对应凭据,并按最小权限配置。

lazy-desktop-mcp 支持哪些客户端?

资料标注支持 Claude、Cursor、Codex;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

lazy-desktop-mcp 能提供哪些能力?

资料显示能力标签包括 Local Deployment、MCP server、Desktop automation、Rust、Computer control、macOS support。具体工具清单以官方文档为准。

lazy-desktop-mcp 需要什么运行环境?

运行时为 rust;属于本地进程,需要在本机装好运行环境。

lazy-desktop-mcp 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-08-22。