Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

feat(cua-driver): mcp-config --client pi now points at the CLI path

Francesco Bonacci30c9794aac9a
diff --git a/docs/content/docs/cua-driver/guide/getting-started/installation.mdx b/docs/content/docs/cua-driver/guide/getting-started/installation.mdx
index bf460f0e74..c602796fa2 100644
--- a/docs/content/docs/cua-driver/guide/getting-started/installation.mdx
+++ b/docs/content/docs/cua-driver/guide/getting-started/installation.mdx
@@ -139,7 +139,7 @@ cua-driver mcp-config | pbcopy
```
<Callout type="info">
-**Pi (badlogic/pi-mono)** does not support MCP natively. Community workarounds exist (`0xKobold/pi-mcp`, `nicobailon/pi-mcp-adapter`) but are unsupported by us.
+**Pi (badlogic/pi-mono)** does not support MCP natively. Use cua-driver as a plain CLI from inside Pi instead — `cua-driver list_apps`, `cua-driver click '{...}'`, etc. — which is exactly the shape Pi is built around. Run `cua-driver mcp-config --client pi` for the full guidance, or see the [Quickstart](/cua-driver/guide/getting-started/quickstart) for CLI usage.
</Callout>
The client spawns `cua-driver mcp` on demand once registered.
diff --git a/docs/content/docs/cua-driver/reference/cli-reference.mdx b/docs/content/docs/cua-driver/reference/cli-reference.mdx
index 28e173afe3..2b90cd09b7 100644
--- a/docs/content/docs/cua-driver/reference/cli-reference.mdx
+++ b/docs/content/docs/cua-driver/reference/cli-reference.mdx
@@ -174,7 +174,7 @@ cua-driver mcp-config
| `cursor` | JSON for `~/.cursor/mcp.json` (no CLI) |
| `opencode` | JSON snippet for `opencode.json` (`type: "local"`) |
| `hermes` | YAML for `~/.hermes/config.yaml`, then `/reload-mcp` inside Hermes |
-| `pi` | Errors — Pi does not support MCP natively |
+| `pi` | Points at the CLI path (Pi has no MCP — shell-out to `cua-driver` directly) |
Pipe to `pbcopy` to put any output on the clipboard, or pass the printed `claude` / `codex` / `openclaw` commands straight to a shell.
diff --git a/libs/cua-driver/Sources/CuaDriverCLI/CuaDriverCommand.swift b/libs/cua-driver/Sources/CuaDriverCLI/CuaDriverCommand.swift
index 726b30faa6..43268dfff2 100644
--- a/libs/cua-driver/Sources/CuaDriverCLI/CuaDriverCommand.swift
+++ b/libs/cua-driver/Sources/CuaDriverCLI/CuaDriverCommand.swift
@@ -88,12 +88,26 @@ struct MCPConfigCommand: ParsableCommand {
"""
print(snippet)
case "pi":
- FileHandle.standardError.write(Data(
- ("Pi (badlogic/pi-mono) does not support MCP natively — author has stated MCP support will not be added "
- + "for context-budget reasons.\n"
- + "Community workarounds: 0xKobold/pi-mcp, nicobailon/pi-mcp-adapter (npm).\n").utf8
- ))
- throw ExitCode(2)
+ // Pi (badlogic/pi-mono) intentionally rejects MCP. Skip MCP and
+ // point at the shell-tool path — Pi can shell-out to cua-driver
+ // directly the same way it would call any other CLI tool.
+ print("""
+ Pi (badlogic/pi-mono) does not support MCP natively — the author
+ has stated MCP support will not be added for context-budget reasons.
+
+ Use cua-driver as a plain CLI from inside Pi instead:
+
+ \(binary) list_apps
+ \(binary) click '{"pid": 1234, "x": 100, "y": 200}'
+ \(binary) --help # full tool catalog
+
+ Each call is one-shot and returns JSON / text on stdout, which is
+ exactly the shape Pi is designed around.
+
+ Community MCP shims also exist if you really need MCP semantics
+ (0xKobold/pi-mcp, nicobailon/pi-mcp-adapter) — these are not
+ supported by us.
+ """)
default:
FileHandle.standardError.write(Data(
("Unknown client '\(client!)'. Valid: claude, codex, cursor, openclaw, opencode, hermes, pi.\n").utf8