Open, grounded legal-AI infrastructure for law firms - anywhere the law is public. Self-hosted. Auditable. Vendor-neutral.
Legal AI has one dominant failure mode: a confident, well-written citation to a case or statute that does not exist. In a law firm, that is not a glitch - it is malpractice.
So we build the opposite. Every tool in this fleet returns a verifiable citation - title, URL, court or act, date, and a stable identifier (ELI / ECLI / CELEX / docket number) - resolved live against the public source. The model does not recall the law from memory; it fetches it, and it can show you where every word came from. Citation checks run as mechanical string-matches, so a fabricated quote fails at the structural layer, before it ever reaches a client.
AI that knows what it doesn't know - and hands you the source instead of guessing.
| Patron | An AI agent that never leaves the firm's server | 9 desktop editions |
| MCP connector fleet | Grounded, keyless-first access to public law | 41 connectors · 32 jurisdictions |
| Two skill hubs | Method-neutral legal-AI skills for Claude Code / Cursor / Codex | 59 skills |
| Boutique | Install-ready catalogue of every connector and skill | Always current |
All of it is open source, and all of it runs on the firm's own hardware, with the model of its choice - Claude, Gemini, or a local Ollama.
patron (AGPL-3.0) is a self-hosted legal-AI shell: chat, documents, a hash-chained audit trail (EU AI Act art. 12), an AI Constitution the firm reads and signs, docker-compose ready, and a vendor-agnostic model layer. The data stays where the duty of confidentiality lives.
One repository, one release, nine Windows installers - PL, EN, US, GB, BR, IT, DE, ES, FR. Each ships with its own market's law connector wired in by default (US: Congress.gov / GovInfo / Federal Register / eCFR / CourtListener · UK: legislation.gov.uk / Find Case Law / GOV.UK · Brazil: Senado + DataJud CNJ · and so on; the EN build is the EU edition, with EUR-Lex in front). Download and per-edition detail: matematicsolutions.com/en/pobierz.
Each is a standalone MCP server (stdio, uvx / npx, or clone-and-run). Featured first are our four highest-coverage markets; the full catalogue by region follows.
🇺🇸 United States - us-eli-mcp
Five sources, ten tools. Congress.gov (the federal legislative process) · GovInfo (US Code, Statutes at Large, CFR, Federal Register packages) · Federal Register (1,003,504 documents, including 1,550 executive orders, keyless) · CourtListener (8,294,123 court opinions - the headline value is state case law for California, New York, Texas and beyond, which no federal source covers) · eCFR (412,846 current CFR sections with amendment history). Apache-2.0.
🇧🇷 Brazil - br-eli-mcp
Eight keyless, no-registration open-data APIs. Federal bills (Camara dos Deputados) · enacted law via the real LexML URN resolver (Senado) · full article text (normas.leg.br) · court dockets across all branches (DataJud CNJ) · rulings from the STJ, TST (labor supreme court - 3,751,594 rulings), TCU (federal court of accounts, procurement - 525,620 rulings) and CARF (federal tax appeals). Apache-2.0.
🇪🇺 European Union - mcp-eu-sparql + mcp-eu-compliance
Live EU legislation and 57,103 CJEU rulings and Advocate-General opinions (34,261 judgments, 8,362 orders, 14,480 opinions) via the Publications Office SPARQL endpoint (Cellar / EUR-Lex), each with CELEX + ECLI, plus national data-protection decisions from GDPRhub. Alongside it, an offline verbatim corpus of 14 digital-and-data regulations - GDPR, AI Act, DORA, NIS2, eIDAS 2.0, CRA, DSA, DMA, Data Act, DGA, LED, ePrivacy, Cybersecurity Act, CER - in local SQLite FTS5, zero-LLM, every snippet CELEX-stamped. MIT.
🇬🇧 United Kingdom - gb-eli-mcp
legislation.gov.uk (The National Archives) - Acts of Parliament and Statutory Instruments across Westminster, Holyrood, the Senedd and Stormont - plus Find Case Law (UK judgments as Akoma Ntoso) and the GOV.UK Search API (tribunal decisions, HMRC manuals, CMA cases). Eight tools, keyless, Open Government Licence v3.0. Britain pioneered URI-based legislation identifiers, so eli_uri carries the UK's own stable id. Apache-2.0.
Every connector returns the same citation contract: eli_uri / ECLI / CELEX, a human-readable citation, and a source_url. Install instructions for each, always current: matematicsolutions.com/en/boutique.
| Connector | Source | |
|---|---|---|
| 🇩🇪 Germany | de-eli-mcp | NeuRIS - federal legislation + case law at every court level + Bundestag DIP |
| 🇫🇷 France | fr-eli-mcp | Legifrance / PISTE - LODA, codes, JURI case law (ECLI); free PISTE key |
| 🇮🇹 Italy | it-eli-mcp | Normattiva (Akoma Ntoso / URN:NIR / ELI) + Corte Costituzionale from 1956 |
| 🇪🇸 Spain | es-eli-mcp | BOE, Tribunal Constitucional, DGT tax rulings, TEAC doctrine, AEPD |
| 🇳🇱 Netherlands | nl-eli-mcp | BWB (KOOP SRU) + Rechtspraak Open Data |
| 🇨🇭 Switzerland | ch-eli-mcp | Fedlex - native ELI, DE / FR / IT / EN |
| 🇸🇪 Sweden | se-eli-mcp | Riksdagen open data (SFS) |
| 🇧🇪 Belgium | be-eli-mcp | Moniteur Belge / Belgisch Staatsblad |
| 🇦🇹 Austria | at-eli-mcp | RIS (data.bka.gv.at) - legislation + Judikatur |
| 🇮🇪 Ireland | ie-eli-mcp | Irish Statute Book |
| 🇩🇰 Denmark | dk-eli-mcp | Retsinformation (LexDania XML) |
| 🇫🇮 Finland | fi-eli-mcp | Finlex (Akoma Ntoso) |
| 🇨🇿 Czechia | cz-eli-mcp | e-Sbirka (SPARQL / RDF) |
| 🇷🇴 Romania | ro-eli-mcp | Portal Legislativ (SOAP) |
| 🇭🇺 Hungary | hu-eli-mcp | Nemzeti Jogszabalytar |
| 🇭🇷 Croatia | hr-eli-mcp | Narodne novine (JSON-LD) |
| 🇸🇰 Slovakia | sk-eli-mcp | Slov-Lex (static) |
| 🇱🇹 Lithuania | lt-eli-mcp | TAR / data.gov.lt (Spinta) |
| 🇱🇺 Luxembourg | lu-eli-mcp | Legilux - jolux RDF + Akoma Ntoso |
| 🇲🇹 Malta | mt-eli-mcp | legislation.mt |
| 🇹🇷 Turkey | tr-eli-mcp | Mevzuat Bilgi Sistemi / Bedesten (keyless) |
Plus mcp-fr-legal - an offline full-text corpus of French codes and statutes (Legifrance / DILA, local SQLite, zero-LLM), companion to the live fr-eli-mcp.
| Connector | Source | |
|---|---|---|
| 🇺🇸 United States | us-eli-mcp | Congress.gov · GovInfo · Federal Register · CourtListener · eCFR (flagship above) |
| 🇧🇷 Brazil | br-eli-mcp | Camara · Senado · DataJud · STJ · TST · TCU · CARF (flagship above) |
| 🇨🇦 Canada | ca-eli-mcp | Justice Laws Website - federal, bilingual |
| 🇨🇱 Chile | cl-eli-mcp | BCN Linked Open Data (SPARQL) |
| 🇨🇴 Colombia | co-eli-mcp | Constitutional Court decisions, keyless |
| Connector | Source | |
|---|---|---|
| 🇯🇵 Japan | jp-eli-mcp | e-Gov national legislation |
| 🇦🇺 Australia | au-eli-mcp | Federal Register of Legislation |
| 🇸🇬 Singapore | sg-eli-mcp | Singapore Statutes Online |
| 🇲🇾 Malaysia | my-eli-mcp | Laws of Malaysia Online |
| 🇮🇱 Israel | il-eli-mcp | Knesset OData, keyless |
legalize-mcp- one server over the legalize-dev corpus: legislation from 32 jurisdictions (21 EU) as Markdown with ELI-style ids and full change history (every reform is a commit).eu-drift-watch- a monthly watchdog that checks whether anchor statutes across 9 EU jurisdictions have been renamed or repealed at the source. A guard over the fleet, not another source.
Two open hubs of Claude Code / Cowork skills, installable in one command for any Agent-Skills-compatible tool (Claude Code, Cursor, Codex, Gemini CLI):
| Hub | Focus | Skills |
|---|---|---|
| awesome-matematic-skills-en | Method-neutral: citation grounding, red-team review, output scoring, EU law | 18 |
| awesome-matematic-skills-pl | Polish jurisdiction: PL/EU case law, KRS, DOCX redlining, GDPR, full firm workflow | 41 |
npx skills add matematicsolutions/awesome-matematic-skills-en
The heart of both hubs is a verification core: grounding a citation against its source, stress-testing a high-stakes memo adversarially, scoring an output before it ships, and packaging the whole reasoning trail into an AI-Act-compliant audit bundle. The same discipline as the connectors, one layer up.
matematicsolutions.com/en/boutique is the front door to the whole ecosystem, built around two doors:
- For the lawyer - Skills. Ready-made abilities you load once and keep: reviewer, humaniser, devil's advocate, citation extraction, clause checklist, output scoring, EU-law and CJEU search.
- For the agent - MCP connectors. Live sources of law wired straight into the agent - statutes, case law, the company register, the compliance corpus - each with a stable identifier and a link back to the source.
Both install with one command - npx skills add ... for any agent, or /plugin marketplace add ... inside Claude Code. Prefer not to touch a terminal? A Windows wizard places a skill for you: no Git, no config, nothing technical. Everything then runs locally, on your own documents, with your data staying with you.
Free to start, GDPR-safe by default. The catalogue grows steadily - from our own repositories and from real practice needs - with a premium tier coming later, always honest about authorship. If you want to wire one connector or skill into your own product, this is where to start.
- Patron's shell is AGPL-3.0 - it protects against SaaS-ification. A firm self-hosting has no extra obligations; a competitor reselling Patron as SaaS to third parties must open its changes.
- The connectors are MIT or Apache-2.0 - infrastructure to public sources of law. The more products depend on them, the more they become the default way to return grounded citations from each jurisdiction. That is the point.
Rationale: ADR-0002.
- AI Constitution v1.2.0 - 9 principles, product boundaries, roles (Administrator / Operator / Auditor), mapped to the EU AI Act, GDPR and professional-ethics rules. Every firm reads and signs it.
- AGENTS.md everywhere - canonical AI-agent instructions in the Linux Foundation / Agentic AI Foundation standard, read natively by 20+ tools. The connector fleet carries
CONSTITUTION.md+DISCOVERY.md(boundaries, source, licence, coverage limits) so an agent reads the rules before it touches the repo. - Vendor-neutral by design - no client and no developer should be locked to one AI tool to work with our software.
We began by solving this for Polish law firms, and that stack is the deepest we ship: the Polish edition of Patron, connectors for ISAP (legislation), SAOS (common and supreme courts), NSA/CBOSA (administrative courts, 2.39M rulings), KRS (company register), EUREKA (517k+ tax interpretations) and KIO (public procurement), plus a full set of GDPR-native open skills for contract review, anonymization, output verification, AI-readiness assessment and legal-aid clinics. The 41-skill Polish hub covers the whole firm workflow. Polish catalogue: matematicsolutions.com.
- Website: matematicsolutions.com/en
- Boutique: matematicsolutions.com/en/boutique
- Email: kontakt@matematic.co
- LinkedIn: Wieslaw Mazur
AI that knows what it doesn't know - we know how.
Built in Poland, for law firms in every jurisdiction where the law is public. That is why Patron speaks nine languages, and counting.