Screenshot anything, instantly. No Playwright. No headless browser. No 300 MB of Chromium.

A tiny Python package that shells out to the screenshot tool your operating system already has — then hands you a file, metadata, or an image for your agent. CLI, library, and MCP server in one.

os macOS · Windows · Wayland · X11deps 0python 3.9+license MIT
screenagents — zshlive
$
awaiting capture…

one capture cycle, exactly as the CLI runs it — no browser, no Playwright

A screenshot is not a rendering problem.

no browser

Chromium never enters the room

Tools that boot a browser to take a picture of your desktop are solving the wrong problem. screenagents asks the OS.

zero dependencies

The core is stdlib only

pip install screenagents pulls nothing else. The MCP server is optional and the only extra there is mcp.

native everywhere

Uses what's already installed

Twelve backends, detected at runtime, ordered by fitness — region and monitor support included. see the table.

screenagents vs. headless browser tooling

Both take pictures. Only one takes a picture of your screen without moving a browser engine into your project.

capabilityscreenagentsheadless browser tooling
Captures the actual desktopnative API/CLIrenders a page instead
Third-party dependencies0dozens
Install size~40 KB300 MB+
Works on Wayland / X11 / macOS / Windowsyeslimited
Region and monitor targetingflagsonly the page, not the screen
Usable by an LLM agentMCP tool, base64 imagevaries

Take the picture. Move on.

Full screen by default. A region, a monitor, a specific backend, JSON metadata, atomic writes — all one flag away.

terminal
$ screenagentsscreenshot-20261018-1832-a1b2c3.png $ screenagents -r 0,0,800,600 --json{ "path": "screenshot-…-77ff10.png", "backend": "scrot", "width": 800, "height": 600 } $ screenagents -m 2 -b grim --forcescreenshot-20261018-1833-77ff10.png

Twelve native backends, picked for you

Detection order is best-first and session-aware: on X11 only X11 tools are considered, on Wayland only Wayland tools, unless you force one with --backend.

region = can capture x,y,w,h · monitor = can target one display · display = can target a named output · full detail on the backends page.

Give your agent eyes

The bundled MCP server exposes capture_screenshot — it returns the PNG as base64, so a multimodal model can actually look at your screen instead of guessing.

claude desktop / cursor / any mcp client
{ "mcpServers": { "screenagents": { "command": "screenagents-mcp" }} }

Agents can ask for exactly what they need: a region, a monitor, or a named output — and decide which backend to use after reading list_screenshot_backends.

Nothing runs in the background, nothing listens on a port, and the only permission involved is the screen-recording permission your OS already enforces.

> mcp setup

Two seconds from now

install
$ pip install screenagents$ screenagents --doctorok screencapture macOS built-in screencapture(1)-- grim (no X11 or Wayland session detected)ok scrot X11 scrot $ screenagents -r 0,0,640,480screenshot-20261018-1835-0aa4de.png
what you get

one file, honestly labeled

A PNG next to you, a screenshot object in Python, or base64 in your agent's context. Dimensions parsed from the file header, bytes counted, backend recorded.

screenagents FAQ

The questions every screenshot tool page answers badly — answered honestly, with the trade-offs included.

Is screenagents a Playwright alternative?

Only for screenshots of your screen. screenagents calls the operating system's native capture tool — no browser engine is involved. If you need to render and screenshot a web page, Playwright is still the right tool.

Does screenagents work on Wayland, X11, macOS, and Windows?

Yes. Twelve native backends are detected at runtime and ranked best-first: screencapture on macOS, PowerShell on Windows, grim / scrot / maim on Linux. Detection is session-aware, so an X11-only tool is never chosen inside a Wayland session unless you force one with --backend.

How big is the install, and what are the dependencies?

The core is Python stdlib only — pip install screenagents pulls nothing else, and the MCP server is the only optional extra. No Chromium, no Playwright, no browser engine.

Can an AI agent use screenagents?

Yes. The bundled MCP server exposes capture_screenshot and returns the PNG as base64, so a multimodal model can actually look at the screen instead of guessing. Nothing runs in the background and nothing listens on a port.

What happens if no screenshot backend is installed?

screenagents --doctor explains exactly why each backend is or is not available. Captures fail with typed exceptions that carry the backend's own stderr, and atomic writes mean a failed capture never leaves a half-written PNG behind.