Snapgrab

السجل الرسمي الذكاء الاصطناعي والوكلاء

URL to screenshot with metadata. Python MCP server. Claude Vision optimized.

ماذا يمكنك أن تفعل مع Snapgrab؟

  • 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

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

PYPI package snapgrab
Claude Code
claude mcp add snapgrab -- uvx snapgrab==0.1.0
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "snapgrab": {
            "command": "uvx",
            "args": [
                "snapgrab==0.1.0"
            ]
        }
    }
}

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. Snapgrab
  2. Features
  3. Install
  4. Usage
  5. How It Works
  6. CaptureResult
  7. Used in
  8. License

Snapgrab

[]()

한국어 문서 · llms.txt

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 estimate
  • capture_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

MIT


Part of the QuartzUnit ecosystem — composable Python libraries for data collection, extraction, search, and AI agent safety.

الأسئلة الشائعة

ما هو Snapgrab؟

URL to screenshot with metadata. Python MCP server. Claude Vision optimized.

كيف أثبّت Snapgrab؟

يعمل على جهازك. في Claude Code: claude mcp add snapgrab -- uvx snapgrab==0.1.0. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج Snapgrab إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل Snapgrab مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون Snapgrab؟

ينشره QuartzUnit. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.