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

toolfence

v0.3.0

Published

Security scanner for MCP servers. Point it at any Model Context Protocol server and get a severity-ranked security report.

Readme

toolfence

npm version CI License: Apache 2.0

Security scanner for MCP servers. Point it at any Model Context Protocol server and get a severity-ranked report of the risks your agents inherit by connecting to it.

npx toolfence https://your-server.example.com/mcp
  toolfence — scan report
  target:  https://your-server.example.com/mcp
  server:  acme-tools v1.4.0 (http)
  tools:   22

  CRIT  Injection signature in tool definition  [fetch_doc]
        Tool "fetch_doc" contains language matching: instruction override.
        Tool descriptions are fed verbatim into the agent's context — this is
        a tool-poisoning vector.
  HIGH  No authentication required
  HIGH  Tool definition changed since baseline  [search]
  MED   Large tool catalog
  ...
  summary: 1 critical  2 high  1 medium  4 low  6 info

Exit code is non-zero when high/critical findings exist, so it drops straight into CI.


Why

OAuth authenticated your agents. It didn't make them safe. The MCP spec settled authentication (OAuth 2.1 for HTTP transports) — but that's roughly 20% of the threat surface. The other 80% lives in what the tools do and what their definitions say:

  • Tool poisoning — a malicious server ships a tool description that instructs the agent to read your secrets or ignore prior instructions. The agent reads it and complies.
  • Indirect prompt injection — adversarial text smuggled into tool definitions or schemas.
  • Silent tool drift — a server changes a tool definition after you trusted it.
  • Context-cost runaway — a bloated tool catalog that's prepended to every agent turn.
  • Over-broad capability — tools that touch the filesystem, execute code, or reach the network with no scoping.

toolfence is the open-source scanner that surfaces these before you connect an agent to a server.

Install

Run without installing:

npx toolfence <url>

Or install globally:

npm install -g toolfence
toolfence <url>

Usage

# Remote server (Streamable HTTP, falls back to SSE)
toolfence https://example.com/mcp

# Authenticated server
toolfence https://example.com/mcp --bearer "$TOKEN"

# Local stdio server (everything after --stdio is the command)
toolfence --stdio npx -y @modelcontextprotocol/server-everything

# Machine-readable output for CI / dashboards
toolfence https://example.com/mcp --json
toolfence https://example.com/mcp --markdown -o report.md

Options

| Flag | Description | |------|-------------| | --bearer <token> | Bearer token for authenticated servers | | --json | Emit machine-readable JSON | | --markdown, --md | Emit a Markdown report | | -o, --out <file> | Write the report to a file | | --no-baseline | Don't read/write the drift-detection baseline | | --no-color | Disable ANSI colors | | -h, --help | Show help |

Exit codes

| Code | Meaning | |------|---------| | 0 | No high/critical findings | | 1 | At least one high or critical finding | | 2 | Scan could not run (connection / usage error) |

What it checks (12)

| Check | What it catches | |-------|-----------------| | Authentication posture | HTTP server that lists tools with no credentials | | Transport security | Plaintext HTTP for non-local endpoints | | Prompt-injection signatures | Adversarial instructions embedded in tool definitions | | Known-bad signatures | Documented MCP abuse patterns (secret-file reads, rug-pulls, cross-tool shadowing, exfiltration-to-external, obfuscated payloads) | | Tool integrity / drift | Tool definitions that changed since the last scan | | Context cost | Tool catalogs large enough to inflate every agent turn | | Rate-limit posture | No server-side ceiling on call volume | | Naming hygiene | Duplicate or collision-prone generic tool names | | Sensitive capability | Tools that reach the filesystem, execute code, or touch the network | | Schema strength | Missing, untyped, or unsealed input schemas | | Safety annotations | Tools lacking readOnlyHint / destructiveHint so writes can't be gated | | Unicode hygiene | Zero-width / bidi / homoglyph characters used to hide instructions or spoof trusted tools |

The known-bad signature set is community-extensible — see CONTRIBUTING.

Drift detection

The first scan of a target records a fingerprint of every tool definition under ~/.toolfence/baselines/. Subsequent scans of the same target compare against it and flag any tool whose definition changed, appeared, or disappeared — the core signal for catching a server that turns malicious after you trusted it. Run it in CI to fail the build on unexpected drift.

Roadmap

v0.1 is the open-source scanner. It's the front end of a larger effort: a hosted security & governance gateway that sits in front of your MCP servers and enforces these properties at runtime — output sanitization, per-call scope reduction, behavioral guardrails (rate/cost ceilings), capability-based sub-agent delegation, and replayable audit. The scanner tells you what's wrong; the gateway stops it in production.

License

Apache 2.0.