# pcbridge [![ci](https://github.com/Eymistaken/Pcbridge/actions/workflows/ci.yml/badge.svg)](https://github.com/Eymistaken/Pcbridge/actions/workflows/ci.yml) [![native](https://github.com/Eymistaken/Pcbridge/actions/workflows/native.yml/badge.svg)](https://github.com/Eymistaken/Pcbridge/actions/workflows/native.yml) [![package](https://github.com/Eymistaken/Pcbridge/actions/workflows/package.yml/badge.svg)](https://github.com/Eymistaken/Pcbridge/actions/workflows/package.yml) **Turn a Linux or Windows desktop into an MCP server, and let an agent actually use it.** pcbridge exposes one machine over the [Model Context Protocol](https://modelcontextprotocol.io). A connected agent can hand work to terminal coding agents, drive a live tmux session, run commands, read and write files, and, when explicitly permitted, operate a GNOME, KDE Plasma, Hyprland, Cinnamon, Xfce or Windows 11 desktop with a virtual keyboard, pointer and screen reader. > **Read [docs/security.md](docs/security.md) before installing.** pcbridge > is remote code execution on your own desktop, by design. ## What it does | | | |---|---| | **Delegate to coding agents** | Hand a task to Claude Code, Antigravity CLI or any CLI you configure; get a job id back at once. Jobs survive a daemon restart. | | **Drive a live terminal** | Open a tmux session, type into it, read it back, answer an agent's prompts. | | **Shell and files** | Commands in the foreground or background; read, write, search. | | **Read the screen** | The accessibility tree as text, silent screenshots, or OCR as plain text. GNOME capture uses screen sharing without a flash or sound. | | **Use the desktop** | Virtual keyboard and pointer through uinput, absolute and relative motion, and compositor-specific window activation. GNOME's extension raises windows in ~5 ms. | | **Click what you see** | Every screenshot has an id; send the pixel you see plus the id, and pcbridge applies the monitor offset and scale. Changed or missing outputs make old shots invalid. | | **Run it from a terminal** | `pcbridge` opens a terminal UI: the desktop grant, health with fixes, jobs, a switch per MCP client, the tunnel and remote apps, the 40 tools, the audit log, the journal and every setting; mouse and keyboard, `Ctrl+P` for any command. Every part of it is also a plain command. | | **Stay safe enough to leave on** | `pcbridge setup` turns desktop control on, and `pcbridge` turns it off; a time-limited grant closes 90 s after the last action; nothing is sent behind a locked screen. GNOME shows a frame and panel icon, Plasma a lasting notification, and Hyprland a native frame. Each has a kill switch. | ## Always ready One resident daemon serves every client. Local clients (Claude Code, Codex, Claude Desktop, Antigravity CLI, Hermes Agent, OpenCode, Pi, oh-my-pi) run `pcbridge stdio`, a tiny relay to the daemon's user-only Unix socket; systemd starts the daemon on the first connection. Remote clients use HTTPS through Tailscale Funnel with OAuth 2.1. ``` Claude Code / Codex / Claude Desktop ── pcbridge stdio ──► mcp.sock ──┐ phone / web ── HTTPS ── Tailscale Funnel ── 127.0.0.1:8765 ───────────┼─► pcbridge daemon │ jobs in their own scopes GNOME extension, KWin, or Hyprland, native helper ┘ desktop: uinput, capture, AT-SPI ``` Measured on the reference machine (Zorin OS 18.1, GNOME 46, Wayland): | | 1.x | 2.0 | |---|---|---| | New client to `tools/list` | 693 ms (a server per client) | 22-47 ms (daemon running), 693 ms (daemon started by the socket) | | Relay overhead per call | - | ~0.1 ms | | Memory | 92 MB per client | 14 MB relay + one 117 MB daemon | | Screenshot, two monitors | 771 ms | 761 ms | | `ui_dump` / `window_focus` | 32.7 / 29.7 ms | 26.7 / 25.5 ms | | Daemon killed mid-call | - | retryable error in 10 ms, next call ok in 2 s | More numbers, and why things are the way they are: [docs/dev/measured-facts.md](docs/dev/measured-facts.md). ## Supported platforms | | Status | |---|---| | Ubuntu 24.04, Zorin OS 18 (GNOME 46, Wayland) | tested daily | | Arch Linux, KDE Plasma 6 (Wayland) | tested end to end in a VM; the package builds, installs and passes the suites in CI | | Arch Linux, Hyprland 0.56.2 (Wayland) | native desktop control and capture tested in a two-output VM, including a 17-case acceptance cohort; physical hardware is untested | | Arch Linux, GNOME 50 (Wayland) | the extension and screen capture tested in a headless shell | | Debian 13, Ubuntu 26.04 | the `.deb` builds, installs and passes the suites in CI | | GNOME 47-49 on Wayland | expected to work, untested; `system_capabilities` reports it | | Debian 13 and Debian 12 (standing in for Pardus 23), Cinnamon and Xfce on X11 | the desktop checks (capture, input, window focus, lock, idle, grant frame, kill switch) pass through MCP in VMs; X11 is a weaker security model, see [security](docs/security.md) | | Linux Mint 21.3, Cinnamon 6.0 on X11 (glibc 2.35) | the same checks pass in the live session | | GNOME or Plasma on X11, Plasma 5, other desktops | desktop tools refuse and say why; everything else works | | Windows 11 (x64) | all 40 tools, setup and the install script tested through MCP in a Windows 11 VM (one monitor at 96 DPI); the first release that carries the Windows wheel is still to be published. A window that runs as administrator refuses input (Windows' UIPI), and pcbridge says so ([Windows scope](docs/dev/windows-scope.md)) | | ARM (aarch64) | from a git checkout only; no desktop control, since the native helper is built for x86_64 alone | | Python | 3.12, 3.13, 3.14 | ## Install ```bash # recommended, no root (2.6.0 and later): curl -fsSL https://github.com/Eymistaken/Pcbridge/releases/latest/download/install.sh | sh # or the package for your release: sudo apt install ./pcbridge___amd64.deb && pcbridge setup # or on Arch, from a checkout: (cd packaging/arch && makepkg -si) && pcbridge setup # or from git: git clone https://github.com/Eymistaken/Pcbridge.git && cd Pcbridge && ./install.sh ``` On Windows 11, in PowerShell (no administrator rights; from the first release that carries the Windows wheel): ```powershell irm https://github.com/Eymistaken/Pcbridge/releases/latest/download/install.ps1 | iex ``` The script checks the wheel's sha256, offers a pcbridge-only Python when the system's is older than 3.12 (an arrow-key menu on a terminal), and hands over to `pcbridge setup`. To read the script before running it, see [docs/install.md](docs/install.md). On a terminal, `pcbridge setup` is a screen of its own. A bridge across the top grows a plank per step, from "this pc" to the agents, and every choice is taken with the arrow keys, space and Enter, or the mouse: ![The setup screen's welcome: what setup found on this computer](docs/images/setup-welcome.png) It detects the distribution, desktop and session and offers packages only for what will work here, with OCR ticked as Recommended. It ticks Claude Code, Codex, Claude Desktop and any client already connected, and shows everything it will do, with the exact sudo command, before Install. Then each step is a row with its progress and the last thing it did: the config, the socket and service, the GNOME extension (on Plasma: the native helper's permission for KWin screenshots), the clients, and a check that a fresh client gets every tool. The sudo password goes to `sudo` itself, never to pcbridge. ![The install step: one row per step, each with its time and result](docs/images/setup-install.png) Where typing `pcbridge` would find nothing (Arch, for example), setup offers to put `~/.local/bin` on `PATH`, backed up and undoable. The last screen names the clients it connected and says what to do next: ![The last screen: the connected clients and the next steps](docs/images/setup-ready.png) `--yes`, `--plain` and a run without a terminal print the steps instead. Everything setup changes is backed up with a `ROLLBACK.md`. Details: [docs/install.md](docs/install.md). ## Quick start ```bash pcbridge # the terminal UI: grant, health, jobs, clients, remote, tools, settings pcbridge list # every command, for work without the UI pcbridge clients # which agents and apps can use pcbridge; connect / disconnect NAME pcbridge status # daemon, grant, jobs, remote tunnel pcbridge doctor # every check, with the fix next to each problem ``` Then, in any connected client, ask for work: "run the tests in ~/src/app with Claude Code", "what is on my screen", "open Text Editor and type hello". Setup turns desktop control on (`[desktop] enabled = true`); the agent then opens a time-limited grant by itself with `desktop_unlock`. To turn desktop control off, type `pcbridge` and use the Desktop tab. Kill switch: `pcbridge lock` (alias `bridgekilit`), "Lock now" in the terminal UI, the panel icon's "Lock desktop control now" on GNOME, or the grant notification's "Lock now" on Plasma. ## The terminal UI `pcbridge` alone in a terminal opens it: nine tabs, `1` to `9`, with its own palette over the terminal's background, mouse and keyboard. ![The terminal UI's Overview: the live logo, the service, health with fixes, jobs and activity](docs/images/tui-overview.png) - **The bar at the top** shows the daemon, the tunnel and the desktop grant on every tab. Its button unlocks (with a duration menu) or locks; `l` locks at once and asks before it unlocks. - **Overview** opens on a live logo that breathes softly while agents work and turns red after a refused call; when a newer release is out it becomes a green arrow that upgrades pcbridge on a click (`pcbridge upgrade` does the same in a script). Then the service, `pcbridge doctor`'s health with a fix per check, the running jobs and the latest activity. - **Desktop**, **Agents & Jobs**, **Connections**, **Remote** and **Tools** hold the everyday switches and lists: the grant and desktop control, the jobs with their output and Cancel, a switch per MCP client that shows what it would write first, the tunnel and the remote apps, the 40 tools and the profile. - **Activity** reads the audit log (what agents did, never the contents), **Logs** follows the daemon's journal, and **Advanced** edits every setting with the right control for its type; Save checks the file with the daemon's own loader and backs up the old one. - **`Ctrl+P`** finds any command: read-only ones run at once, the ones that change state ask first. - **Without the UI**: `pcbridge settings`, `get`, `set`, `reset`, `tools`, `clients`, `connect`, `disconnect`, `restart`; `pcbridge list` shows them all. Piped or scripted, `pcbridge` alone prints the help, so nothing that calls it changes. ## Documentation | | | |---|---| | [docs/install.md](docs/install.md) | Install, upgrade, remote access | | [docs/usage.md](docs/usage.md) | The 40 tools, which need the grant, how to drive the screen; the terminal UI and every command | | [docs/configuration.md](docs/configuration.md) | The config file and `pcbridge set`; the reference is [config.example.toml](config.example.toml) | | [docs/security.md](docs/security.md) | What protects the machine, and what does not | | [docs/troubleshooting.md](docs/troubleshooting.md) | Symptoms and fixes | | [docs/architecture.md](docs/architecture.md) | Daemon, relay, layers, the native helper | | [docs/dev/contributing.md](docs/dev/contributing.md) | Tests, live-test flags, adding tools and agents | | [docs/dev/measured-facts.md](docs/dev/measured-facts.md) | What was measured, with the numbers | | [docs/dev/desktop-rules.md](docs/dev/desktop-rules.md) | How the desktop tools must behave | | [docs/native/](docs/native/) | The Rust helper: protocol, capture, packaging | | [gnome-extension/README.md](gnome-extension/README.md) | The GNOME Shell extension | | [CHANGELOG.md](CHANGELOG.md), [ROADMAP.md](ROADMAP.md) | What changed, what is open | ## License See [LICENSE](LICENSE).