@youranstray.li/web-screenshot-mcp
v0.1.1
Published
MCP server for high-resolution web screenshots with device presets and scroll-position capture.
Downloads
330
Maintainers
Readme
Web Screenshot MCP
High-resolution web screenshot MCP server. Supports device presets, custom CSS viewport sizes, 1×/2×/3× output, lossless PNG or JPEG quality, full-page capture, and start/middle/end positions on vertical or horizontal scrolling content.
Install
npx -y @youranstray.li/web-screenshot-mcpInstall Chromium in advance when Playwright has no managed browser cache:
npx playwright install chromiumMCP configuration
{
"mcpServers": {
"webScreenshot": {
"command": "npx",
"args": ["-y", "@youranstray.li/web-screenshot-mcp"],
"env": {
"WEB_SCREENSHOT_ALLOWED_ROOTS": "/absolute/path/to/web-pages",
"WEB_SCREENSHOT_ALLOW_REMOTE": "false"
}
}
}
}WEB_SCREENSHOT_ALLOWED_ROOTS limits local source files. Without WEB_SCREENSHOT_OUTPUT_ROOT, local captures are written to .mcp-screenshots/ under the current workspace when the MCP client exposes one; otherwise the allowed root containing the HTML file is used. Set WEB_SCREENSHOT_OUTPUT_ROOT only when every capture must write to one fixed directory. Keep remote capture disabled unless it is needed.
Tools
list_screenshot_presetslists maintained iPad and desktop viewports.capture_web_screenshotscaptures one or more viewport/full-page screenshots. It accepts a local HTML source or explicitly enabled HTTP(S) URL, preset/custom size, scale, image format, quality, scroll axis, and scroll position.
Development
npm install
npm run check
npm test
npm run build
npm pack --dry-runPublish
npm publish --access publicTo also publish to the official MCP Registry, add an mcpName, a public GitHub repository URL, and a server.json Registry manifest before using mcp-publisher publish.
