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

@cubiczan/governed-mcp-gateway

v0.1.0

Published

HTTP MCP gateway: principal on tools/call + SSE, allowlists, vault rotate, CHP gates

Readme

@cubiczan/governed-mcp-gateway

HTTP MCP control plane (default port 7474). Principal on every tools/call and every SSE frame — not a tool catalog.

Production MCP auth often dies when work hops threads or workers. This gateway resolves a Bearer credential to a Principal, injects it into params._meta.cubiczan.principal, repeats it on SSE, enforces allowlists, rotates vaulted secrets in place, and runs a lightweight CHP spend gate before priced tools.

Install / run

npm i -g @cubiczan/governed-mcp-gateway   # or use npx
npx -y @cubiczan/governed-mcp-gateway
# → http://127.0.0.1:7474

From source:

npm install
npm run build
npm start
npm test

Cursor / Claude config

Start the gateway in a terminal (or a process manager), then point the client at the HTTP MCP endpoints:

{
  "mcpServers": {
    "governed-gateway": {
      "url": "http://127.0.0.1:7474/mcp",
      "headers": {
        "Authorization": "Bearer mcp_agt_payops_demo"
      }
    },
    "chp": {
      "command": "npx",
      "args": ["-y", "@cubiczan/chp-mcp"]
    },
    "conductor": {
      "command": "npx",
      "args": ["-y", "@cubiczan/agent-conductor"]
    }
  }
}

Demo keys: mcp_agt_payops_demo, mcp_agt_research_demo, mcp_human_controller_demo.

Stack

┌─────────────────┐     ┌──────────────────────────┐     ┌────────────────────┐
│ Cursor / Claude │────▶│ governed-mcp-gateway     │────▶│ spend-mandate-plane│
│ (MCP client)    │ SSE │ :7474  principal+vault   │ opt │ :7475              │
└────────┬────────┘     └────────────┬─────────────┘     └────────────────────┘
         │                           │
         │ stdio                     │ CHP gate (embedded)
         ▼                           ▼
┌─────────────────┐     ┌──────────────────────────┐
│ @cubiczan/      │     │ @cubiczan/chp-mcp        │
│ agent-conductor │     │ Profile B spend / HITL   │
└─────────────────┘     └──────────────────────────┘

Sister packages: @cubiczan/chp-mcp, @cubiczan/agent-conductor, consensus-hardening-protocol.

API

| Method | Path | Auth | What | |--------|------|------|------| | GET | /health | — | { ok, service } | | POST | /mcp | Bearer | JSON-RPC initialize, tools/list, tools/call | | GET | /mcp/sse | Bearer | SSE with principal on _meta | | POST | /v1/credentials | Human | Put a named secret | | POST | /v1/credentials/:name/rotate | Human | New hash, same name | | POST | /v1/credentials/verify | — | { ok } | | POST | /v1/locks | Human | CHP approve / reject |

curl -sS -H "Authorization: Bearer mcp_agt_payops_demo" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"echo.ping","arguments":{"hello":"world"}}}' \
  http://127.0.0.1:7474/mcp

Notes

  • This is an HTTP MCP gateway (JSON-RPC + SSE), not a stdio MCP process. The governed-mcp-gateway bin starts the HTTP server.
  • Shared CHP / HTTP / ledger helpers are vendored under src/shared/ (no @cubiczan/shared workspace dep).
  • Optional: set SPEND_PLANE_URL to hook the spend-mandate plane before priced tools.

License

MIT