Skip to main content
Glama

screen-watch

ci

Passive desktop watching for AI coding agents. Observation only — no click, type, or remote control.

Repo: https://github.com/JadissEL/screen-watch

Local MCP server so Cursor, Claude Code, and similar agents can see your desktop while you talk — same spirit as Google AI Studio Share Screen / Stream.

Install

# From GitHub (recommended while pre-PyPI)
pip install "git+https://github.com/JadissEL/screen-watch.git"

# Or clone + editable
git clone https://github.com/JadissEL/screen-watch.git
cd screen-watch
pip install -e ".[dev]"

Optional extras:

pip install -e ".[windows]"   # dxcam
pip install -e ".[macos]"     # Quartz via pyobjc
pip install -e ".[hotkey]"    # pynput (macOS/Linux global hotkeys)

Related MCP server: Screen MCP

Quick use

# One-shot smoke capture (optional --display N)
python -m screen_watch once -o desk.jpg

# Capacity + LLM cost advice (local)
python -m screen_watch advise --model gpt-4o

# Backend / deps check
python -m screen_watch doctor

# Grab+encode latency
python -m screen_watch bench -n 5

# Foreground watch (logs content-hash changes)
python -m screen_watch watch --seconds 5

# MCP stdio server (default)
python -m screen_watch serve

(screen-watch console script works if your Python Scripts folder is on PATH.)

Cursor MCP snippet

{
  "mcpServers": {
    "screen-watch": {
      "command": "python",
      "args": ["-m", "screen_watch", "serve"]
    }
  }
}

Defaults (configurable)

Setting

Default

Resolution

1280×720

FPS

5

JPEG quality

60

Blur

off

Recording

off

See docs/CONFIG.md.

MCP tools

Tool

Purpose

get_version

Package version

get_latest_frame

Latest JPEG (blur, since_hash to skip identical frames)

get_latest_frame_info

Frame metadata only (no image bytes; supports since_hash)

get_frame_history

Recent frame metadata ring buffer (no images)

get_display_frame

Capture a specific monitor id

save_latest_frame

Write JPEG to a local path (no image tokens)

bench_capture

Local grab+encode latency (ms)

list_tools

Canonical tool name catalog

start_watch / stop_watch / get_watch_status

Background daemon (display_id optional)

set_capture_display

Default monitor for watch / latest

list_displays

Monitors

get_advisor_summary / set_preferred_llm / run_capacity_profile / list_llm_models

Local advisor

start_recording / stop_recording / list_recordings / get_recording_timeline / attach_recording_context

Opt-in local sessions

guided_region_focus / get_region_frame

Loose drag overlay or bbox crop; agent snaps to UI

Interactive focus from a terminal:

python -m screen_watch focus -o region.jpg --gesture gesture.json

# Global hotkey (default Ctrl+Shift+F) opens the same overlay
python -m screen_watch hotkey
# or: python -m screen_watch hotkey --bind ctrl+shift+f
# macOS/Linux: pip install "screen-watch[hotkey]"  # pynput

Cursor example config: examples/cursor-mcp.json.
Hash-poll demo: examples/poll_since_hash.py.

Architecture sketch

  1. Capture — cross-platform; mss always available; DXCam optional on Windows; SCK/PipeWire fall back to mss until native bindings land.

  2. Pipeline — downsample → optional blur → change-detect → JPEG.

  3. MCP — identical tool surface on every OS.

MCP reference: docs/MCP.md · Stable API: docs/STABLE_API.md. Performance: docs/PERF.md. Privacy: docs/PRIVACY.md. Security: docs/SECURITY.md. Token costs: docs/TOKEN_COSTS.md. Plan: IMPLEMENTATION_PLAN.md.

License

MIT

Available Tools

26 tools
attach_recording_contextC

Return recording meta/timeline suitable for injecting into agent context.

Inputs: session_id (required). Returns: object

bench_captureB

Measure local grab+encode latency (ms). display_id 0 = default/primary.

Inputs: display_id, iterations. Returns: object

doctorB

Report install, capture backend, and optional tool availability.

Inputs: no named parameters. Returns: object

get_advisor_summaryC

PC capacity advice + preferred LLM cost estimates (local, optional).

Inputs: no named parameters. Returns: object

get_display_frameB

Capture a specific monitor by id (from list_displays).

since_hash: skip image bytes when the hash still matches.

Inputs: display_id (required), blur, since_hash.

get_frame_historyA

Return newest-first frame metadata from the watch ring buffer (no image bytes).

