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

perimetercli

v0.1.3

Published

Security and cost audit for your AI agent toolchain — MCP servers, hooks, skills. One command finds poisoning, dangerous capabilities, context bloat and drift, and gates CI.

Readme

Perimeter

Security and cost audit for your AI agent toolchain — MCP servers, hooks and skills.

perimeter audit

Zero runtime dependencies · Works offline · Open-core (MIT)

Node Test audit site npm license


The problem

Teams are wiring AI agents to MCP servers, Claude Code hooks, Cursor rules and Codex skills faster than they can secure or afford them. By default that means:

  • Tool poisoning — malicious instructions tucked inside a tool description that the agent blindly obeys.
  • Dangerous capability — a server that can run shell, write files, read credentials, or move money.
  • Context bloat — several large servers can eat 30k+ tokens before the agent does anything useful.
  • Silent drift — a tool changes since you last looked, and nobody notices.

What Perimeter does

One command answers three questions at once:

  1. Risk — what can each server, tool, hook and skill actually do?
  2. Cost — how much context and money do they burn per load?
  3. Change — did a tool quietly change since I last audited?
perimeter audit                 # human-readable verdict + findings
perimeter audit --enforce       # gate CI (exit 1 on a finding)
perimeter audit --json          # machine-readable
perimeter baseline              # record a signature hash for drift
perimeter cost                  # token/cost footprint only
perimeter session               # observe what agents actually ran
perimeter guard --server "npx -y @modelcontextprotocol/server-filesystem"
perimeter serve                  # preview the generated report
perimeter server                 # self-hosted fleet dashboard (Pro)
perimeter push <url>             # send an audit to a Perimeter server

Why it's different

| Risk | Perimeter | Most MCP scanners | Enterprise gateways | | --- | --- | --- | --- | | MCP servers | ✅ | ✅ | ✅ | | Claude Code hooks / settings | ✅ | ❌ | ⚠️ | | Cursor / Codex skills + AGENTS.md | ✅ | ❌ | ⚠️ | | Token & cost footprint | ✅ | ❌ | ⚠️ | | Baseline + drift detection | ✅ | ⚠️ | ⚠️ | | CI gate (--enforce) | ✅ | ⚠️ | ⚠️ | | Local · offline · zero-dep | ✅ | some | ❌ |

Install

npm install --global perimetercli

Requires Node 18+. Works on macOS, Linux and Windows.

Quick start

cd my-project
perimeter audit              # scan from the current directory
perimeter baseline           # record a baseline for drift detection
perimeter audit --enforce --fail-on high

Here's what an audit of a risky setup looks like (real output):

Perimeter — agent toolchain audit
======================================
Scanned 3 servers · 1 context file
Verdict: HIGH
  0 critical · 1 high · 2 medium · 3 low · 0 info

── Servers (3) ──
  shell-helper       MEDIUM 2 caps · 2,600 tok · .mcp.json
  paybot             HIGH 2 caps · 5,000 tok · .mcp.json
  websearch          LOW 1 caps · 2,100 tok · .mcp.json

── Findings (7) ──
  [MEDIUM] RISK-FSWRITE · Filesystem write access
      shell-helper (@modelcontextprotocol/server-filesystem) — The server can create or modify files. Ensure writes are confined to the project directory.
      Fix: Pin the working directory; deny paths outside an allowlist.
  [MEDIUM] SUP-CREDS-ENV · Secrets present in server config env
      shell-helper (@modelcontextprotocol/server-filesystem) — Credential-like env vars are configured: API_TOKEN. They may be visible in version control.
      Fix: Reference secrets from the runtime secret store; never commit them.
  [LOW] SUP-UNPINNED · Unpinned package version
      shell-helper (@modelcontextprotocol/server-filesystem) — The server is fetched at runtime (npx/uvx) without a pinned version or lockfile.
      Fix: Pin an exact version or vendor the package into the lockfile.
  [HIGH] RISK-PAYMENT · Payment / financial capability
      paybot (@stripe/mcp) — The server can initiate transactions or alter balances. Unauthorised or prompt-injected calls can move money.
      Fix: Require a human approval gate; scope keys to a read-only or sandboxed account.
  [LOW] SUP-UNPINNED · Unpinned package version
      paybot (@stripe/mcp) — The server is fetched at runtime (npx/uvx) without a pinned version or lockfile.
      Fix: Pin an exact version or vendor the package into the lockfile.
  [LOW] SUP-UNPINNED · Unpinned package version
      websearch (@modelcontextprotocol/server-brave-search) — The server is fetched at runtime (npx/uvx) without a pinned version or lockfile.
      Fix: Pin an exact version or vendor the package into the lockfile.
  [HIGH] INJECT-002 · Suspicious instructions in agent context file
      AGENTS.md — Embedded instruction phrasing detected in AGENTS.md. An agent reads this text every session, so it can redirect behaviour.
      Fix: Review the file and remove embedded instruction phrasing; consider pinning or signing it.

