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

zam-adapter-mcp

v0.1.0

Published

Reference adapter: governs an MCP client's tools/resources/prompts via the ZAM context plane (capabilities -> registry -> plan() -> surfaced subset).

Readme

zam-adapter-mcp

The strategic second reference adapter for the ZAM context plane (docs/39). It governs an MCP client's aggregated capabilities: given the tools/resources/prompts exposed by the connected MCP servers plus the user request, it returns only the subset worth surfacing this turn — directly relieving the "too many MCP servers blow my context budget" problem.

Same contract as the OpenClaw adapter (docs/38), a completely different surface — which is the point: it proves the deterministic core is surface-independent (portability).

Honest scope: there is no live MCP transport here. The adapter operates on MCP capability listings (the standard tools/list / resources/list / prompts/list shapes, aggregated per server) supplied as data — with a synthetic example-capabilities.json. A real MCP host feeds its live listings; the mapping and governance are real and reusable.

The contract

  1. Map MCP capabilities → a ZAM registry (mapCapabilities) — tool→tool, resource→memory, prompt→skill; sizes measured from the serialized capability; relevance + risk derived deterministically (docs/39 §4).
  2. Plan — the deterministic core plan() (no per-turn model call).
  3. Surface — reconstruct the tools/resources/prompts to advertise this turn from the selected components.

governCapabilities does all three.

Usage

import { governCapabilities } from 'zam-adapter-mcp';

const { promptFamily, surfaced, stats } = governCapabilities({
  capabilities,                 // { servers: [{ name, tools?, resources?, prompts? }] }
  requestText: 'Search the web for the latest release notes.',
});
// surfaced.tools / surfaced.resources / surfaced.prompts — advertise only these to the model
// stats.savedPct — fraction of capability tokens pruned this turn

CLI

zam-mcp --capabilities ./example-capabilities.json --request "Deploy the service to production."
# surfaced names -> stdout; a savings line -> stderr.  Add --json for the full object.

How governance works (deterministic, documented)

  • Relevance. A capability's name + description is matched against a keyword→promptFamily table (docs/39 §4); matched families become requiredWhen (surface only for those). No match ⇒ fail-open include.
  • Risk. MCP annotations.destructiveHint ⇒ surface only for an ops/change request (a destructive tool is never advertised for a greeting). readOnlyHint ⇒ low risk.

Build & test

npm install   # installs context-plane from npm
npm run build
npm test