Snag Watcher

Getting started

SDKs, CLI and MCP

The clients aren't on npm or PyPI yet. Until they are, call the API with curl, fetch or requests, like in the quickstart.

TypeScript

JavaScript
import { SnagWatcher, verifyWebhook } from 'snag-watcher';

const snag = new SnagWatcher({ apiKey: process.env.SNAG_KEY }); const preview = await snag.watchers.preview(request); const watcher = await snag.watchers.create(request); for await (const run of snag.watchers.runsAll(watcher.watcher_id)) console.log(run.run_at, run.summary);

Errors throw a SnagWatcherError with status, code, field, errors, suggestion and retryAfter. verifyWebhook({ secret, rawBody, signature }) checks a webhook signature.

Python

Python
from snag_watcher import SnagWatcher, verify_webhook

snag = SnagWatcher() # reads SNAG_KEY preview = snag.watchers.preview(request) watcher = snag.watchers.create(request) for run in snag.watchers.runs(watcher["watcher_id"])["data"]: print(run["run_at"], run["summary"])

It needs Python 3.9 or later and only the standard library. Errors raise a SnagWatcherError.

CLI

The TypeScript package also installs a snag-watcher command:

Shell
export SNAG_KEY=sw_...
snag-watcher watch preview watch.json
snag-watcher watch create watch.json
snag-watcher watch runs wch_dhjqcvaqnhrchsnv7gtc
snag-watcher watch test-webhook wch_dhjqcvaqnhrchsnv7gtc
snag-watcher usage

MCP server

snag-watcher-mcp lets coding assistants like Claude Code, Claude Desktop or Cursor preview, create and read watchers with your key. It tells them to preview before creating. This command will work once the package is on npm:

Shell
claude mcp add snag-watcher -e SNAG_KEY=sw_... -- npx snag-watcher-mcp

llms.txt

/llms.txt lists every docs page, and /llms-full.txt has all of them in one Markdown file you can paste into a model's context.