Human-controlled desktop vision for Claude Code, Codex, and other MCP clients.
ScreenMCP is a local Electron app. The human chooses one monitor, window, or region; coding agents can see it — and, in Interactive mode, click and type within it — through an authenticated MCP endpoint, and nothing else. Off, Read-only, and Interactive access modes, an emergency STOP control, per-source redaction masks, change-aware capture, and a local audit trail keep the human in control at every step.
You pick exactly one monitor, window, or region — a dragged Rectangle, a point-and-highlight Window, or a Whole-screen chooser. Nothing is shared until you choose, and the selected source stays open as a persistent stream, so no OS picker pops up for every model request. describe_source reports the source kind, label, and dimensions without capturing an image.
Draw redaction masks to black out secrets and highlights to point the model at what matters, right on top of the selected source. Masks are applied before resize, hashing, encoding, MCP resources, and any retained audit frame — the model never receives the hidden pixels, and a highlight can carry a short label written just for the model. The image at the top of this page is exactly what the model would receive for that region.
One toggle moves between Off, Read-only, and Interactive:
- Off — the global STOP gate. MCP clients stay connected, but every screen and control call returns
capture_stopped. - Read-only — the model sees the selected source through
lookandwait_for_change, but cannot inspect controls, read UI text, click, or type. - Interactive (Windows) — the model can act on the source:
list_elements(UI Automation control tree),read_text(UIA value or OCR of a region),click(UIA invoke or a scoped coordinate click), andtype_text(UIA value or scoped keystrokes). A window source unlocks the full accessibility tree; a monitor or region source allows OCR and coordinate clicks.
Interactive is bound to the current source, shown in amber, and revoked the moment you change source, press STOP, or go Off — there is no focus or idle auto-revoke, so it stays on while you work in other apps until you turn it off.
A click or type_text that arrives while you are in Read-only does not silently fail: ScreenMCP surfaces its window and waits up to 120 seconds for your explicit approval before switching to Interactive and continuing the same call. Denial, timeout, or a source change produces no input.
look(changed_since) returns a text-only changed:false when the frame's perceptual hash is within a configurable threshold, and wait_for_change long-polls up to 120 seconds and returns a frame only after a meaningful visual change — so watching an app for progress does not burn vision tokens on an idle screen.
A local JSONL audit trail records every request — client name, source, action, byte size, and outcome — alongside post-redaction thumbnails you can review in the app. Typed content is never stored; the target is logged as [redacted N chars].
Frame format and longest side, JPEG quality, close-to-tray behavior, the startup access default, audit-frame retention, active-dialog following, and the global picker shortcuts are all configurable.
Release binaries are currently unsigned. Verify the matching entry in SHA256SUMS.txt before running a
download from GitHub Releases.
| Platform | Package | Update behavior |
|---|---|---|
| Windows | ScreenMCP-Setup-…exe |
Downloads new releases in the background; installs on Restart and install or the next quit. |
| Windows | ScreenMCP-Portable-…exe |
Shows a new release; manual replacement from Releases. |
| macOS | ScreenMCP-…dmg |
Shows a new release; manual while builds remain unsigned and unnotarized. |
| Linux | ScreenMCP-…AppImage / .deb |
Downloads new releases in the background; installs on Restart and install or the next quit. |
Windows SmartScreen and macOS Gatekeeper can warn because there is no signing certificate yet.
Requirements: Node.js 24 and npm 11.
npm ci
npm run devFor a production directory build:
npm run package:dirTagged releases build NSIS and portable Windows packages, an unsigned macOS DMG, and Linux AppImage and deb packages. Manual release-workflow runs build the same three-OS artifacts without creating a tag or Release.
On startup ScreenMCP detects installed Claude Code and Codex clients and installs the matching
screenmcp skill automatically. Windows uses a junction; macOS and Linux use a directory symlink.
The links point to a content-addressed copy under ~/.screenmcp/skill-payloads, so they survive app
updates and portable/AppImage paths. Existing real directories and foreign links are never replaced.
Start ScreenMCP, select a source, then register the MCP endpoint once. The installed skill contains a
target-specific register.mjs beside its SKILL.md; the source-repository equivalents are:
Claude Code:
node skills/shared/register.mjs claudeCodex:
node skills/shared/register.mjs codexThe helper reads ~/.screenmcp/endpoint.json; no token copy/paste is needed. A binary release also
attaches the standalone shared register.mjs. Restart or reconnect the agent if its MCP tool list was
already initialized. See agent skill installation
for target paths, update behavior, and conflict handling.
On first connection, ScreenMCP shows the client-reported name and version. Choose allow once, always allow, or deny.
| Name | Behavior |
|---|---|
look |
Returns the selected frame and JSON metadata. With changed_since, returns text-only changed:false when the dHash is within the configured threshold. |
describe_source |
Returns source kind, label, dimensions, mask count, and frame policy without capturing an image. |
wait_for_change |
Long-polls for up to 120 seconds and returns one frame only after a meaningful visual change. |
list_elements |
Lists accessible controls of the interaction-enabled window with opaque refs and payload-pixel bounds. |
read_text |
Reads an allowed UIA element or OCRs a redacted payload-pixel region. |
click |
Invokes an allowed UIA element or clicks a scoped payload-pixel point; from Read-only it may wait for a human mode decision. |
type_text |
Replaces an allowed field value or sends scoped keystrokes; from Read-only it may wait for a human mode decision. |
screen://current |
Reads a forced current frame through the same crop, mask, resize, and encoding pipeline. |
Agents should retain the returned hash, prefer wait_for_change for watching an app, and stop calling immediately when ScreenMCP reports capture_stopped or no_source. capture_stopped means access is Off; the human must switch to Read-only or Interactive before another screen call. Ready-made instructions live in the Claude skill and the Codex skill.
- The server binds only to
127.0.0.1and requires a random 48-character bearer token. endpoint.jsonand settings are written atomically under~/.screenmcp; files use mode0600where the OS supports POSIX modes.- Browser-origin requests are rejected to reduce DNS-rebinding and drive-by localhost attacks.
- Raw captured pixels stay in memory. Only post-redaction audit JPEGs capped at 960×600 are written to disk, with configurable retention and a local viewer.
- Off and STOP share one global gate that blocks every screen and control operation while MCP clients may remain connected. Clearing the source closes its stream.
- Startup defaults to Read-only unless the human chooses Off in Settings. Interactive is explicit, bound to the current source, shown in amber, and revoked on source change, Off/STOP, or quit; blur and idle do not revoke it.
- On Windows, a selected parent can switch its one stream to a same-process active modal and back. This is configurable in Settings; each switch revokes Interactive and uses separate dialog masks/highlights.
- Interactive requests and audit rows use the MCP client's self-reported name as a label, not cryptographic identity; typed content is never shown in the request.
See privacy model and capture pipeline for the exact trust boundaries and ordering.
Windows uses Rectangle and Window desktop overlays plus the Whole screen monitor dialog. A selected window follows a qualifying active modal by default, even outside the parent bounds; a validated modal omitted from Electron's list uses a direct HWND fallback. Settings can disable this. Windows also supports explicitly allowed in-process UI Automation, SendInput, and offline English OCR. Elevated, custom-drawn, accessibility-disabled, minimized, protected, or suspended targets can still return incomplete or stale frames.
On macOS, Screen Recording approval requires a relaunch. Version 0.1 is unsigned. If Gatekeeper quarantines the downloaded app:
xattr -cr /Applications/ScreenMCP.appOn Wayland, the system portal owns source selection; ScreenMCP intentionally hides custom desktop pickers. One selected stream remains open across requests. Electron does not expose the portal restore token, so clearing the source or restarting the app opens the picker again. X11 retains the in-app pickers.
More detail: platform notes.
npm run lint
npm run typecheck
npm test
npm run buildnpm run check runs all four. Desktop capture has exactly one automated end-to-end test, run on Linux/X11 under Xvfb with npm run test:capture; platform-specific behavior is covered by the manual smoke checklist.
Key design documents:
- Architecture overview
- Access modes
- Capture pipeline
- Active modal dialog following
- Privacy model
- Interactive control
- Interactive escalation
- Platform notes
- Releases and updates
ScreenMCP deliberately excludes video/streaming output, model-driven source selection, multi-source capture, region-follow-window behavior, auto-pause on screen lock, non-Windows interactive control, elevated-window control, and code signing/notarization. Portable Windows and unsigned macOS builds update manually.
See CONTRIBUTING.md before opening a pull request. Report vulnerabilities through GitHub private vulnerability reporting, not a public issue. Third-party runtime licenses are inventoried in THIRD-PARTY.md.



