npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

watchtower-mcp

v0.2.0

Published

Cost tracking + deep security scanning (live RLS cross-tenant probe, leaked-key verification) for AI builders. MCP server for Claude Code.

Readme

Watchtower MCP

Cost tracking + deep security scanning for AI builders. An MCP server for Claude Code.

Watchtower runs alongside your AI coding agent and answers two questions: what am I spending? and is the app I just vibe-coded actually safe to ship? Unlike existence-only scanners, Watchtower proves its security findings — it runs a live cross-tenant probe against your database and verifies whether leaked keys actually work.

Everything runs locally. No data leaves your machine except (a) the optional, opt-in live-key check, which contacts only each key's own vendor, and (b) the database connection you point the RLS audit at.

Install

npm install -g watchtower-mcp

Add to your Claude Code MCP config (~/.claude/settings.json):

{
  "mcpServers": {
    "watchtower": {
      "command": "watchtower-mcp"
    }
  }
}

Restart Claude Code. You now have 9 tools available.

Tools

Cost Tracking

| Tool | What it does | |------|-------------| | watchtower_sync_usage | Import real token usage automatically from Claude Code's own session logs (~/.claude/projects). Accurate, no manual logging. Run it anytime — already-imported events are skipped. | | watchtower_spend | View spending (today / week / month, calendar-aligned) with per-model breakdown and how much is estimated | | watchtower_budget | Set daily/weekly/monthly budget alerts (warns at 80% and 100%) | | watchtower_log_usage | Manual fallback for non-Claude-Code clients. Prefer sync_usage. |

Security Scanning

| Tool | What it does | |------|-------------| | watchtower_scan_secrets | Scan source for hardcoded keys/tokens (pure-Node, no shell). Pass verify: true to confirm which keys are actually live via a read-only call to each vendor. | | watchtower_scan_supabase | Audit Postgres/Supabase RLS correctness — runs a live, read-only cross-tenant probe to prove whether a random user or the anonymous role can read other users' data. Not just "does RLS exist." | | watchtower_scan_headers | Scan a deployed URL for missing security headers (CSP, HSTS, X-Frame-Options, etc.) |

Dashboard

| Tool | What it does | |------|-------------| | watchtower_status | Quick overview of spending + recent security findings | | watchtower_scan_history | History of past security findings (de-duplicated) |

Usage

Once installed, just ask Claude:

"Sync my Claude Code usage and show this month's spend"
"Scan my project for hardcoded secrets and check if any are live"
"Audit my Supabase database — can other users read my data?"
"Check the security headers on https://myapp.vercel.app"
"Set a $5 daily budget alert"

How It Works

  • Cost trackingwatchtower_sync_usage parses Claude Code's transcript logs (the actual billed token counts) and stores them in a local SQLite database at ~/.watchtower/watchtower.db. Costs are computed from a current pricing table; unknown models are clearly labelled estimated rather than silently mispriced. Spend windows are calendar-aligned (UTC) to reconcile with your Anthropic bill.
  • Secret scanning — runs entirely in-process (no shell), with overlap de-duplication, placeholder/entropy filtering to cut false positives, and secret redaction in all output. With verify: true, each detected key gets a single read-only verification request to its own vendor (Anthropic/OpenAI/Stripe/GitHub) or a local JWT decode (Supabase) — so you learn which leaks are real.
  • RLS correctness — connects with the pg driver (credential stays in-process), then inside read-only, rolled-back transactions it drops to the authenticated and anon roles and attempts to read each table. A row visible to a random non-owner or to the anon role is a proven cross-tenant leak — the CVE-2025-48757 class of breach. Findings backed by a live read are marked [PROVEN].

Security

Watchtower holds itself to the standard it scans for:

  • No shell is invoked anywhere. The secret scanner reads files directly; the RLS audit uses the pg driver, never psql. Caller-supplied paths and connection strings cannot inject commands, and your database password is never placed on a command line.
  • Detected secrets are redacted in all output and are never written to the database.
  • Live-key verification is opt-in (verify: true) and contacts only each key's own vendor over read-only endpoints.

Supported Models

Claude Opus 4.6, Sonnet 4.6, Haiku 4.5, and Sonnet 3.5. Unknown models are priced as an explicit estimate (Sonnet rates) and flagged as such.

Requirements

  • Node.js 18+
  • Claude Code (or any MCP-compatible client)
  • For the RLS audit: a Postgres/Supabase connection string with permission to read schema and (ideally) the authenticated/anon roles. No psql install required.

Development

npm install
npm run build
npm test

License

MIT