therealMrFunGuy/screenshot-api
Pixel-perfect website screenshots via API + MCP server
Platform-specific configuration:
{
"mcpServers": {
"screenshot-api": {
"command": "npx",
"args": [
"-y",
"screenshot-api"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
Pixel-perfect website screenshot service that captures any URL as PNG, JPEG, or PDF. Exposed as both a REST API (FastAPI) and an MCP server for use with Claude Desktop, Cursor, and other MCP-compatible clients. Uses Playwright with a pooled Chromium browser for fast, reliable rendering.
docker-compose up -dThe API will be available at http://localhost:8500.
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
bash setup_browsers.sh
python server.pyAdd to your claude_desktop_config.json:
{
"mcpServers": {
"screenshot": {
"command": "python",
"args": ["/path/to/mcp-services/screenshot-api/mcp_server.py"]
}
}
}Add to your Cursor MCP settings:
{
"mcpServers": {
"screenshot": {
"command": "python",
"args": ["/path/to/mcp-services/screenshot-api/mcp_server.py"]
}
}
}{
"mcpServers": {
"screenshot": {
"command": "uvx",
"args": ["mcp-server-screenshot"]
}
}
}POST /screenshotTake a screenshot with full control over parameters.
Request body (JSON):
| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | url | string | *required* | URL to capture | | viewport_width | int | 1280 | Viewport width (320-3840) | | viewport_height | int | 720 | Viewport height (240-2160) | | full_page | bool | false | Capture entire scrollable page | | format | string | "png" | Output: "png", "jpeg", or "pdf" | | wait_for | string | null | CSS selector to wait for | | block_cookies | bool | false | Block cookie consent banners | | inject_css | string | null | Custom CSS to inject | | delay_ms | int | 0 | Extra delay after load (0-10000) |
Example:
Loading reviews...