cua-host-bridge
Authenticated MCP streamable-HTTP host bridge: expose this machine's desktop to a
remote Hermes agent running the remote computer-use provider.
The agent side dials out; the host side (this package) owns cua-driver, its display, and
its permissions. A headless gateway with no display and no cua-driver still gets the
computer_use tool — the machine that matters is this one.
Quick start
# 1. Install (host machine)
pip install cua-host-bridge # or: uvx cua-host-bridge
# 2. cua-driver (once)
curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/cua-driver/scripts/install.sh | bash
# 3. Token (>= 32 bytes)
export HERMES_CUA_REMOTE_TOKEN=$(python3 -c "import secrets; print(secrets.token_hex(32))")
# 4. Run — Host allowlist must include the port: the Host header carries it
cua-host-bridge --port 8765 --allowed-hosts myhost:8765 --allowed-origins http://myhost:8765
On a headless Linux host the bridge auto-starts Xvfb on a free display and openbox.
Security model
- Bearer auth, constant-time compare; token never reaches child process env
- Host/Origin allowlists, no wildcards, exact match — include the port
- Non-loopback plaintext HTTP bind refused without explicit
HERMES_CUA_BRIDGE_ALLOW_PLAINTEXT - DNS-rebinding 421s before auth 401s;
Cache-Control: no-store - Standard permission mode only; no approval bypass
- Long-lived MCP streams: 30s connect/read=None, session idle timeout 1800s
The Hermes side
computer_use:
provider: remote
remote:
enabled: true
url: https://myhost:8765/mcp
with HERMES_CUA_REMOTE_TOKEN (>= 32 bytes) in the agent's .env.
Origin
Extracted from NousResearch/hermes-agent
(MIT, (c) 2025 Nous Research and contributors) — the files are mirrors of the in-tree
tools/computer_use/host_bridge*.py; the only drift is the import seam. The client side
lives in Hermes as the remote provider (PR #103653).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cua_host_bridge-0.1.0.tar.gz.
File metadata
- Download URL: cua_host_bridge-0.1.0.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfad9c174b23d5d4f6fafeceeee4fb68f89f5c159c73ae50df9a1fd44cc49114
|
|
| MD5 |
b3025604bc3890171f1cc448a27d81d1
|
|
| BLAKE2b-256 |
137218343af19f44a324d7ead92e934560e79181f96a5afeedc0b6e48970d90b
|
File details
Details for the file cua_host_bridge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cua_host_bridge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f716925a6cea9cb7b7b04e85902620888ffa74fdddb661a190198d7f32752b2d
|
|
| MD5 |
b46eed2cbbcb98a6cee4c13f016c9d49
|
|
| BLAKE2b-256 |
5a2f2521abe2a9959c2676677906246191f05bf727dc4e9d823f071a28c0c1ed
|