── Cost ──
  model claude-sonnet · ~9,700 tokens/load · $0.10/load

What it detects (OWASP Agentic-aligned)

  • INJECT-001 — tool poisoning / prompt injection in tool metadata
  • INJECT-002 — suspicious instructions in AGENTS.md/CLAUDE.md/skills
  • SECRET-LEAK — a credential-looking value in an agent context file
  • HOOK — risky Claude Code hooks (arbitrary code on tool use / session start)
  • RISK-SHELL / RISK-EXFIL / RISK-PAYMENT / RISK-CREDS / RISK-CLOUD
  • RISK-FSWRITE — filesystem writes
  • SUP-TYPOSQUAT — package names one edit from a well-known server
  • SUP-UNVERIFIED / SUP-UNPINNED / SUP-CREDS-ENV — supply-chain concerns
  • TOK-BLOAT — a server whose tool schemas eat too much context
  • DRIFT-NEW / DRIFT-CHANGED — new or mutated servers vs. your baseline

perimeter session goes further: it reads your actual agent session logs and reports what was really called (Bash ×3, Write ×1…), with exact token spend when the log records it.

See a full example audit report — a deliberately risky toolchain (shell server, curl-piped hook, injected rules, credential-sniffing skill) audited to a CRITICAL verdict with remediation for every finding.

Runtime guard

perimeter guard proxies a real MCP server and blocks risky tool calls at runtime based on a fail-closed policy. Point your agent at Perimeter instead of the server directly:

{
  "mcpServers": {
    "filesystem": {
      "command": "perimeter",
      "args": [
        "guard",
        "--server",
        "npx -y @modelcontextprotocol/server-filesystem",
        "--allow",
        "Read,Glob,List"
      ]
    }
  }
}

Every call is logged to .perimeter/guard.log.jsonl for review.

Hosted dashboard (self-host)

For a team, run a local dashboard and push audits to it — a self-hosted version of the Pro continuous-audit loop:

perimeter server --port 4173
perimeter audit --json | perimeter push http://localhost:4173 --project acme

Open http://localhost:4173 to see verdicts, findings and cost for every project you push.

CI

permissions:
  contents: read
  security-events: write   # needed for the SARIF upload step below
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
  with:
    node-version: 20
- run: npm install --global perimetercli
- run: perimeter baseline
- run: perimeter audit --enforce --fail-on high --out perimeter-report
- uses: actions/upload-artifact@v4
  with: { path: perimeter-report/ }
# Optional: publish findings to GitHub code scanning
- uses: github/codeql-action/upload-sarif@v3
  if: always()
  with:
    sarif_file: perimeter-report/audit.sarif

Perimeter emits SARIF too, so findings land directly in GitHub code scanning.

Configuration

perimeter init

Creates .perimeter/config.json:

{
  "failOn": "critical",
  "model": "claude-sonnet",
  "budget": 1,
  "maxTokensPerServer": 5000,
  "block": ["@modelcontextprotocol/server-everything"],
  "allow": [],
  "ignoredRules": []
}

Pro (open-core)

The CLI is free and MIT. Perimeter Pro adds team policy, hosted dashboards, remote-server analysis and drift alerts — see PRICING.md and docs/pro.md.

Contributing

Read CONTRIBUTING.md, then:

npm install
npm test

License

MIT


Part of the stealth-alpha toolkit — eight zero-dependency CLIs for release automation, agent security, and repo hygiene.