Diffgrab

io.github.ArkNillPublished by GitHub account ArkNillv0.1.0Updated Oct 24, 2026

Web page change tracking with structured diffs. markgrab + snapgrab integration.

VerifiedSTDIODesktop onlyWeb Search & ScrapingData & Analytics

Overview

AI-generated overview

Tracks web pages for content changes and returns structured diffs, section-level analysis, and snapshot history.

What you can do
Diffgrab registers URLs for change tracking, fetches and stores baseline snapshots, then detects changes by content hashing. It produces unified diffs, section-level analysis of which headings changed, and human-readable summaries such as line counts added or removed. Five MCP tools cover tracking a URL, checking changes, getting a diff between snapshots, browsing snapshot history, and stopping tracking. Snapshots are kept in a local SQLite database.
When to use it
Use it when an assistant needs to monitor pages for updates, summarize what changed on a page since a previous visit, or compare two versions of the same URL. It suits documentation, news, or policy pages where changes matter and a plain fetch would not show what moved.
Requirements
Runs locally as a Python package installed from PyPI (pip install diffgrab, with optional extras for CLI, visual diff, and MCP). The MCP server is started via the diffgrab-mcp command or uvx. It needs network access to fetch tracked URLs and writes snapshots to a local SQLite file, by default under the user's data directory. No accounts, API keys, or environment variables are declared.
Before you install
It fetches the URLs you ask it to track, so those requests and the page content reach the target sites and are stored locally in the SQLite snapshot database. Tracking and untracking change stored state, and the database keeps past page versions that may include sensitive content. Optional visual diff pulls in the snapgrab package.

Installation

In SourceWeft

  1. Open Diffgrab in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

diffgrab

[PyPI] [Python] [License]

한국어 문서 · llms.txt

Web page change tracking with structured diffs. markgrab + snapgrab integration, MCP native.

python
from diffgrab import DiffTracker
tracker = DiffTracker()await tracker.track("https://example.com")changes = await tracker.check()for c in changes:    if c.changed:        print(c.summary)     # "3 lines added, 1 lines removed in sections: Introduction."        print(c.unified_diff) # Standard unified diff outputawait tracker.close()

Features

  • Change detection — track any URL, detect content changes via content hashing
  • Structured diffs — unified diff + section-level analysis (which headings changed)
  • Human-readable summaries — "5 lines added, 2 removed in sections: Intro, Methods"
  • Snapshot history — SQLite storage, browse past versions of any page
  • markgrab powered — HTML/YouTube/PDF/DOCX extraction via markgrab
  • Visual diff — optional screenshot comparison via snapgrab
  • MCP server — 5 tools for Claude Code / MCP clients
  • CLI included — diffgrab track, check, diff, history, untrack

How It Works

mermaid
flowchart TD    A["diffgrab track URL"] --> B["Fetch initial snapshot\n(markgrab + snapgrab)"]    B --> C["Store baseline"]    C --> D["diffgrab check"]    D --> E["Fetch current page"]    E --> F{"Content\nhash match?"}    F -->|"changed"| G["Compute structured diff\n+ section analysis"]    F -->|"unchanged"| H["No changes"]    G --> I["📊 DiffResult\nadded / removed / modified"]

Install

bash
pip install diffgrab

Optional extras:

bash
pip install 'diffgrab[cli]'      # CLI with click + richpip install 'diffgrab[visual]'   # Visual diff with snapgrabpip install 'diffgrab[mcp]'      # MCP server with fastmcppip install 'diffgrab[all]'      # Everything

Usage

Python API

python
import asynciofrom diffgrab import DiffTracker
async def main():    tracker = DiffTracker()
    # Track a URL (takes initial snapshot)    await tracker.track("https://example.com", interval_hours=12)
    # Check for changes    changes = await tracker.check()    for change in changes:        if change.changed:            print(change.summary)            print(change.unified_diff)
    # Get diff between specific snapshots    result = await tracker.diff("https://example.com", before_id=1, after_id=2)
    # Browse snapshot history    history = await tracker.history("https://example.com", count=20)
    # Stop tracking    await tracker.untrack("https://example.com")
    await tracker.close()
asyncio.run(main())

Convenience Functions

python
from diffgrab import track, check, diff, history, untrack
await track("https://example.com")changes = await check()result = await diff("https://example.com")snaps = await history("https://example.com")await untrack("https://example.com")

CLI

bash
# Track a URLdiffgrab track https://example.com --interval 12
# Check all tracked URLs for changesdiffgrab check
# Check a specific URLdiffgrab check https://example.com
# Show diff between snapshotsdiffgrab diff https://example.comdiffgrab diff https://example.com --before 1 --after 3
# View snapshot historydiffgrab history https://example.com --count 20
# Stop trackingdiffgrab untrack https://example.com

MCP Server

Add to your Claude Code MCP config:

json
{  "mcpServers": {    "diffgrab": {      "command": "diffgrab-mcp",      "args": []    }  }}

Or with uvx:

json
{  "mcpServers": {    "diffgrab": {      "command": "uvx",      "args": ["--from", "diffgrab[mcp]", "diffgrab-mcp"]    }  }}

MCP Tools:

ToolDescription
track_urlRegister a URL for change tracking
check_changesCheck tracked URLs for changes
get_diffGet structured diff between snapshots
get_historyBrowse snapshot history
untrack_urlStop tracking a URL

DiffResult

Every diff operation returns a DiffResult:

python
@dataclassclass DiffResult:    url: str                           # The tracked URL    changed: bool                      # Whether content changed    added_lines: int                   # Lines added    removed_lines: int                 # Lines removed    changed_sections: list[str]        # Markdown headings with changes    unified_diff: str                  # Standard unified diff    summary: str                       # Human-readable summary    before_snapshot_id: int | None     # DB ID of older snapshot    after_snapshot_id: int | None      # DB ID of newer snapshot    before_timestamp: str              # When older snapshot was taken    after_timestamp: str               # When newer snapshot was taken

Storage

Snapshots are stored in SQLite at ~/.local/share/diffgrab/diffgrab.db (auto-created). Custom path:

python
tracker = DiffTracker(db_path="/path/to/custom.db")

QuartzUnit Ecosystem

PackageRolePyPI
markgrabHTML/YouTube/PDF/DOCX to markdownpip install markgrab
snapgrabURL to screenshot + metadatapip install snapgrab
docpickOCR + LLM document extractionpip install docpick
feedkitRSS feed collectionpip install feedkit
diffgrabWeb page change trackingpip install diffgrab
browsegrabBrowser agent for LLMsComing soon

Used in

  • newswatch — RSS news monitoring pipeline (feedkit → markgrab → embgrep → diffgrab)
  • 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.

Source: README.md at commit eb46df9

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts