Labsco
bnomei logo

zeuxis

โ˜… 1

from bnomei

Let AI agents capture screenshots themselves

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredNeeds API keys

zeuxis

Crates.io Downloads

Zeuxis is a local MCP screenshot server that lets AI agents capture the current desktop, windows, cursor regions, and exact rectangles through MCP tools.

It runs as one local binary over stdio by default. Capture results stay on the machine as managed image artifacts and are returned to the MCP client as file:// resource links plus structured metadata. Zeuxis does not upload screenshots, perform OCR, drive the UI, or expose system-control tools.

Supported platforms

PlatformStatusNotes
macOSFirst-classZeuxis preflights Screen Recording permission before capture. Cursor-based tools may also need Accessibility permission.
LinuxBest effortBehavior depends on the desktop environment, compositor, session type, and backend support.
Other platformsUnsupported in v1Tools return capture_unsupported_on_platform.

Choose a capture tool

User intentTool
See the whole screen or get first-pass contextcapture_screen
Capture the focused app windowcapture_active_window
Capture the window under the cursorcapture_cursor_window
Capture a specific window from a window listinglist_windows, then capture_window
Capture a tooltip, menu, or small cursor-adjacent areacapture_cursor_region
Capture exact global desktop coordinatescapture_rect
Capture exact monitor-local coordinatescapture_monitor_region
Reuse the last screenshot from this server sessionget_latest_capture
Inspect or delete Zeuxis artifacts from this sessionlist_session_artifacts, clear_session_artifacts

For deterministic window capture, call list_windows and pass both snapshot_id and window_id from that same response to capture_window. Window IDs are scoped to the snapshot, not durable across listings.

MCP tools

Tool schemas are defined in src/mcp/tools.rs. Result payloads are built in src/mcp/result.rs, and stable errors are defined in src/mcp/errors.rs.

ToolParametersDescription
list_monitorsnoneLists monitors with IDs, names, logical bounds, and primary/built-in flags.
list_windowsfocused_only?, include_system_windows?, app_contains?, title_contains?Lists windows and records a snapshot for capture_window. System UI surfaces are excluded unless requested.
get_runtime_diagnosticsnoneReports OS/session context, permission status, monitor discovery, and cursor availability.
get_latest_capturenoneReturns the latest artifact from the current server session without taking a new screenshot.
list_session_artifactsnoneLists artifacts created in the current server session and marks the latest one.
clear_session_artifactsnoneDeletes artifacts created in the current server session and resets latest-capture state.
capture_screenmonitor_id? plus shared capture parametersCaptures a full monitor. Omitting monitor_id selects the primary monitor.
capture_active_windowshared capture parametersCaptures the focused, non-minimized window.
capture_cursor_windowinclude_system_windows? plus shared capture parametersCaptures the non-system window under the cursor by default.
capture_windowsnapshot_id, window_id plus shared capture parametersCaptures a window selected from a list_windows snapshot.
capture_cursor_regionsize plus shared capture parametersCaptures a square region centered on the cursor.
capture_rectx, y, width, height plus shared capture parametersCaptures a global desktop rectangle in logical points.
capture_monitor_regionmonitor_id, x, y, width, height plus shared capture parametersCaptures a monitor-local rectangle in logical points.

Shared capture parameters:

ParameterTypeDefaultNotes
delay_msintegerunsetOptional pre-capture delay in milliseconds. Range: 0..=30000. Do not combine with delay_seconds.
delay_secondsnumberunsetOptional pre-capture delay in seconds. Range: 0..=30. Do not combine with delay_ms.
play_soundbooleanfalsePlays capture-complete feedback after a successful capture.
outputstring or object"analysis"Controls artifact format, downscaling, and JPEG quality.

Examples:

{ "delay_ms": 800, "play_sound": true }
{ "output": "compact" }
{
  "output": {
    "mode": "custom",
    "format": "webp",
    "max_dimension": 2048
  }
}

Output options

Preset output modes:

