legalize-mcp
This server provides read-only access to national legislation from 32 jurisdictions (21 EU member states + 11 others) stored as structured Markdown with Git-tracked reform history. Capabilities include:
List jurisdictions (
legalize_list_countries): Get all supported countries with codes, names, EU membership status, and GitHub repo links. Filterable to EU-only.Search laws (
legalize_search_laws): Full-text keyword search within a country's legislation, returning law IDs and snippets. (Requires aGITHUB_TOKEN.)Get law metadata (
legalize_get_meta): Fetch only the frontmatter (title, status, publication date, source URL, citation) — a cheap citation check without downloading full text.Get full law text (
legalize_get_law): Retrieve complete text and metadata for a specific law by ID. Supports historical versions via a Git commit SHA.List law reforms (
legalize_list_reforms): View the full amendment/reform timeline for a law as Git commits (dates, messages, SHAs), which can be fed back intolegalize_get_lawfor historical versions.
Key features:
Every response includes a citation contract:
source_url(official government source),github_url(verifiable copy), andhuman_readable_citationAll tools are read-only and idempotent; GDPR-safe and self-hostable (only read-only GETs to GitHub)
Audit logging to
~/.matematic/audit/legalize-mcp.jsonl(configurable viaLEGALIZE_AUDIT_DIR)Supported jurisdictions: EU (
at be cz de ee es eu fi fr gr ie it lt lu lv nl pl pt ro se sk) and others (ad ar ch cl co kr li no uk us uy)
Reads national legislation stored as law-as-git on GitHub, providing tools to list countries, search laws, get metadata, full text, and reform history from the legalize-dev corpus.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@legalize-mcpFind laws about environmental protection in Estonia"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
legalize-mcp
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). MIT-licensed source corpus; 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 RODO/GDPR-safe and self-hostable: nothing leaves the user's machine except read-only GETs to GitHub.
Related MCP server: lawyer-mcp
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
Tool | Keyless? | Purpose |
| ✅ | List jurisdictions (code, name, EU flag, repo). |
| needs | Keyword search inside a country's laws → |
| ✅ | Frontmatter only (cheap citation check). |
| ✅ | Full metadata + text by |
| ✅ | Reform timeline (commits) for a law; SHAs feed |
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-mcpClaude 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_mcppip.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 var | Default | Purpose |
| — | Enables code search; lifts rate limits. |
|
| JSONL audit log location (AI Act art. 12). |
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 testsAttribution
Legislative data © the respective national authorities (see each law's source). Corpus
normalisation by the legalize-dev project under the MIT License.
This connector does not redistribute the corpus; it reads it on demand.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityFmaintenanceAn MCP server that provides comprehensive US legislation.1735MIT
- FlicenseAqualityDmaintenanceMCP server for Legalize.dev, enabling AI to query and understand legal frameworks across countries via a structured legislation API.131
- Alicense-qualityBmaintenanceMCP server for real-time access to Mozambican legislation, enabling search, status checks, article retrieval, historical versions, and citation resolution via the Mozaia platform.MIT
- AlicenseAqualityAmaintenanceAn MCP server for accessing Turkish legislation (laws, regulations, decrees) via the Adalet Bakanligi API, providing search, full-text retrieval, and structured citations.4Apache 2.0
Related MCP Connectors
Japan Law MCP — Japanese national laws & ordinances via the e-Gov Law API.
MCP for CanLII: Canadian case law and legislation metadata (federal, provincial, territorial).
Public Indian legal search MCP for Roop judgments, statutes, and corpus grounding.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/matematicsolutions/legalize-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server