
Deskwright
io.github.tristanmuzzu由 GitHub 帳號 tristanmuzzu 發布v0.1.1更新於 Oct 24, 2026
Agents use real GNOME/Wayland apps: on your screen, or an invisible second desktop you never see
概覽
Deskwright 讓 AI 助理在 Linux 上操作真實的 GNOME Wayland 桌面應用程式:啟動視窗、讀取元件、點擊、輸入、OCR 與螢幕錄影。
- 可以做什麼
- 尋找並檢視應用程式與元件,透過無障礙操作叫用或讀取元件,並具備受保護、可驗證的步驟與狀態等待。
- 適用情境
- 當 GNOME Wayland Linux 機器上的代理需要操作沒有 API 的原生應用程式(例如設定對話框、編輯器或影像工具)時使用,可在你的螢幕上或獨立的不可見桌面上執行。
- 執行需求
- 本機 Linux 機器,需 GNOME Shell on Wayland(已在 GNOME Shell 50 驗證;48-49 未測試;其他合成器僅支援輸入;不支援 X11)。以 pipx 加上 --system-site-packages 安裝 PyPI 套件,執行 deskwright-setup,登出後重新登入,並安裝 python3-gi、gir1.2-atspi-2.0、python3-pil、libglib2.0-bin、wl-clipboard、tesseract-ocr 等系統套件。用戶端須執行在實體主機上,不能在虛擬機內。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Deskwright,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Deskwright
[CI] [PyPI] [License] [GNOME Shell] [Wayland]
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:
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
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:
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.
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:
Then log out and back in, same as above.
From a clone, if you want to hack on it
./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
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.
A second desktop it uses while you work
An agent that needs your screen is only half useful. deskwright-headless starts a
separate GNOME session on a virtual monitor, with its own session bus, its own
gnome-shell --headless and its own runtime directory. A server pinned to it
drives that desktop with the same 41 tools while you keep the physical one.
Register it as a second MCP server and you can hand it long jobs:
Sessions are named, so two agents can each have a desktop of their own and never watch each other's windows move:
Give a session its own home and it boots a GNOME that has never been used: no desktop icons, no session restore, no recent files. That is what you want for a recorded demo or a clean-room test, where the default behaviour of sharing your home means an editor opens your last document.
There are guards on this, because each session is a real compositor at around
205 MB: a per-name start lock so two agents can't both spawn one, a session cap
(DESKWRIGHT_HEADLESS_MAX, default 4), and a free-memory floor that refuses a start
which would push the machine into swap. The agent that would cause that can't
see it coming, so the server does.
When something's off
The extension says INACTIVE, or window tools don't work. You haven't logged out yet. gnome-shell can't load an extension without a session restart and there's no workaround. Until then you still get AT-SPI, pointer, keyboard and clipboard. You don't get window management, extension screenshots, pointer position or the halt switch.
An app shows no widgets in ui_tree. It was already running when
toolkit-accessibility got turned on. Apps read that setting at startup, so
restart the app.
Chrome, Electron or Qt apps look empty. As far as AT-SPI is concerned, they
are. Use find_text instead, which OCRs the screen and hands back coordinates.
For Chrome specifically, launching it with --force-renderer-accessibility
gets you a real tree at a small performance cost.
Everything fails with input_backend_failed. pipx without
--system-site-packages. Reinstall with the flag:
Every ui_* call says "Namespace Atspi not available". You have
python3-gi but not the AT-SPI typelib, which is a separate package:
gir1.2-atspi-2.0 on Debian and Ubuntu, at-spi2-core on Fedora and Arch.
deskwright-setup --check catches this and names it.
A tool returns halted. Somebody pressed Super+Ctrl+Escape, which is the
halt switch. Press it again to clear it.
Your screen locked and half the tools stopped. Expected. GNOME unloads
extensions that don't declare unlock-dialog, so screenshots and window
geometry go away until you unlock. AT-SPI keeps working, so ui_find,
ui_press and ui_read_text all still do.
What it won't do
Deliberately out of scope as a project, not just off by default:
- No CAPTCHA solving. CAPTCHAs exist to tell humans from software. This is software.
- No credential typing features. Nothing here is built to harvest, store or autofill secrets. The journal doesn't record what gets typed, only how much.
- No detection evasion. No timing jitter to look human, no fingerprint spoofing, no anti-anti-bot work.
- No cloud, no telemetry, no account. It's a local process on your session bus, and nothing leaves the machine.
On the other side of that line the design is deliberately permissive. The agent is trusted, and the tooling's job is to make it capable rather than to fence it in. The whole safety budget goes to three things: a halt switch a human can always reach, guards against actions that can't be undone, and an honest record of what happened. SECURITY.md is blunt about what enabling this actually switches on, and it's worth reading before you point it at your real screen.
How it actually works
Wayland denies all of this to Wayland clients. It says nothing about D-Bus, and that's where the doors are. Four mechanisms, roughly in order of how much work they carry:
- AT-SPI for anything semantic. Real widgets, real actions, no pointer.
- A gnome-shell extension over D-Bus for what gnome-shell keeps to itself: window enumeration and control, screenshots, pointer position, and a keybinding grab for the halt switch.
org.gnome.Mutter.RemoteDesktopfor pointer and keyboard. Absolute coordinates, and keysyms rather than key positions, so your keyboard layout can't transpose what gets typed.xdg-desktop-portalfor the same thing, standardised. This is the route to compositors that aren't GNOME.
Worth knowing: number 2 is the only one of those that isn't already open. Mutter's ScreenCast and RemoteDesktop interfaces answer any client on your session bus with no consent dialog, which is why recording here needs no permission popup, and why the portal is a caller of them rather than a gate in front of them. SECURITY.md has the exact commands if you'd rather check that yourself than take my word for it.
docs/field-notes.md is the long version: every wall
hit on the way here, what the compositor refused, and the measurements that
shaped the tool surface. It's the file to read when something behaves oddly, or
before you change the code.
Requirements
deskwright-setup --check is the real answer. It detects everything, names the
package for your distro and exits nonzero if a hard requirement is missing.
The short version:
Claude Code, not Cowork. On Linux the desktop app runs Cowork tasks inside a QEMU/KVM virtual machine, so an MCP server it starts lives in that VM and cannot see your session bus, your gnome-shell or your screen. Everything here would fail there. Use it from the Claude Code CLI, the Code tab, or any other MCP client running on the host itself.
Claude Code, not Cowork. On Linux the desktop app runs Cowork tasks inside a QEMU/KVM virtual machine, so an MCP server it starts lives in that VM and cannot see your session bus, your gnome-shell or your screen. Everything here would fail there. Use it from the Claude Code CLI, the Code tab, or any other MCP client running on the host itself.
Packages, using Debian names (deskwright-setup prints yours): python3-gi,
gir1.2-atspi-2.0, python3-pil, libglib2.0-bin, wl-clipboard,
tesseract-ocr. ydotool is optional and only used as an input fallback. The
headless session additionally wants gnome-shell and dbus-daemon as
binaries, which any normal desktop already has.
Contributing, security, license
CONTRIBUTING.md has the layout, the test suites and what
each one needs. SECURITY.md is the threat model, stated
plainly. ROADMAP.md is what's next and why, in order.
Apache-2.0. If you get it running on a compositor that isn't GNOME, or on a GNOME older than 50, please open an issue and say so. That's the most useful thing anyone can send.
mcp-name: io.github.tristanmuzzu/deskwright
來源:README.md,提交 c34e3c2
工具
0版本歷史
1- v0.1.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分