Snapgrab

io.github.ArkNill由 GitHub 帳號 ArkNill 發布v0.1.0更新於 Oct 24, 2026

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

概覽

AI 產生的概覽

Snapgrab 讓助理截取網頁截圖並附上頁面中介資料,支援視埠預設與 Claude Vision 權杖估算。

可以做什麼
Snapgrab 是本地 Python MCP 伺服器,用 Playwright 算繪 URL,回傳截圖與頁面中介資料。工具包括 capture_screenshot(截圖並附中介資料與視覺權杖估算)、capture_comparison(比較桌面與行動版或其他視埠),以及 extract_page_metadata(僅中介資料,不截圖)。支援 PNG、JPEG、PDF 輸出、整頁截圖、以 CSS 選擇器擷取元素、深色模式,並自動縮放至 1568px 以配合 Claude Vision。
適用情境
適合助理需要查看或核對網頁外觀、比較響應式版面,或在不截圖的情況下取得標題、描述、Open Graph 標籤、favicon 與 HTTP 狀態碼。可用於視覺檢查、頁面監控,以及把頁面圖像交給視覺模型。
執行需求
以 Python 套件形式透過 stdio 在本地執行(pip install snapgrab,MCP 伺服器需 snapgrab[mcp])。需要 Python 與 Playwright 的 Chromium 瀏覽器,以 playwright install chromium 安裝。僅限桌面端;未宣告帳號、API 金鑰或環境變數。
安裝前請注意
此伺服器會抓取任意 URL,因此截取的頁面及其中介資料來自第三方網站,請求會向這些網站揭露目標 URL。截圖會寫入本地磁碟(例如 /tmp/snapgrab 下)。安裝 Playwright 會下載瀏覽器二進位檔。不要求任何憑證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Snapgrab,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Snapgrab

[PyPI] [Python] [License] [Tests]

한국어 문서 · llms.txt

URL to screenshot with metadata. Claude Vision optimized.

python
from snapgrab import capture
result = await capture("https://example.com")print(result.path)           # /tmp/snapgrab/example_com_desktop_20260317_120000.pngprint(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

bash
pip install snapgrab

First run will prompt to install Playwright browsers:

bash
playwright install chromium

Usage

Python API

python
import asynciofrom 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

bash
snapgrab https://example.com                          # basic PNGsnapgrab https://example.com -v mobile -f             # mobile, full pagesnapgrab https://example.com --format jpeg -q 90      # JPEG quality 90snapgrab https://example.com -s "#hero" --dark-mode   # element + dark modesnapgrab https://example.com -j                       # JSON outputsnapgrab meta https://example.com                     # metadata only

MCP Server

bash
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

mermaid
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

python
result.path            # saved file pathresult.format          # "png", "jpeg", "pdf"result.width           # viewport widthresult.height          # page height (full_page) or viewport heightresult.file_size       # bytesresult.vision_tokens   # estimated Claude Vision token costresult.vision_path     # path to Vision-optimized image (≤1568px)result.processing_time_msresult.metadata.titleresult.metadata.descriptionresult.metadata.og_titleresult.metadata.og_imageresult.metadata.favicon_urlresult.metadata.status_coderesult.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.

來源:README.md,提交 9985f7c

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分