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

@governancer-foundation/funnel-base-mcp

v0.1.1

Published

MCP server that serves validated primary-source statutory text + a citation validation ledger as queryable resources and tools, so Claude Code sessions and CI agents can fetch verbatim law text and cross-check citations at write time. Bring your own corpu

Downloads

36

Readme

@governancer-foundation/funnel-base-mcp

CI OpenSSF Scorecard gitleaks REUSE compliant License: Apache-2.0 npm version

Fetch verbatim law text and cross-check statutory citations at write time — a stdio MCP server, zero network egress, you bring your own corpus.

A small, read-only MCP (Model Context Protocol) server that exposes a corpus of validated primary-source statutory text — plus a citation validation ledger — as queryable resources and tools for Claude Code sessions and CI agents.

It exists so an AI coding session can fetch verbatim law text and cross-check statutory citations at write time, instead of paraphrasing regulations from training data and discovering the error later. The server is a thin loader over a corpus directory you provide; it makes no network calls and never writes to the corpus.

Note on the corpus. This package ships the server code only (Apache-2.0). It does not ship a corpus. You point it at your own corpus directory via the FUNNEL_BASE_ROOT environment variable. Without a corpus the tools simply report "nothing found". See License below.

What it exposes

Resources (uri → markdown)

  • funnel-base://VALIDATION-SUMMARY — the citation validation ledger (the consolidated set of corrections found during a primary-source validation pass).
  • funnel-base://law-texts/<slug> — the per-statute bundle (source.md + text-extracts.md + validation.md).

Tools

  • list_law_texts — coverage status for every law-text slug in the corpus.
  • get_statute(slug) — verbatim primary statutory text + validation status for one slug.
  • validate_citation(text) — scan a markdown chunk for statutory citations and cross-check them against the validation ledger.
  • read_funnel_file(path) — read a single file under the corpus root (path-traversal protected).
  • list_funnel_files — discover the available corpus markdown files.

Corpus layout

The loader reads (all parts optional):

<FUNNEL_BASE_ROOT>/
├── 01-acts/*.md        # per-act analysis (optional)
├── 02-verticals/*.md   # per-vertical analysis (optional)
└── law-texts/
    ├── VALIDATION-SUMMARY.md
    └── <slug>/
        ├── source.md          # metadata + fetch status
        ├── text-extracts.md   # verbatim primary statutory text
        └── validation.md      # per-claim validation status

Install

npm install -g @governancer-foundation/funnel-base-mcp

Or run it without installing:

FUNNEL_BASE_ROOT=/path/to/your/corpus npx @governancer-foundation/funnel-base-mcp

To work on the server itself, build from source instead:

npm install
npm run build

Wire it into Claude Code via .mcp.json, pointing FUNNEL_BASE_ROOT at your corpus:

{
  "mcpServers": {
    "funnel-base": {
      "command": "node",
      "args": ["./node_modules/@governancer-foundation/funnel-base-mcp/dist/index.js"],
      "env": {
        "FUNNEL_BASE_ROOT": "/path/to/your/funnel-base"
      }
    }
  }
}

The server speaks the MCP stdio transport — no HTTP endpoint, no public attack surface. Only a process that spawns it (Claude Code, a CI script) can talk to it.

Typical usage

  • When editing any compliance/PRD/vertical markdown, call validate_citation on the proposed text before committing.
  • When a specific statute is in play, call get_statute(slug) to read verbatim primary text rather than paraphrasing.

Tests

npm test          # vitest, one pass
npm run test:watch
npm run typecheck # source and specs

The suite runs on a synthetic corpus built in a temp directory, so it needs no corpus of its own. It covers the citation scanner per jurisdiction, the loader's filesystem behaviour including path-traversal refusal, and the MCP surface end-to-end — a real client driving a real server over an in-memory transport. Continuous integration additionally smoke-tests the built binary over stdio.

What this server explicitly does NOT do

  • ❌ Write to the corpus — citation corrections happen via human-attested PR review, not via the agent.
  • ❌ Call any external API (no LLM calls, no internet egress).
  • ❌ Persist state — stateless reads only.

License

Server code: Apache-2.0 (see LICENSE + NOTICE).

Any corpus you load via FUNNEL_BASE_ROOT is yours and is not part of this package — it is neither shipped nor licensed here. The server is a replaceable loader; a real, attested corpus is what makes the tools meaningful.


Maintained by Alexander Brichkin (Agonist Development AB) under the governancer-foundation open-source commons.