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

@qmilab/lodestar-guard-mcp

v0.5.0

Published

MCP proxy mode for Lodestar Guard — wrap any MCP-speaking agent (Claude Code, Cursor, Aider) so every tool call passes through the Action Kernel and every result through the Cognitive Core. Part of Lodestar, the trust layer for AI agents.

Readme

@qmilab/lodestar-guard-mcp

MCP proxy mode for Lodestar Guard. Wrap any MCP-speaking agent (Claude Code, Cursor, Aider, raw MCP clients) so every tool call passes through Lodestar's Action Kernel and every result through the Cognitive Core. The resulting event log renders into a trust report with lodestar report.

Part of Lodestar, the trust layer for AI agents.

Status (Batch 3): stdio transport only. HTTP/SSE for the upstream face is deferred. Single-tenant: one proxy instance, one wrapped agent, one event log.

What it does

┌──────────────┐ stdio MCP ┌─────────────────┐ stdio MCP ┌──────────────────┐
│ Wrapped      │──────────▶│ Lodestar        │──────────▶│ Downstream       │
│ MCP agent    │           │ guard-mcp proxy │           │ MCP server(s)    │
│ (Claude Code,│◀──────────│  • ActionKernel │◀──────────│ (filesystem, git,│
│  Cursor,     │           │  • CognitiveCore│           │  github, ...)    │
│  Aider, ...) │           │  • EventLog     │           │                  │
└──────────────┘           └─────────────────┘           └──────────────────┘
                                    │
                                    ▼
                          .lodestar/events/*.ndjson
                                    │
                                    ▼
                            lodestar report

For every tools/call the wrapped agent makes:

  1. Propose — proxy builds a Lodestar ActionContract from operator-controlled tool_defaults (not from untrusted MCP annotations).
  2. ArbitratePolicyGate decides approve / deny. If denied, the proxy returns a synthetic CallToolResult with isError: true and a structured _lodestar payload so the agent can reason about the denial and re-plan, rather than seeing a transport-level failure.
  3. Execute — preconditions are re-validated, then the call is forwarded to the appropriate downstream MCP server.
  4. Ingest — the downstream's CallToolResult becomes a Lodestar Observation. The Cognitive Core's MCPToolResultExtractor emits two claim kinds:
    • tool_result quality — what the tool said it did.
    • external_document quality — document text inside the result. The Memory Firewall's auto-observation gate (Round 5) prevents these from auto-promoting to truth_status: supported.

Install

bun add @qmilab/lodestar-guard-mcp

This package has a runtime peer on @modelcontextprotocol/sdk ≥ 1.29.

Quick start

import { MCPProxy, loadProxyConfig } from "@qmilab/lodestar-guard-mcp"

const config = await loadProxyConfig("./lodestar-mcp-proxy.config.json")
const proxy = new MCPProxy(config)
await proxy.start()  // blocks; receives MCP on stdin/stdout

The headline path is the CLI:

lodestar guard mcp-proxy --config ./lodestar-mcp-proxy.config.json
# then in another shell:
lodestar report latest

Config file

{
  "project_id": "telenotes-dev",
  "actor_id": "agent:claude-code",
  "session_id": "auto",                    // or pin one
  "log_root": ".lodestar/events",
  "default_scope": { "level": "project", "identifier": "telenotes-dev" },
  "default_sensitivity": "internal",
  "auto_approve_ceiling": 2,
  "downstream_servers": [
    {
      "name": "filesystem",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "./workspace"]
    }
  ],
  "tool_defaults": {
    "mcp.filesystem.read_file": {
      "reversibility": "reversible",
      "blast_radius": "self",
      "permissions": ["fs.read"],
      "sandbox": "read",
      "required_trust_level": 0
    },
    "mcp.filesystem.write_file": {
      "reversibility": "irreversible",
      "blast_radius": "project",
      "permissions": ["fs.read", "fs.write"],
      "sandbox": "write-local",
      "required_trust_level": 3
    }
  },
  // Optional. Omit (or use { "backend": "memory" }) for the in-memory,
  // single-session default. Use "postgres" to share durable belief/claim/
  // evidence state across sessions — the connection string is read from
  // the named env var, never embedded here (it usually carries a password).
  "persistence": {
    "backend": "postgres",
    "connection_string_env": "LODESTAR_DATABASE_URL"
  }
}

Tools that the downstream server advertises but the config does not mention fall through to a conservative default (irreversible, controlled-shell sandbox, L3 trust). That biases the proxy toward "refuse unless approved" rather than "approve unless caught."

When persistence.backend is postgres, the CLI resolves the named environment variable, opens the Postgres-backed firewall stores (@qmilab/lodestar-memory-firewall/postgres), ensures their schema, and closes the connection when the session ends. Two proxy sessions pointed at the same database see each other's beliefs — the substrate the tool-poisoning-cross-session probe exercises.

License

Apache-2.0. See LICENSE.