OpenScreenShot
OfficialThis server provides one MCP tool, capture_screenshot, for taking PNG screenshots of public web pages locally via system Chrome.
Capture a URL as a PNG image returned to the MCP client
Set viewport width (200–3840) and height (200–2160)
Capture the full scrollable page or just the viewport
Redact elements by CSS selector, text patterns (
email,phone,secret), or pixel rectangles before captureRun locally with no hosted service, API key, or account; redacted pixels never enter the image
openscreenshot
Website screenshots from your terminal, your CI, or your AI agent.
A local CLI and MCP server. It drives the Chrome already on your machine. No hosted service. No API key. No account.
Website · CLI guide · MCP guide · Report a bug
Quick start
npx openscreenshot shot https://example.com --out example.png --fullThat opens a headless Chrome, loads the page, saves a full-page PNG, and closes the browser.
You need: Node.js 22.12 or newer, and Google Chrome, Chromium, or Microsoft Edge. The package ships no browser of its own, so the install stays small.
Package manager | Run once | Install globally |
npm |
|
|
pnpm |
|
|
Bun |
|
|
Install globally to use the openscreenshot command everywhere. For CI, add it to the
project instead (npm i -D openscreenshot), so each run uses the version in your lockfile.
Related MCP server: PagePixels Screenshots MCP Server
CLI
openscreenshot shot <url> [--out <file>|-] [--full] [--width <n>] [--height <n>]
[--redact <selector>]... [--redact-pattern <name>]... [--redact-rect <x,y,w,h>]...
openscreenshot serveOption | Default | What it does |
| required | The page to capture. Use a full URL with |
|
| Where to write the PNG. Use |
| off | Capture the whole scrollable page, not only the viewport. |
|
| Viewport width in pixels, from 200 to 3840. |
|
| Viewport height in pixels, from 200 to 2160. |
| none | Cover the elements that match a CSS selector. Repeat for more. |
| none | Cover text that matches |
| none | Cover a rectangle, in pixels of the output image. Repeat for more. |
Examples
# Full page
openscreenshot shot https://example.com --out page.png --full
# Fixed desktop viewport
openscreenshot shot https://example.com --out desktop.png --width 1440 --height 900
# Narrow viewport to check a responsive layout
openscreenshot shot https://example.com --out narrow.png --width 390 --height 844
# Pipe the PNG to another tool
openscreenshot shot https://example.com --out - > shot.png
# Cover the account menu, every email address, and a 200x40 area at the top left
openscreenshot shot https://example.com --out safe.png --redact "#account-menu" --redact-pattern email --redact-rect 0,0,200,40See Redaction for how it works and what it can miss.
The output is always PNG. A .jpg or .pdf file name does not convert it.
A narrow viewport changes the layout width only. The CLI keeps a desktop user agent, so it does not emulate a phone's touch input or pixel ratio.
Exit codes
Code | Meaning |
| The PNG was written. |
| The capture failed, for example Chrome not found or a timeout. |
| Bad usage or an option out of range. |
Exit code 0 means the browser saved an image. It does not prove that the page loaded
correctly, so look at the PNG for error pages or loading spinners.
MCP server
openscreenshot with no arguments on a piped stdin starts a
Model Context Protocol server over stdio, which is how an MCP
client runs it. openscreenshot serve does the same and stays for existing configs. Your AI
client starts it as a local process; there is no URL to enter.
Add it to your client
Clients that use an mcpServers object (Claude Desktop, Cursor, Windsurf, and others):
{
"mcpServers": {
"openscreenshot": {
"command": "npx",
"args": ["-y", "openscreenshot"]
}
}
}Claude Code:
claude mcp add openscreenshot -- npx -y openscreenshotRestart or reload the client after you save the config. The client must find npx (or
pnpm, bunx) on its PATH.
Tool: capture_screenshot
Input | Type | Default | Notes |
| string | — | Required. A full page URL. |
| boolean |
| Capture the whole page. |
| integer |
| 200 to 3840. |
| integer |
| 200 to 2160. |
| object | — | Optional. See below. |
{ "url": "https://example.com", "fullPage": true, "width": 1440, "height": 900 }redact has three optional lists:
Field | Type | What it covers |
| string[] | Elements that match each CSS selector. |
| ( | Matching text in the page and in form values. |
|
| Rectangles, in pixels of the output image. |
{
"url": "https://example.com",
"redact": {
"selectors": ["#account-menu"],
"patterns": ["email", "secret"],
"rects": [{ "x": 0, "y": 0, "width": 200, "height": 40 }]
}
}The tool returns the PNG as MCP image content (image/png). It does not write a file. To
save a named file, use the CLI.
Redaction
Redaction puts black boxes over the targets in the page, and then takes the screenshot. The unredacted pixels never get into the PNG, so they never get to your MCP client or to a hosted model.
Selectors. The box covers the element and all of its children. If a selector matches no element, or is not valid CSS, the capture fails.
Patterns.
emailfinds email addresses.phonefinds numbers with 9 to 15 digits.secretfinds common API key and token shapes (OpenAI, Anthropic, Stripe, GitHub, AWS, Slack, Google, JWT). It also finds any run of 32 or more letters, digits, and underscores that has both a letter and a digit, such as a hash. Patterns look in text and in the values ofinput,textarea, andselectfields.Rectangles. Use these for canvas, images, and cross-origin iframes, where selectors and patterns cannot look. A rectangle that is fully outside the image fails the capture.
When redaction is on, the tool pauses CSS animations, places the boxes, and takes the screenshot. Then it finds the targets again. If a target moved out of its box, the capture fails. A failed capture writes no file and returns no image.
Patterns can miss text. They do not find text split across elements, text drawn in a canvas or an image, or a format they do not know. They can also cover text that only looks like a match. Look at the image before you share it.
What it can and cannot capture
Each capture starts a fresh headless browser with an empty profile.
It can capture any page a signed-out visitor can see: public sites, docs, status pages, staging builds, and
localhostdev servers.It cannot see your cookies or signed-in sessions. A page behind a login shows the login screen.
It does not click, type, wait for a selector, or set cookies. Navigation waits until the network is quiet (
networkidle2), for up to 30 seconds.
For signed-in pages, annotations, or PDF export, use the OpenScreenShot browser extension for Chrome and Firefox.
Use cases
CI/CD: capture pages on every deploy for release notes, docs, or visual review. See the CI guide.
DevOps: snapshot dashboards and status pages into incident reports and runbooks from cron or a chat command.
AI agents: let an agent look at the page it just built or changed.
Troubleshooting
Chrome not found. The CLI checks the standard install paths on macOS, Linux, and
Windows. If your browser is somewhere else, set CHROME_PATH to the executable file:
CHROME_PATH=/usr/bin/chromium openscreenshot shot https://example.comOn Windows, Chrome installed for one user lives under %LOCALAPPDATA%, and Edge is not
probed. Set CHROME_PATH for both. In an MCP client, set CHROME_PATH in the server's
env block.
A script hangs on openscreenshot with no arguments. With no arguments and a piped stdin,
the command starts the MCP server and waits for a client. It prints one line to stderr that says
so. Run openscreenshot shot <url> for a capture.
Timeout. The page did not go quiet within 30 seconds. Pages with long-polling or streaming connections can do this.
Blank or half-loaded image. Some pages render after the network goes quiet. The CLI has no extra wait option yet.
Privacy and security
Everything runs on your machine. The package sends no telemetry and calls no OpenScreenShot server.
In MCP mode, your client receives the image. If the client uses a hosted model, it may send the image to that model's provider. Use
redactto cover data before the image leaves the tool.The headless browser runs with
--no-sandboxso it works in containers and CI. Capture only URLs you trust.
Links
Source:
mcp/in PGHQdev/OpenScreenShotBrowser extension: Chrome Web Store · Firefox Add-ons
Support the project: ko-fi.com/pghqdev
MIT © OpenScreenShot @PGHQdev
Available Tools
1 toolcapture_screenshotAInspect
Capture a PNG screenshot of a public web page locally via the system Chrome. Use redact to cover elements, text patterns, or rectangles with black boxes before the screenshot is taken. The capture fails with no image if a selector matches nothing or the page changes during the capture.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| width | No | ||
| height | No | ||
| redact | No | ||
| fullPage | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden and does well: it discloses that capture is local via system Chrome, that redaction is applied before the shot is taken, and two concrete failure modes (unmatched selector, page changing mid-capture). It stops short of describing the return payload (image bytes, file path, or base64) and viewport defaults.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, front-loaded with the core action, then redaction, then failure semantics. Every sentence earns its place with no repetition of schema or name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No annotations and no output schema, so the description is the only source of behavioral context; it covers failure modes and redaction ordering but omits what the tool returns and how results are delivered. For a 5-parameter tool with a nested object, that leaves a real gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Top-level schema coverage is 0%, so the description must compensate; it explains the redact concept (elements, text patterns, rectangles with black boxes), which maps onto selectors/patterns/rects. It says nothing about width, height, or fullPage, leaving those parameters to be inferred from names and constraints alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description gives a specific verb (Capture), resource (a public web page), output format (PNG screenshot), and mechanism (locally via the system Chrome). There are no sibling tools to differentiate from, and an agent knows exactly what this tool produces.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explains how to use the redact parameter and states the conditions under which capture fails, which is useful operational guidance. However, it gives no explicit when-to-use/when-not-to-use framing or prerequisites (e.g. page must be publicly reachable), so usage is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v2.5.1- First observed
capture_screenshot
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusing it with another; its purpose (capture a PNG screenshot of a URL with optional redaction) is unambiguous.
The single name capture_screenshot follows a clean verb_noun snake_case convention, and nothing in the set deviates from it.
A one-tool server is defensible for a narrow, focused purpose, but it sits at the thin end of the scale with no batching, waiting, or alternate-output operations.
Core capture with redaction is covered, but the surface omits common needs such as full-page vs viewport control, wait/ready conditions, custom headers, cookies/auth, and alternate formats like PDF, leaving plausible agent requests unserved.
Maintenance
Related MCP Connectors
Screenshot API for AI agents. Any public page as image or PDF, banners hidden, 227 countries.
Screenshot, PDF and Open Graph image API for AI agents: capture pages, render PDFs, make OG images.
Screenshot any web page, or read it as clean Markdown, with consent banners, ads and popups removed.
Screenshot any public web page from an AI agent. Free without signup, or with an API key.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to capture screenshots of web pages using automated browser sessions. Supports full-page and element-specific screenshots, device simulation, and JavaScript execution for comprehensive web testing and monitoring.615 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to capture website screenshots, automate browser interactions, and manage recurring screenshot configurations across 150+ global locations. It also supports AI-powered domain research and visual change monitoring for any web page.8 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables capturing high-quality webpage screenshots, specific DOM elements, and timed screencasts, with automatic full-page tiling into 1072x1072 chunks and animated WebP export for AI vision workflows.-
- AlicenseNot gradedqualityAmaintenanceEnables fast, high-quality screenshot capture of web pages with automatic tiling into 1072x1072 chunks optimized for AI vision workflows. It also supports capturing specific DOM elements and recording screencasts as animated WebP files.MIT