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

mcpnewcli

v0.1.0

Published

Scaffold secure-by-default MCP servers (TypeScript or JavaScript) with deny-all permissions, typed tool stubs, and audit hooks pre-wired.

Readme

mcpnew

Test

Scaffold secure-by-default MCP servers — TypeScript or JavaScript, with deny-all permissions, typed tool stubs, and audit hooks pre-wired.

The problem

Every hand-rolled MCP server starts the same way: copy a demo from the docs, register tools as you go, and hope nobody asks "wait, can that tool read my home directory?" Permissions end up allow-all by accident. Audit logging is a TODO. Input schemas drift from handlers.

mcpnew inverts the default. Every capability your server exposes starts denied, every tool call flows through an audit hook, and every tool stub is typed once at the schema level.

Install

npm install -g mcpnew

Zero runtime dependencies. Node 18+.

30-second quickstart

# 1. Scaffold (JavaScript default; add --lang ts for TypeScript)
mcpnew create my-server && cd my-server && npm install

# 2. Add a typed tool stub — it lands DENIED in mcp.permissions.json
npx mcpnew add-tool search-files

# 3. Review, implement, then explicitly allow:
#    "tools": { "search-files": "allow" }

# 4. Keep yourself honest
npx mcpnew audit

That's it. mcpnew audit fails non-zero if the manifest stops being deny-all, if any registered tool lacks its requireAllowed() gate, or if audit hooks are unwired — wire it into CI and stay secure by construction.

What you get

my-server/
├── src/server.js          # MCP server: typed tool stubs + permission gates + audit hooks
├── src/audit.js           # JSONL audit trail → logs/audit.jsonl (gitignored)
├── src/manifest.js        # manifest loader (+ TS types on --lang ts)
├── test/server.test.js    # tests asserting the deny-all posture holds
└── mcp.permissions.json   # deny-all permission manifest — the source of truth
  • Deny-all permissions — tools, resources, prompts, network, filesystem: everything defaults to deny. Wildcards are rejected outright.
  • Typed tool stubs — mcpnew add-tool <name> inserts a zod-schema'd stub wired through the gate and the audit hook. You write the body; the scaffolding is already correct.
  • Audit hooks pre-wired — every call logs timestamp, tool, args, outcome, and duration to logs/audit.jsonl.

Config

The generated mcp.permissions.json:

{
  "version": 1,
  "default": "deny",
  "tools": { "ping": "deny" },
  "resources": { "default": "deny" },
  "prompts": { "default": "deny" },
  "network": { "default": "deny", "allowlist": [] },
  "filesystem": { "default": "deny", "paths": [] }
}

Flip entries to "allow" deliberately, one at a time, after reading what the tool does. mcpnew audit verifies you haven't loosened more than you meant to.

Pro

Shipping MCP servers to production teams? mcpnew Pro ($9/mo) adds policy-as-code review workflows: pull-request diffs of permission manifests with required sign-off before any deny flips to allow, org-wide audit-log shipping (Splunk/Datadog/Loki), and a compliance report mapping each tool grant to its approval record. One tier, no seat math. License via Gumroad — link placeholder.

License

MIT