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

saagar-mcp-kit

v0.1.0

Published

Shared toolbelt for baked-corpus MCP servers: Ed25519 manifest signing, HTTP/stdio protocol probes, server.json version parity, Worker CORS helpers, and a wrangler smoke harness.

Readme

saagar-mcp-kit

Shared toolbelt for the baked-corpus MCP server franchise. One copy of the scaffolding that every server previously carried as hand-forked scripts: Ed25519 manifest signing, HTTP and stdio protocol probes, server.json version parity, Worker CORS helpers, and a wrangler smoke harness.

Zero runtime dependencies. Node >= 18. Install as a devDependency — nothing here ships in a server's runtime bundle.

npm install --save-dev saagar-mcp-kit

What's inside

| Surface | Import / bin | Replaces (per repo) | |---|---|---| | Ed25519 manifest signing | mcp-kit-sign CLI, saagar-mcp-kit/signing | scripts/sign-manifest.mjs | | HTTP probe driver | saagar-mcp-kit/http-probe | the generic half of scripts/probe-mcp.mjs (HTTP flavor) | | stdio probe driver | saagar-mcp-kit/stdio-probe | the generic half of scripts/probe-mcp.mjs (stdio flavor) | | Worker CORS shell helpers | saagar-mcp-kit/worker-shell | the CORS block + 404/405/preflight responses in src/index.ts | | Version parity check | mcp-kit-parity CLI, saagar-mcp-kit/parity | the per-repo server.json↔manifest parity test | | wrangler smoke harness | mcp-kit-smoke CLI | scripts/smoke-mcp.sh |

Domain knowledge stays in each repo: expected tool lists, server names, and domain tool-call assertions live in a thin per-repo probe script built on the kit's drivers.

Usage

Signing

mcp-kit-sign gen-key --manifest=.well-known/mcp.json   # one-time keypair
mcp-kit-sign sign    --manifest=.well-known/mcp.json   # detached .sig + pubkey
mcp-kit-sign verify  --manifest=.well-known/mcp.json   # exit 0 valid / 1 invalid

The manifest is signed as raw bytes (no canonicalization): serve the exact bytes that were signed, and re-sign after any manifest change. The private key defaults to .signing/mcp-ed25519.key (gitignore .signing/; never commit it).

Probing an HTTP (Worker) server

// scripts/probe-mcp.mjs — the repo keeps only its domain expectations
import { probeHttpServer, rpc, parseToolPayload } from "saagar-mcp-kit/http-probe";

const summary = await probeHttpServer(endpoint, {
	serverName: "saagarpatel-portfolio",
	tools: ["get_document", "get_profile", "list_corpus", "search" /* ... */],
});
// domain calls:
const search = await rpc(endpoint, 3, "tools/call", { name: "search", arguments: { query } });
const payload = parseToolPayload(search.json.result, "search");

Probing a stdio server

import { probeStdioServer } from "saagar-mcp-kit/stdio-probe";

const { serverInfo, tools, callResults } = await probeStdioServer("node", ["dist/stdio.js"], {
	serverName: "operant-mcp",
	tools: ["compare_models", "get_case", "get_methodology", "get_results", "list_cases"],
	calls: [{ name: "get_results", arguments: {} }],
});

Worker CORS shell

import {
	preflightResponse,
	notFoundResponse,
	methodNotAllowedResponse,
	withCors,
} from "saagar-mcp-kit/worker-shell";

if (request.method === "OPTIONS") return preflightResponse();
if (url.pathname !== "/mcp") return notFoundResponse("/mcp", { site });
if (request.method !== "POST") return methodNotAllowedResponse("/mcp");
// ...SDK transport wiring stays in the repo...
return withCors(await transport.handleRequest(request));

Version parity (CI gate)

mcp-kit-parity                                # server.json vs package.json/pyproject.toml
mcp-kit-parity --server-json=server.json --package=pyproject.toml

The MCP registry is version-keyed: a release whose server.json lags its package version silently serves a stale registry entry. Run this in CI for every franchise repo — npm and PyPI alike.

Smoke harness

mcp-kit-smoke -- node scripts/probe-mcp.mjs --endpoint "http://127.0.0.1:{port}/mcp"

Boots wrangler dev on a free port, waits until /mcp answers, substitutes {port} into the probe command, runs it, and tears down.

Adopting in a franchise repo

Three-step wiring (portfolio-mcp shown; operant-mcp is identical in shape):

  1. npm install --save-dev saagar-mcp-kit
  2. Replace scripts in package.json:
    "sign": "mcp-kit-sign sign --manifest=../portfolio-index/.well-known/mcp.json",
    "smoke": "mcp-kit-smoke -- node scripts/probe-mcp.mjs --endpoint http://127.0.0.1:{port}/mcp",
    "parity": "mcp-kit-parity"
  3. Rewrite scripts/probe-mcp.mjs to import the kit's driver and keep only the repo's expected-tools list, server name, and domain calls; delete scripts/sign-manifest.mjs and scripts/smoke-mcp.sh.

Python franchise repos (MCPAudit, mcp-trust, shadow-mcp, mcpforge) can adopt mcp-kit-parity in CI without any npm dependency in the package itself: npx saagar-mcp-kit's bin or a pinned dev tool step.

Roadmap (deliberately not in v0.1)

  • mcp-kit-embed — bake signed well-known files into TS string constants (generalizing operant-mcp's build-wellknown.mjs).
  • BM25 search module — only one franchise server uses it today; extraction waits for a second consumer.

Testing

npm test   # node --test, no dependencies

MIT.