Deskwright

Computer use for AI agents on GNOME Wayland.
Let your coding agent use your Linux desktop. Or give it one of its own, so it
stops stealing your mouse.
Install  •Â
What it can do  •Â
A desktop of its own  •Â
When something's off  •Â
Security
Claude Code can edit your files and run your commands. It can't open GIMP,
click a button in a settings dialog, or read what a native app is showing you.
On macOS and Windows it can, through computer use. On Linux that's still on
Anthropic's list.
This fills the gap on GNOME. It's an MCP server plus a small shell extension,
and it hands an agent the actual desktop: launching apps, reading widgets,
clicking, typing, dragging, window management, OCR and screen recording. Any
MCP client can drive it. Claude Code, Codex, Cursor, your own script.
The part people tend to like most: DESKWRIGHT_SESSION=headless runs all of
it on a virtual monitor that isn't on any of your screens. Your agent gets a real GNOME
desktop to work on, and it never takes your focus.
Linux hybrid beta: 0.2.0b1
The beta adds guarded native controls, exact multi-control queries, adaptive
visual fallback and shorter verified execution batches. It supports GNOME
Wayland; Windows is not implemented. See the interaction guide
and measurements and limits.
For a new installation:
pipx install --system-site-packages 'deskwright==0.2.0b1'
deskwright-setup
For an existing pipx installation, pipx upgrade --pip-args='--pre' deskwright
keeps its existing system-site-packages setting. Run deskwright-setup to copy
the updated extension, then log out and back in if setup reports a changed
extension. Restart the MCP connection to load the updated Python tools.
A connection restart alone cannot reload GNOME Shell's extension.
Why this exists
Wayland deliberately stops an application from seeing or touching any other
window. That's a good rule, and it's why xdotool, wmctrl and grim either
do nothing on GNOME or fail in ways that look like your own mistake. Every
Linux computer-use project I found either shipped a Docker container running
X11, or quietly assumed X11 and broke.
So I went looking for what GNOME actually permits, and it turns out to be quite
a lot, just not where anyone looks. Mutter answers D-Bus. AT-SPI, the
accessibility layer built for screen readers, exposes every real widget in
every running app with its name, its role and the action it performs. And a
shell extension runs inside gnome-shell itself, where the rest lives.
That middle one matters more than it sounds. Pressing a widget's own
accessibility action isn't a nicer way to click. It's a different thing: it
can't miss, it survives the window moving, and it needs no pointer at all. An
agent working this way stops guessing at coordinates, and stops taking a
screenshot after every action to find out what happened.
Install
You need GNOME Shell on Wayland. Check with echo $XDG_CURRENT_DESKTOP $XDG_SESSION_TYPE, which should mention GNOME and wayland.
The lazy way: hand it to your agent
Open Claude Code, or Codex, or whatever you use, and say:
Set up https://github.com/tristanmuzzu/deskwright on this machine,
follow the AGENTS.md.
AGENTS.md is a runbook written for agents. Every command, how to
check each one worked, the right package names for Debian, Fedora and Arch, and
the handful of things that go wrong with their fixes. Your agent will ask you
for a sudo password once and tell you to log out once. That's your whole
involvement.
By hand: two commands and a logout
pipx install --system-site-packages deskwright
deskwright-setup
deskwright-setup narrates every step. It turns on the accessibility flag, installs
the bundled shell extension, and tells you about any missing system package
with the right install line for your distro, so you're never guessing at
package names. It never runs sudo itself.
Then log out and log back in. Once. There's no way around this one: on
Wayland, gnome-shell only picks up an extension at session start.
Last step, point your client at it:
claude mcp add deskwright --scope user -- deskwright
That's it. Ask your agent to open an app and it will.
Why --system-site-packages, and what breaks without it
PyGObject publishes no wheels to PyPI. It's a distro package everywhere
(python3-gi, python3-gobject, python-gobject), so an isolated venv can't
import it. Leave the flag off and you get a server that starts cleanly and then
dies on the first click with input_backend_failed.
uvx has no equivalent flag, which is the only reason this says pipx. If you'd
rather skip pipx, a plain python3 -m venv --system-site-packages followed by
pip install deskwright works identically.
As a Claude Code plugin instead
The repo is also a plugin marketplace. It registers the server plus a skill
that teaches an agent which tool to reach for first.
claude plugin marketplace add tristanmuzzu/deskwright
claude plugin install deskwright@deskwright
The plugin runs the server from its own checkout, so there's no pip install.
You still need the system packages and the extension, so run the setup out of
the checkout Claude Code cloned for you, once:
~/.claude/plugins/marketplaces/deskwright/bin/deskwright-setup
Then log out and back in, same as above.
From a clone, if you want to hack on it
git clone https://github.com/tristanmuzzu/deskwright
cd deskwright
bin/deskwright-setup
./mcp_server.py --self-test
./mcp_server.py is the same entry point as the deskwright
command, by the path older registrations already point at.
CONTRIBUTING.md has the layout and which test suites need
a real session.
Check it works
DESKWRIGHT_SESSION=headless deskwright --self-test
You want 18/18 passed. It runs on a virtual monitor rather than your screen,
so it's safe to run while you're working. The first run takes about 20 seconds
because it has to start a second gnome-shell.
Drop DESKWRIGHT_SESSION=headless and it tests your real desktop instead. Do that one
while you're looking at the screen: the self-test injects real input, because
it's checking the guards that refuse dangerous key combinations.
When something's wrong, ask your agent to call desktop_health. It answers in
one line whether this desktop is usable, then says which mechanisms work right
now and what each of them will actually do.
What it can do
41 tools. Each returns enough that you do not need a second call to work
out what happened. The order below is the order an agent should reach for them.
Use native controls and exact queries where useful, with screenshots and
ordinary input for visual work or incomplete accessibility.