Legalize Mcp

io.github.matematicsolutionsPublished by GitHub account matematicsolutionsv0.2.4Updated Oct 24, 2026

Legislation for 32 jurisdictions (21 EU) as law-as-git, keyless, with ELI-style citations.

The publisher's own server: Legalize

Overview

AI-generated overview

Read-only MCP server that lets an assistant look up national legislation from 32 jurisdictions, with citations, by reading the public legalize-dev git corpus.

What you can do
List jurisdictions, optionally EU-only, with codes, names and repositories, and report what the connector covers and does not cover, with fallbacks for gaps. Search a country's laws by keyword to get law identifiers and snippets. Fetch a law's frontmatter for a cheap citation check, or its full metadata and text by law identifier, including a historical version by commit SHA. Read a law's reform timeline as commits whose SHAs can be passed back to fetch older versions. Every response carries a source URL from the law's own frontmatter, the GitHub copy read, and a human-readable citation.
When to use it
Useful when an assistant needs to retrieve or cite legislation across several European or other jurisdictions from one server, check which version of a law was in force at a given reform, or verify a citation against official source metadata. Suited to research and drafting where the exact source and version matter.
Requirements
Runs locally as a Python package via uvx or pip, so Python is needed. Network access to GitHub for read-only GET requests. GITHUB_TOKEN or GH_TOKEN is optional: it is required for keyword search and lifts GitHub rate limits on reform timelines. LEGALIZE_AUDIT_DIR optionally sets where the audit log is written. On Windows 11 with Smart App Control, run it through the signed Python interpreter instead of the blocked launchers.
Before you install
Unofficial connector, not affiliated with or endorsed by the legalize-dev project; it reads the public git corpus rather than the official API. Every tool call appends a line to a local JSONL audit log by default. Corpus licensing is per country, not MIT: some sources require attribution when quoting or redistributing, so check the country repository before relying on a text. Search needs a GitHub token, which is sent to GitHub. All tools are read-only.

Installation

In SourceWeft

  1. Open Legalize Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

legalize-mcp

Unofficial. Not affiliated with, or endorsed by, the legalize-dev project. An official legalize-dev MCP server is in development against the legalize.dev API; this one reads the public git corpus instead.

One MCP server, 32 jurisdictions (21 EU). A read-only Model Context Protocol server over the legalize-dev corpus — national legislation stored as law-as-git: one law per Markdown file, every reform a Git commit, each with an 8-field ELI-style frontmatter (Legalize Format Spec v0.2). This connector is Apache-2.0.

Built by Matematic Solutions as part of the eu-legal-mcp line. Unlike the single-country *-eli-mcp connectors, this one serves many jurisdictions from a single server, because the underlying corpus is already normalised to one format.

Why this exists

Every response carries the citation contract the rest of the line uses:

  • source_url — the official government source from the law's own frontmatter (e.g. boe.es, riigiteataja.ee, legifrance.gouv.fr). Never invented.
  • github_url — the verifiable legalize-dev copy actually read.
  • human_readable_citation — "<title> (<identifier>)".

It is self-hostable, with a narrow data path: nothing leaves the user's machine except read-only GETs to GitHub.

Jurisdictions

EU: at be cz de ee es eu fi fr gr ie it lt lu lv nl pl pt ro se sk · Other: ad ar ch cl co kr li no uk us uy

Call legalize_list_countries for the live list (add eu_only=true to filter).

Tools

ToolKeyless?Purpose
legalize_list_countries✅List jurisdictions (code, name, EU flag, repo).
legalize_search_lawsneeds GITHUB_TOKENKeyword search inside a country's laws → law_id + snippet.
legalize_get_meta✅Frontmatter only (cheap citation check).
legalize_get_law✅Full metadata + text by law_id; pass sha= for a historical version.
legalize_list_reforms✅Reform timeline (commits) for a law; SHAs feed legalize_get_law.
legalize_coverageDeclare what this connector covers, when each family was captured, and - explicitly - what it does NOT cover. Every gap carries a fallback.

law_id is the Markdown filename stem (e.g. BOE-A-1978-31229 for the Spanish Constitution, a numeric id for Estonia). Get it from legalize_search_laws or an official citation — there is no fuzzy title lookup.

Install

bash
uvx legalize-mcp           # run directly# orpip install legalize-mcp

Claude Code (.mcp.json):

json
{  "mcpServers": {    "legalize": { "command": "uvx", "args": ["legalize-mcp"] }  }}

Windows 11 with Smart App Control

Smart App Control blocks unsigned executables, which covers uvx.exe, pip.exe and the legalize-mcp.exe launcher that pip writes at install time. The python.exe and py.exe from the python.org installer are signed by the Python Software Foundation, so running the module through the interpreter works:

bash
python -m pip install legalize-mcppython -m legalize_mcp

pip.exe is blocked for the same reason, so install with python -m pip, not pip install. If python is not on PATH, use the Windows launcher: py -3 -m legalize_mcp.

json
{ "mcpServers": { "legalize-mcp": { "command": "python", "args": ["-m", "legalize_mcp"] } } }

Do not turn Smart App Control off to work around this - it cannot be re-enabled without reinstalling Windows.

GITHUB_TOKEN (or GH_TOKEN) is optional — required only for legalize_search_laws, and it lifts the GitHub rate limit on legalize_list_reforms.

Configuration

Env varDefaultPurpose
GITHUB_TOKEN / GH_TOKEN—Enables code search; lifts rate limits.
LEGALIZE_AUDIT_DIR~/.matematic/auditJSONL audit log location (record-keeping).

Governance

Every tool call appends one line to ~/.matematic/audit/legalize-mcp.jsonl (input hash, duration, status — no payloads). All tools are read-only and idempotent. See CONSTITUTION.md.

Development

bash
python -m venv .venv && .venv/Scripts/python -m pip install -e ".[dev]".venv/Scripts/python -m pytest -q          # offline unit tests.venv/Scripts/python -m ruff check src tests

Attribution

Legislative data © the respective national authorities (see each law's source). Corpus normalisation by the legalize-dev project.

Licence of the corpus is per country, not MIT. The MIT licence covers legalize-dev's pipeline and tooling. Each country repository carries terms inherited from its own official source - legalize-es follows the BOE reuse conditions, which make citing the source mandatory; legalize-at is CC BY 4.0; others differ. Check the country repository before you rely on, quote or redistribute a text. Treating the corpus as MIT would skip an attribution obligation you actually have.

Correction supplied by Enrique Lop (legalize-dev) in issue #18, 2026-08-24. This connector does not redistribute the corpus; it reads it on demand.

Source: README.md at commit 944721f

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.2.4LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Legalize integrations