Skip to content

Commit 7d59498

Browse files
Josh Mabryclaude
andcommitted
docs: the daemon manages itself — verified the real MCP path (v0.1.2)
Drove `build_mcp_tools(config, plugin_servers=[factory])` against the installed driver, i.e. protoAgent's actual MCP code path rather than a unit test: - 17 tools bind as `cua-driver__*` - the `tools: {include: [...]}` allowlist holds exactly — no leakage from the other 21 - entry reports `tier: "managed"` - it activates MCP with `mcp_enabled = False`, confirming a plugin's server needs no `mcp.enabled: true` That run also disproved this README's own step 4, added an hour ago. I claimed the operator should run `cua-driver serve` or else the TCC grant would follow the protoAgent process and split dev-vs-packaged. Wrong: `cua-driver mcp` detects it lacks grants under whatever spawned it, auto-launches the CuaDriver daemon via LaunchServices, and proxies through it — so one `permissions grant` attaches to com.trycua.driver and holds no matter who spawns the server. `--no-daemon-relaunch` opts out and IS the failure mode I described, which is why the docs now say not to pass it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U69poCC3qyCbTnaJmRzBvi
1 parent 0384995 commit 7d59498

3 files changed

Lines changed: 19 additions & 9 deletions

File tree

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,20 @@ configured tool names real for *this* driver build). A healthy result reads like
8282
/Users/you/.local/bin/cua-driver · 17 tool(s) bound of 38 published
8383
```
8484

85-
**4. Consider running the daemon.** `cua-driver serve` (macOS:
86-
`open -n -g -a CuaDriver --args serve`) keeps a background process that owns the
87-
OS handles under `com.trycua.driver`. With it running, one grant to the driver
88-
covers every caller. Without it, `cua-driver mcp` bootstraps its own runloop
89-
inside whatever spawned it — which means the **protoAgent process's** identity is
90-
the one macOS checks, and that differs between `scripts/dev.sh` and the packaged
91-
desktop app.
85+
**There is no step 4 — you don't manage a daemon.** When protoAgent spawns
86+
`cua-driver mcp`, the driver notices it lacks grants under whatever launched it
87+
and **auto-launches the CuaDriver daemon**, then proxies through it:
88+
89+
```
90+
cua-driver-rs: mcp launched without CuaDriver.app's TCC grants; auto-launching
91+
the daemon via `open -n -g -a CuaDriver --args serve` and proxying MCP requests
92+
through it. Pass --no-daemon-relaunch to stay in-process.
93+
```
94+
95+
That's why one `permissions grant` is enough: the grant lives on
96+
`com.trycua.driver` and holds no matter who spawns the server — your shell,
97+
`scripts/dev.sh`, or the packaged desktop app. Don't pass `--no-daemon-relaunch`;
98+
it stays in-process and puts the grant burden back on protoAgent's own identity.
9299

93100
---
94101

@@ -153,6 +160,9 @@ itself; you don't need `mcp.enabled: true`.
153160
- **A managed MCP server** (`register_mcp_server`) spawning `cua-driver mcp` over
154161
stdio. Tools arrive namespaced `cua-driver__*`. The factory returns `None`
155162
the documented "don't start" path — when disabled or when the binary is absent.
163+
Verified end-to-end against driver 0.8.3: 17 tools bind, the allowlist holds
164+
exactly (no leakage from the other 21), and it activates MCP on its own —
165+
`mcp.enabled: true` is not required.
156166
- **A skill** (`register_skill_dir`) teaching the snapshot-before-**and**-after
157167
invariant. This is not documentation garnish: the driver is
158168
accessibility-tree-first, `element_index` values are minted per snapshot and go

protoagent.plugin.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id: cua
22
name: Computer use (cua-driver)
3-
version: 0.1.1
3+
version: 0.1.2
44
description: >-
55
Let the agent drive native GUI apps on THIS machine — snapshot a window's
66
accessibility tree, then click/type/scroll by element, without bringing the app

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "cua-plugin"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
description = "protoAgent plugin: computer use — drive native GUI apps via the third-party cua-driver binary, wrapped as a managed MCP server."
55
requires-python = ">=3.11"
66

0 commit comments

Comments
 (0)