io.github.matematicsolutions/legalize-mcp

Registre officiel Outils de développement

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

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

PYPI package legalize-mcp
Claude Code
claude mcp add legalize-mcp -- uvx legalize-mcp==0.2.4
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "legalize-mcp": {
            "command": "uvx",
            "args": [
                "legalize-mcp==0.2.4"
            ]
        }
    }
}

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. legalize-mcp
  2. Why this exists
  3. Jurisdictions
  4. Tools
  5. Install
  6. Configuration
  7. Governance
  8. Development
  9. Attribution

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

uvx legalize-mcp           # run directly
# or
pip install legalize-mcp

Claude Code (.mcp.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:

python -m pip install legalize-mcp
python -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.

{ "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

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.

Questions fréquentes

Qu'est-ce que io.github.matematicsolutions/legalize-mcp ?

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

Comment installer io.github.matematicsolutions/legalize-mcp ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add legalize-mcp -- uvx legalize-mcp==0.2.4. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour io.github.matematicsolutions/legalize-mcp ?

Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.

io.github.matematicsolutions/legalize-mcp est-il open source ?

Oui. Son code est sur GitHub sous licence Apache-2.0.

Qui maintient io.github.matematicsolutions/legalize-mcp ?

Il est publié par matematicsolutions. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.