PresetFormatMax dimensionJPEG qualityUse when
analysisPNG2560n/aDefault LLM analysis with moderate downscaling.
exactPNGoriginal sizen/aYou need original pixels and lossless output.
compactJPEG160085You want smaller artifacts for faster transfer.

Custom output mode:

FieldRequiredConstraints
modeyesMust be "custom".
formatyes"png", "jpeg", or "webp".
max_dimensionnoLongest output side in pixels, 256..=8192.
jpeg_qualityonly for JPEG40..=95. Rejected for PNG and WebP.

If ZEUXIS_ARTIFACT_HMAC_KEY is set, capture results also include artifact_hmac_sha256.

Coordinates and limits

Coordinate inputs use logical desktop points. Captured image dimensions use source pixels. Use the returned input_units, source_units, and source_scale_factor fields to reason about HiDPI scaling.

Runtime limits:

LimitValue
delay_ms0..=30000
delay_seconds0..=30
Capture width or height1..=16384
Capture area<= 40000000 pixels
Custom output max_dimension256..=8192
JPEG quality40..=95

Requested delays run before capture work and are additive to the capture timeout. For example, a request with delay_ms=30000 and the default --blocking-task-timeout-ms=15000 can take up to about 45 seconds before the client receives a timeout or result.

Platform permissions

macOS

Zeuxis checks Screen Recording permission before capture. If permission is missing, Zeuxis asks macOS for access and returns permission_denied for that same tool call. Grant Screen Recording permission to the terminal or host app that starts Zeuxis, then retry the tool call.

Cursor-dependent tools read the global cursor position and may also require Accessibility permission. If those fail, try capture_screen or capture_rect while you update permissions.

Linux

Linux capture support depends on the graphical session and backend capabilities. If capture fails, call get_runtime_diagnostics and check xdg_session_type, display, wayland_display, monitors_ok, and cursor_ok.

On Wayland, cursor and window capture behavior can be more limited than full-screen capture. Prefer capture_screen first, then narrow to regions if the compositor allows it.

Privacy and safety

Zeuxis is designed for local observation:

  • It serves MCP over local stdio.
  • It returns local file:// artifact links.
  • It does not upload screenshots to remote services.
  • It does not perform OCR, UI element detection, input automation, shell execution, or window control.
  • It validates tool parameters before capture.
  • Capture work runs in a subprocess worker with parent-enforced timeout and termination.
  • clear_session_artifacts deletes only Zeuxis-managed artifacts from the current session.

Managed artifact files use the zeuxis- prefix and .png, .jpg, or .webp suffix. Retention pruning is best effort and never deletes the artifact currently being returned.

Development

Useful source entrypoints:

FilePurpose
src/main.rsCLI parsing, stdio server startup, hidden worker mode, tracing setup.
src/runtime_config.rsCLI/env defaults, ranges, and runtime settings.
src/mcp/tools.rsMCP tool schemas, validation, capture execution, output settings.
src/mcp/result.rsMCP result payloads and resource links.
src/mcp/errors.rsStable error codes and retryability.
src/capture/backend.rsCapture backend trait and monitor/window metadata.
src/worker/contract.rsParent/worker JSON contract.
skills/capturing-ui-with-zeuxis/SKILL.mdCodex skill guidance for using Zeuxis proactively.
specs/Historical design and requirements specs.

Run local checks:

cargo check
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-targets

On Ubuntu/Linux CI-like environments, install the capture backend build dependencies first:

sudo apt-get update
sudo apt-get install -y \
  pkg-config \
  libclang-dev \
  libxcb1-dev \
  libxrandr-dev \
  libdbus-1-dev \
  libpipewire-0.3-dev \
  libwayland-dev \
  libegl-dev \
  libdrm-dev \
  libgbm-dev

This repo also ships a prek.toml for lightweight local commit gates:

prek validate-config
prek run --all-files
prek install

The configured hooks run cargo fmt --all -- --check and cargo clippy --all-targets --all-features -- -D warnings.