Sandboxed computer-use for AI agents: drive real browser + desktop apps in nested X11 windows
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Glovebox MCP.
launch_appCallable MCP tool function
A sandboxed computer-use MCP server β let an AI agent drive a real browser and desktop apps (mouse, keyboard, screenshots, vision grounding), confined to a nested X11 window so it can never touch your real screen, files, or other apps.
Like a lab glovebox: the agent reaches in and manipulates real applications, sealed off from everything else. Bring the sandbox up, log into whatever sites or apps you want to automate inside that window, and the agent operates only there β you can watch it live and close it instantly.
Speaks the Model Context Protocol, so it works with MCP clients like Claude Code. Your host can run Wayland; the sandbox gives the agent a real X server to drive.

An agent driving a real browser in the sandbox β gliding the cursor, inserting a unicode name (Nadja KovaΔiΔ), typing, and submitting. All confined to a nested X11 window.
DISPLAY :1). Everything the agent
does β clicks, typing, screenshots β is confined to that window, not your real desktop.pkill Xephyr to close everything.uv (used for the virtualenv).xserver-xephyr (Xephyr), openbox, scrot, x11-utils, xdotool,
wmctrl, xclip (+ tesseract-ocr for basic). On Debian/Ubuntu the installer auto-installs
them via apt (sudo); on Fedora/Arch it prints the matching dnf/pacman command. The MCP server
itself is distro-agnostic β any Linux with these tools works.local vision mode.Pick a vision backend and run its one-liner (clone β install). Each one installs the system packages
(auto via apt on Debian/Ubuntu) and the Python deps for that mode, and writes a ready-to-paste
mcp-config.json with your paths.
none β no local models; your agent reads screenshots itself (lightest, instant):
basic β Tesseract OCR grounding (parse_screen β text + coordinates, CPU-only):
local β OmniParser on an NVIDIA GPU (parse_screen β text + icons, pixel-precise; ~4 GB weights, β₯6 GB VRAM):
Your choice is written to .vision-mode (override per run with the GLOVEBOX_VISION env var).
Claude Code, Cursor, Codex, or your own agent β it's a standard MCP server, not tied to any one host.
Two compatibility notes: basic/local return element coordinates as text, so they work even
with text-only agents; none relies on the client passing the tool's screenshots to a
multimodal model (fine for Claude Code, Cursor, and other image-capable MCP clients).
install.sh already wrote mcp-config.json with
your real install path β copy its glovebox block into your client's MCP config:
Restart the client so it loads the server.:1 window.Driving it with an AI agent? Paste
AGENTS.mdinto the agent's system prompt β it teaches the observe β act β verify loop, grounding, the upload/unicode gotchas, and when to stop.
| Tool | What |
|---|---|
status() | Server + sandbox status in one read-only call: version, vision backend, host display, live instances, and which system deps (xdotool, xclip, Xephyr, tesseract, OmniParser weights) are present. Run it first β and paste it into bug reports. |
parse_screen() | Vision grounding β JSON of detected elements (id, type, label, interactive, pixel-center; capped at 300 per call, flagged via "truncated") + a numbered Set-of-Mark image at /tmp/glovebox_annotated_<N>.png. (local mode: OmniParser on GPU, ~2 s.) |
click_element(id) | Click an element from the last parse_screen (no coordinate guessing). |
screenshot() | Screenshot of an instance. |
click(x,y) Β· move_mouse Β· scroll Β· drag Β· double_click | Pointer ops. |
type_text(text) | Unicode-safe typing (ASCII via xdotool; anything with Δ/Ε‘/ΕΎβ¦ is inserted via the clipboard, because xdotool's synthetic unicode is silently dropped by some GTK apps). |
press_keys("ctrl+a"/"Return"/β¦) | Keys/combos (xdotool syntax). |
upload_file(filepath, selector?) | Attach a local file to a page's <input type=file> via the Chrome DevTools Protocol. The nested X11 file picker is invisible to automation and hangs the renderer, so use this for all uploads β never click an upload button expecting a dialog. Works on Chromium started by launch_app/start-display.sh (they open a per-instance --remote-debugging-port, 9222+N). Browser file inputs only β for native apps see open_file. |
open_file(filepath, app?) | Open a local file in a native app on the instance's display (e.g. app="gimp") or via xdg-open. GTK apps get the same X11/D-Bus handling as launch_app. |
list_files() | The instance's staging folder files/<N>/ (under the install dir) + its contents. |
launch_app(command, name?, size?) Β· list_instances() Β· close_instance(n) | Multi-instance control (see below). |
wait_ms(ms) Β· get_screen_size() | Timing / sandbox size. |
Every control tool takes instance=N and optional observe / settle_ms (see below).
In local mode OmniParser is lazy-loaded on first parse_screen (~6 s once, then ~2 s/parse).
Every tool returns JSON: {"ok": true, "action": "click", "instance": 1, "detail": "clicked (10,20) button 1", β¦}.
Failures come back with the MCP isError flag set and the same JSON shape embedded in the error
text β {"ok": false, "error": "β¦", "fix": "β¦"} β where fix names the call that unblocks you
(e.g. a click on a dead instance says to run list_instances() / launch_app(); an unknown element
id says to re-run parse_screen()). Silent no-ops are treated as failures too: an invalid keysym,
a zero scroll, closing an instance that isn't running, or non-ASCII typing without xclip all
error instead of pretending success. screenshot() returns a PNG image; observe="screenshot"|"parse"
returns [json, image] in one call.
GLOVEBOX_VISION env var, or the .vision-mode file, or default local:
| Mode | parse_screen | Needs | When |
|---|---|---|---|
none | disabled (returns a note) β use screenshot() + reason | nothing (mcp, mss, xdotool) | lightest; let the agent's own vision do grounding |
basic | Tesseract OCR β text elements + coords | tesseract-ocr + pytesseract | no GPU; text-only grounding |
local | OmniParser β text + icons + coords | torch + CUDA + OmniParser weights | best grounding |
Switch anytime with ./install.sh <mode> (installs only what that mode needs).
Every control tool takes instance=N (default 1 = the start-display.sh sandbox). Spin up more β
each its own Xephyr display/window on the host desktop:
launch_app(command, name?, size?) β starts the next free :N running any GUI app
(chromium, gimp, inkscape, xterm, β¦). Chromium auto-gets X11 flags, a per-instance profile,
a remote-debugging port, and D-Bus isolation. Returns the instance id.list_instances() Β· close_instance(n).Because each display has its own cursor, multiple agents can drive different instances in parallel β
one window each. The only shared resource is the GPU for local-mode parse_screen (it just queues).
The host display for new windows is GLOVEBOX_HOST_DISPLAY (default :0); XAUTHORITY is auto-discovered.
click Β· click_element Β· type_text Β· press_keys Β· scroll Β· drag Β· double_click take
observe (none default Β· screenshot Β· parse) and settle_ms. With observe="screenshot"
the action returns its result and the resulting screen in a single call (with settle_ms to let the
page update first) β no separate screenshot round-trip. Default none keeps routine steps cheap; opt
into screenshot/parse on the steps that change the page (navigations, submits).
Each instance gets a staging folder files/<N>/ inside the install dir β a stable place to drop
files for that instance (readable by native apps and, since it's under $HOME, by snap Chromium too).
list_files(instance) shows the folder and its contents.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/glovebox-mcp)<a href="https://allmcps.com/mcp/glovebox-mcp"><img src="https://allmcps.com/api/badge/glovebox-mcp?style=directory" alt="Glovebox MCP on AllMCPs" /></a>