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

@matematicsolutions/mcp-fr-legal

v0.1.1

Published

Offline MCP korpus prawa francuskiego (Legifrance/DILA) - verbatim, zero-cloud, structuredContent.citations

Readme

mcp-fr-legal

Serwer MCP udostepniajacy offline korpus prawa francuskiego (Legifrance/DILA, pelny tekst) w lokalnym SQLite FTS5, z narzedziami do wyszukiwania i groundingu cytatu. Snippety zwracane verbatim z bazy (zero-LLM) - kazdy z document_id, provision_ref i URL do Legifrance. Anti-halucynacja przez mechanike, nie przez zaufanie do modelu.

Zakres: kody i ustawy skonsolidowane LEGI (Code civil, Code du travail, Code penal, Code de commerce, Code de la defense, Code de la securite interieure, ...) - 3 953 dokumenty / 193 681 przepisow w bundlowanym snapshocie. Bez orzecznictwa (jurisprudence) i bez pelnego JORF.

Rodzina konektorow prawa MateMatic: mcp-saos (orzecznictwo PL), mcp-eu-compliance (prawo UE), mcp-eu-sparql (live EUR-Lex).

Instalacja

npm install            # Node 22.5+ (node:sqlite wbudowane, FTS5)
npm run fetch-corpus   # pobiera database.db (~303 MB) z artefaktu DILA/Ansvar (Apache-2.0 + Etalab)
npm run build
npm start

Air-gap / pelny offline: ustaw FR_LEGAL_DB na lokalna kopie database.db.

Konfiguracja w kliencie MCP:

{ "name": "fr-legal", "command": "node", "args": ["/sciezka/mcp-fr-legal/dist/index.js"] }

Narzedzia

| Tool | Opis | |---|---| | fr_search(query, documents?, limit?) | Pelnotekstowo (FTS5) po przepisach, snippety verbatim + citations. | | fr_article(document_id, provision_ref) | Pelny verbatim tekst przepisu (tolerancyjny provision_ref). | | fr_validate_citation(document_id, provision_ref) | Grounding: czy cytat istnieje (fail-closed) - anti-halucynacja. | | fr_list_documents(type?, query?) | Lista dokumentow (discovery document_id). |

Kazde narzedzie zwraca structuredContent.citations (document_id, provision_ref, URL Legifrance, source_authority DILA, license Etalab v2.0, snapshot, age_days oraz staleness_advisory gdy snapshot starszy niz prog FR_STALENESS_DAYS (domyslnie 365) - provenance/staleness wzorowane na russellbrenner/jurisd, Apache-2.0).

Grounding (anti-halucynacja)

fr_validate_citation to prymityw groundingu: sprawdza mechanicznie, czy document_id + provision_ref istnieje w korpusie. Fail-closed - brak dokumentu/przepisu => provision_exists=false (nie "prawdopodobnie ok"). Spina sie z citation-grounding-pl jako resolver kotwicy dla prawa FR (poziom ISTNIENIE).

Zero-cloud / RODO

Zero wywolan sieciowych w runtime (baza otwierana read-only). Bootstrap korpusu (fetch-corpus) to jedyny moment sieci. Tekst zwracany verbatim (grounding). Swiezosc: sprawdzaj na Legifrance (snapshot != zrodlo autentyczne = Journal officiel).

Licencja i atrybucja

Cytowanie: MateMatic Solutions (2026), mcp-fr-legal - offline MCP korpus prawa francuskiego (Legifrance/DILA), MIT. Dane: DILA, Licence Ouverte v2.0.