Useful to see when the desktop last changed without paying image tokens.

Inputs: limit, changed_only. Returns: object

get_latest_focusA

Return the last guided-focus artifacts (from hotkey or guided_region_focus).

Inputs: no named parameters. Returns: object

get_latest_frameB

Capture or return the latest desktop frame as JPEG (observation only).

blur: if true, pixelate the frame before send (privacy). Off by default. since_hash: if set and equal to the current content_hash, return a small JSON stub instead of image bytes (avoids re-billing identical frames).

Inputs: blur, since_hash.

get_latest_frame_infoA

Same as get_latest_frame but returns JSON metadata (no image bytes).

Pass since_hash from a prior poll; when it matches, unchanged is true and you can skip calling get_latest_frame.

Inputs: blur, since_hash. Returns: object

get_recording_timelineC

Return timeline + sync hooks for a recording (agent supplies its own STT).

Inputs: session_id (required). Returns: object

get_region_frameA

Capture a region by bbox (screen/capture pixels) for lower token use.

Returns the cropped JPEG. Prefer guided_region_focus for interactive selection.

Inputs: x (required), y (required), width (required), height (required), +1 more.

get_versionA

Return package version and repo URL.

Inputs: no named parameters. Returns: object

get_watch_statusA

Return watch/daemon status and last frame metadata.

Inputs: no named parameters. Returns: object

guided_region_focusB

Flash an overlay; user drags a loose box; returns gesture + region JPEG (base64).

The agent should infer the precise UI element from the loose gesture + pixels. Blocks until release (accept) or Esc (cancel). Also saves under latest_focus/.

Inputs: blur. Returns: object

list_displaysC

List available monitors.

Inputs: no named parameters. Returns: result

list_llm_modelsB

List built-in vision LLM catalog for the cost advisor.

Inputs: no named parameters. Returns: result

list_recordingsB

List local recording sessions (branch-like artifacts).

Inputs: no named parameters. Returns: result

list_toolsA

Return the canonical screen-watch MCP tool catalog (names only).

Inputs: no named parameters. Returns: object

run_capacity_profileB

Refresh local machine profile and recommendations (never blocks).

Inputs: no named parameters. Returns: object

save_latest_frameA

Write the latest JPEG to a local filesystem path (no image tokens in the reply).

path: destination file; empty → OS data dir / latest.jpg force_capture: ignore store and grab a fresh frame

Inputs: blur, path, force_capture. Returns: object

set_capture_displayA

Set default monitor for watch / get_latest_frame (1-based; 0 = primary/auto).

Inputs: display_id. Returns: object

set_preferred_llmC

Persist the user's preferred vision LLM for cost estimates.

Inputs: model_id (required). Returns: object

start_recordingB

Start an opt-in local recording session (off unless recording.enabled).

Returns capacity advice but never refuses for hardware reasons.

Inputs: title. Returns: object

start_watchA

Start the background watch daemon (keeps latest frame fresh).

display_id: 1-based monitor from list_displays; 0 keeps current/primary.

Inputs: display_id. Returns: object

stop_recordingA

Stop the active recording session and flush timeline sync hooks.

Inputs: no named parameters. Returns: object

stop_watchB

Stop the background watch daemon.

Inputs: no named parameters. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 26 tools

    Disambiguation2/5

    Several capture tools overlap heavily: get_latest_frame, get_latest_frame_info, get_display_frame, get_frame_history, and get_latest_focus all revolve around retrieving recent screen content, with only subtle distinctions in metadata, display targeting, or freshness skipping. Region capture is similarly split between get_region_frame, guided_region_focus, and get_latest_focus, which makes tool selection error-prone despite helpful descriptions.

    Naming Consistency4/5

    The names are overwhelmingly snake_case and usually follow a verb_noun or verb_object pattern such as get_latest_frame, start_watch, list_recordings, and set_capture_display. Minor deviations like doctor, bench_capture, and guided_region_focus slightly break the pattern but remain readable and predictable.

    Tool Count2/5

    At 26 tools, the surface is heavy for a screen-watch server and includes adjacent concerns like LLM cost advising, capacity profiling, diagnostics, and recording-context assembly. The count exceeds the typical 3-15 well-scoped range and starts to feel like multiple subsystems bundled into one server.

    Completeness4/5

    The server covers a broad lifecycle: display listing, frame capture, watch daemon control, region/focus capture, saving frames, recording start/stop/list/timeline, and diagnostics. Minor gaps exist around deleting or exporting recordings and updating broader capture preferences, but agents can work around these.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers