mango-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mango-mcplaunch Firefox on tag 2, then screenshot the window"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mango-mcp
An MCP server that gives an agent its own computer to use: a private, headless mango desktop running next to yours. The agent launches apps, takes screenshots, and drives the mouse and keyboard there. None of it reaches your session: your cursor stays put, your focus is never taken, nothing appears on your screen, and your typing never lands in the agent's windows.
You do not need to use mango yourself. The agent's desktop is a separate headless compositor, so this works from any desktop (GNOME, KDE, Sway, Hyprland, ...), or none.
Install
Nix (any distro)
The flake bundles everything (mango, grim, wtype, dbus-daemon):
claude mcp add --scope user mango-desktop -- nix run github:Anti-2k/mango-mcpOr build a local copy: git clone https://github.com/Anti-2k/mango-mcp && cd mango-mcp && nix build, then point your client at result/bin/mango-mcp.
Other distros
Install mango and the helper tools:
Distro
Command
mango
Arch
sudo pacman -S mangowm grim wtype dbusofficial repos
Fedora
sudo dnf install mangowm grim wtype dbus-daemonneeds the Terra repo
Gentoo
sudo emerge gui-wm/mangowm gui-apps/grim gui-apps/wtypeGURU overlay
Guix
guix install mangowm grim wtype dbusDebian, Ubuntu
sudo apt install grim wtype dbus-daemonopenSUSE
sudo zypper install grim wtype dbus-1Void
sudo xbps-install grim wtype dbusbuild from source
Package names drift; repology has the current ones. mango 0.12 and newer (including 0.18+) are supported.
Install the server (Python 3.10+) with uv or pipx:
uv tool install git+https://github.com/Anti-2k/mango-mcp # or: pipx install git+https://github.com/Anti-2k/mango-mcpThe prebuilt
pywaylandwheels need glibc 2.34+ on x86_64 (Debian 12, Ubuntu 22.04, Fedora 35 and later). Elsewhere pip builds it from source, which needs the Wayland development headers and libffi.Check that everything is found, then register it:
mango-mcp check claude mcp add --scope user mango-desktop -- mango-mcp
Any other MCP client: run mango-mcp as a stdio server. The desktop starts on
the first tool call and is torn down, along with every app the agent started,
when the server exits.
Options (environment variables)
Variable | Default | Meaning |
|
| Desktop name. A second server with the same name gets |
|
| Size of the headless screen. |
|
| Tags the agent may use, e.g. |
| unset |
|
| unset | Comma-separated variables to pass through anyway, e.g. |
| bundled | Use a different mango binary. 0.12 (dwl-ipc) and 0.18 (socket IPC) are both supported. |
Related MCP server: deskwright
Tools
Tool | |
| Screen size, tags (which are visible, window counts), focused window |
| Whole screen or a region; |
| A region magnified (up to 4x by default) to read small text |
| Run a shell command on the desktop, optionally on a given tag; reports the new window |
| Run a short command in the desktop's environment and return its output (killed after |
| Window management ( |
| Tags, limited to |
| Pointer, in screen pixels |
| Keyboard: any Unicode text regardless of layout; combos like |
|
Watching the agent
eval "$(result/bin/mango-mcp env agent)" # point this shell at the agent desktop
grim /tmp/agent.png # one-off screenshot
nix run nixpkgs#wayvnc -- -d 127.0.0.1 5900 # live view in any VNC viewerKeep the -d (--disable-input) on wayvnc. Without it, input from the viewer
goes to the agent's seat and you would be interfering with the agent.
How the isolation works
The agent gets a separate compositor rather than a corner of yours. Mango, like dwl, has one seat (one cursor, one keyboard focus), so inside a single session any synthetic click or keystroke would have to move your cursor and take your focus.
Way the two sides could interfere | What prevents it |
Your keyboard and mouse reaching the agent | The agent's mango runs on the headless backend with no libinput devices. It has no physical input at all. |
Agent input reaching your windows | Input goes in through the virtual-pointer and virtual-keyboard protocols, over the agent's own Wayland socket. Nothing uses |
Agent apps opening on your screen | Every process gets a freshly built environment: its own |
Single-instance apps handing off to your copy | A private D-Bus session bus, plus by default a separate |
Notifications, portals and other D-Bus services showing up on your desktop | The private bus. Services activated on it inherit the agent's display. |
mango rewriting your session's environment | mango runs |
Compositor keybindings | The agent's config has no binds and no autostart ( |
Two agents fighting over one desktop | Each server takes an exclusive lock on its desktop name. |
tests/test_live.py checks this end to end: it starts a desktop, drives a
terminal in it, then asserts that your systemctl --user show-environment and
the contents of your runtime directory are unchanged.
Limits
This keeps the agent and you from getting in each other's way. It is not a
security sandbox. Agent processes run as your user, with your files and
network. A process that deliberately sets WAYLAND_DISPLAY=wayland-0 XDG_RUNTIME_DIR=/run/user/$UID can still reach your session. Some leaks also
bypass the environment entirely:
gpgfinds its agent at a fixed path, so signing inside the agent desktop can pop a pinentry dialog on your screen./tmp/.X11-unixis shared, so an agent app explicitly toldDISPLAY=:0would reach your Xwayland.
Covering those needs mount namespaces (e.g. bubblewrap). That is not done here.
With MANGO_MCP_SHARE_HOME=1, an app that is already running on your desktop
(Chromium, VS Code, Discord, ...) may receive the agent's launch and open the
window on your screen. To use those apps with a shared home, give them a
separate profile (--user-data-dir, firefox --profile ... --new-instance).
License
MIT, see LICENSE. The Wayland protocol XML files in
mango_mcp/protocols/ are third-party and keep their own terms.
Development
nix develop
python -m pytest # unit tests
MANGO_MCP_LIVE=1 python -m pytest # plus the live end-to-end test (needs kitty)
MANGO_MCP_COMPOSITOR=/path/to/mango MANGO_MCP_LIVE=1 python -m pytest # against another mangoLogs: ~/.local/state/mango-mcp/server.log; per-desktop mango.log,
dbus.log and per-app logs live in the desktop's runtime directory while it
runs.
This server cannot be deployed
Maintenance
Related MCP Connectors
Cloud desktops for AI agents: create a Linux computer, see its screen, click, type and run tasks.
Persistent Linux computers for AI agents: desktop, signed-in browser, vault, apps and shell.
Linux VMs for AI agents: create VMs, run commands, edit files and open preview URLs.
Persistent cloud workspaces for AI agents: run commands, edit files, use git and a browser.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to automate Linux desktop GUI by launching and interacting with Wayland applications in isolated virtual KWin sessions, or connecting to live desktops for collaborative automation.266 PyPI69MIT
- AlicenseAqualityBmaintenanceEnables AI agents to operate a real GNOME Wayland desktop through accessibility-tree widget actions, pointer/keyboard input, OCR, window management, and screen capture, optionally on a private headless session.3338 PyPI8Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables an AI agent to see and control a Linux desktop via Wayland/Hyprland, providing screenshots, structured desktop state, pointer/keyboard input, semantic window/workspace tools, and a policy engine for safe execution.Apache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to inspect, automate, and test desktop GUI applications on Wayland through window/desktop streaming, semantic AT-SPI accessibility tree inspection, and boundary-clamped mouse, keyboard, drag, and scroll input injection. It also manages application process lifecycle, captures window frames, and registers Python GUI scripts as native Linux desktop launchers.MIT