pypi snapgrabstdioMITupdated 4mo ago
URL to screenshot with metadata. Claude Vision optimized.
What can you do with Snapgrab?
Snapgrab
URL to screenshot with metadata. Claude Vision optimized.
from snapgrab import capture
result = await capture("https://example.com")
print(result.path) # /tmp/snapgrab/example_com_desktop_20260317_120000.png
print(result.metadata.title) # "Example Domain"
print(result.vision_tokens) # ~2764
Features
- Screenshot capture β PNG, JPEG, PDF with full-page support
- Page metadata β title, description, Open Graph tags, favicon, HTTP status
- Claude Vision optimized β auto-resize to 1568px, token cost estimation
- Viewport presets β desktop (1920x1080), tablet (768x1024), mobile (375x812)
- MCP server included β 3 tools for Claude Code / MCP clients
- Element capture β screenshot specific CSS selectors
- Dark mode β force light/dark color scheme
Install
pip install snapgrab
First run will prompt to install Playwright browsers:
playwright install chromium
Usage
Python API
import asyncio
from snapgrab import capture
async def main():
# Basic screenshot
result = await capture("https://example.com")
# Mobile viewport, full page
result = await capture("https://example.com", viewport="mobile", full_page=True)
# Dark mode, JPEG format
result = await capture("https://example.com", dark_mode=True, format="jpeg")
# Specific element
result = await capture("https://example.com", selector="#main-content")
# Custom viewport
result = await capture("https://example.com", viewport=(1440, 900))
asyncio.run(main())
CLI
snapgrab https://example.com # basic PNG
snapgrab https://example.com -v mobile -f # mobile, full page
snapgrab https://example.com --format jpeg -q 90 # JPEG quality 90
snapgrab https://example.com -s "#hero" --dark-mode # element + dark mode
snapgrab https://example.com -j # JSON output
snapgrab meta https://example.com # metadata only
MCP Server
pip install "snapgrab[mcp]"
snapgrab-mcp # starts stdio MCP server
Tools:
capture_screenshotβ capture URL with metadata and vision token estimatecapture_comparisonβ compare desktop vs mobile (or any viewports)extract_page_metadataβ metadata only, no screenshot
How It Works
flowchart LR
A["π URL"] --> B["Playwright\nlaunch browser"]
B --> C["πΈ Screenshot\nfull page / viewport"]
C --> D["Resize for\nClaude Vision"]
D --> E["β
Image +\nMetadata"]
CaptureResult
result.path # saved file path
result.format # "png", "jpeg", "pdf"
result.width # viewport width
result.height # page height (full_page) or viewport height
result.file_size # bytes
result.vision_tokens # estimated Claude Vision token cost
result.vision_path # path to Vision-optimized image (β€1568px)
result.processing_time_ms
result.metadata.title
result.metadata.description
result.metadata.og_title
result.metadata.og_image
result.metadata.favicon_url
result.metadata.status_code
result.metadata.url # final URL after redirects
Used in
- watchdeck β Web page monitoring with visual diffs and safety guards
License
Part of the QuartzUnit ecosystem β composable Python libraries for data collection, extraction, search, and AI agent safety.
Install
Add Snapgrab to your client. Pick the one you use.
claude mcp add snapgrab -- uvx snapgrabcodex mcp add snapgrab -- uvx snapgrabamp mcp add snapgrab -- uvx snapgrab{
"mcpServers": {
"snapgrab": {
"command": "uvx",
"args": [
"snapgrab"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"snapgrab": {
"command": "uvx",
"args": [
"snapgrab"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"snapgrab","command":"uvx","args":["snapgrab"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"snapgrab": {
"command": "uvx",
"args": [
"snapgrab"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"snapgrab": {
"command": "uvx",
"args": [
"snapgrab"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"snapgrab": {
"command": "uvx",
"args": [
"snapgrab"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"snapgrab": {
"type": "local",
"command": "uvx",
"args": [
"snapgrab"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"snapgrab": {
"command": {
"path": "uvx",
"args": [
"snapgrab"
]
}
}
}
}Add to your Zed `settings.json`.
uvx snapgrabRun `goose configure`, choose **Add Extension β Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation20/25
- Maintenance13/25
- Trust16/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 139 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint β no local install
Version history
| Versions | Published |
|---|---|
| 0.1.0Latest | Mar 17, 2026 |