{
  "markdown": "# legalize-mcp\n\n> **Unofficial.** Not affiliated with, or endorsed by, the legalize-dev project.\n> An official legalize-dev MCP server is in development against the legalize.dev API;\n> this one reads the public git corpus instead.\n\n\n<!-- mcp-name: io.github.matematicsolutions/legalize-mcp -->\n\n**One MCP server, 32 jurisdictions (21 EU).** A read-only [Model Context Protocol](https://modelcontextprotocol.io)\nserver over the [legalize-dev](https://github.com/legalize-dev) corpus — national legislation stored\nas **law-as-git**: one law per Markdown file, every reform a Git commit, each with an 8-field\nELI-style frontmatter (Legalize Format Spec v0.2). This connector is\nApache-2.0.\n\nBuilt by [Matematic Solutions](https://matematic.co) as part of the `eu-legal-mcp` line. Unlike the\nsingle-country `*-eli-mcp` connectors, this one serves **many jurisdictions from a single server**,\nbecause the underlying corpus is already normalised to one format.\n\n## Why this exists\n\nEvery response carries the **citation contract** the rest of the line uses:\n\n- `source_url` — the **official** government source from the law's own frontmatter\n  (e.g. `boe.es`, `riigiteataja.ee`, `legifrance.gouv.fr`). Never invented.\n- `github_url` — the verifiable legalize-dev copy actually read.\n- `human_readable_citation` — `\"<title> (<identifier>)\"`.\n\nIt is **RODO/GDPR-safe and self-hostable**: nothing leaves the user's machine except read-only GETs\nto GitHub.\n\n## Jurisdictions\n\nEU: `at be cz de ee es eu fi fr gr ie it lt lu lv nl pl pt ro se sk`\n· Other: `ad ar ch cl co kr li no uk us uy`\n\nCall `legalize_list_countries` for the live list (add `eu_only=true` to filter).\n\n## Tools\n\n| Tool | Keyless? | Purpose |\n| --- | --- | --- |\n| `legalize_list_countries` | ✅ | List jurisdictions (code, name, EU flag, repo). |\n| `legalize_search_laws` | needs `GITHUB_TOKEN` | Keyword search inside a country's laws → `law_id` + snippet. |\n| `legalize_get_meta` | ✅ | Frontmatter only (cheap citation check). |\n| `legalize_get_law` | ✅ | Full metadata + text by `law_id`; pass `sha=` for a historical version. |\n| `legalize_list_reforms` | ✅ | Reform timeline (commits) for a law; SHAs feed `legalize_get_law`. |\n| `legalize_coverage` | Declare what this connector covers, when each family was captured, and - explicitly - what it does NOT cover. Every gap carries a fallback. |\n\n`law_id` is the Markdown **filename stem** (e.g. `BOE-A-1978-31229` for the Spanish Constitution, a\nnumeric id for Estonia). Get it from `legalize_search_laws` or an official citation — there is no\nfuzzy title lookup.\n\n## Install\n\n```bash\nuvx legalize-mcp           # run directly\n# or\npip install legalize-mcp\n```\n\nClaude Code (`.mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"legalize\": { \"command\": \"uvx\", \"args\": [\"legalize-mcp\"] }\n  }\n}\n```\n\n### Windows 11 with Smart App Control\n\nSmart App Control blocks unsigned executables, which covers `uvx.exe`, `pip.exe`\nand the `legalize-mcp.exe` launcher that pip writes at install time. The `python.exe` and\n`py.exe` from the python.org installer are signed by the Python Software\nFoundation, so running the module through the interpreter works:\n\n```bash\npython -m pip install legalize-mcp\npython -m legalize_mcp\n```\n\n`pip.exe` is blocked for the same reason, so install with `python -m pip`, not\n`pip install`. If `python` is not on PATH, use the Windows launcher: `py -3 -m legalize_mcp`.\n\n```json\n{ \"mcpServers\": { \"legalize-mcp\": { \"command\": \"python\", \"args\": [\"-m\", \"legalize_mcp\"] } } }\n```\n\nDo not turn Smart App Control off to work around this - it cannot be re-enabled\nwithout reinstalling Windows.\n\n`GITHUB_TOKEN` (or `GH_TOKEN`) is **optional** — required only for `legalize_search_laws`, and it\nlifts the GitHub rate limit on `legalize_list_reforms`.\n\n## Configuration\n\n| Env var | Default | Purpose |\n| --- | --- | --- |\n| `GITHUB_TOKEN` / `GH_TOKEN` | — | Enables code search; lifts rate limits. |\n| `LEGALIZE_AUDIT_DIR` | `~/.matematic/audit` | JSONL audit log location (AI Act art. 12). |\n\n## Governance\n\nEvery tool call appends one line to `~/.matematic/audit/legalize-mcp.jsonl` (input hash, duration,\nstatus — no payloads). All tools are read-only and idempotent. See `CONSTITUTION.md`.\n\n## Development\n\n```bash\npython -m venv .venv && .venv/Scripts/python -m pip install -e \".[dev]\"\n.venv/Scripts/python -m pytest -q          # offline unit tests\n.venv/Scripts/python -m ruff check src tests\n```\n\n## Attribution\n\nLegislative data © the respective national authorities (see each law's `source`). Corpus\nnormalisation by the [legalize-dev](https://github.com/legalize-dev) project.\n\n**Licence of the corpus is per country, not MIT.** The MIT licence covers legalize-dev's\npipeline and tooling. Each country repository carries terms inherited from its own official\nsource - `legalize-es` follows the BOE reuse conditions, which make citing the source\nmandatory; `legalize-at` is CC BY 4.0; others differ. **Check the country repository before\nyou rely on, quote or redistribute a text.** Treating the corpus as MIT would skip an\nattribution obligation you actually have.\n\n*Correction supplied by Enrique Lop (legalize-dev) in issue #18, 2026-08-24.*\nThis connector does not redistribute the corpus; it reads it on demand.\n",
  "bytes": 5247,
  "sha": "03e6422b73a3f890cdac32441e21dcb704cdc6d267d04ad3c3d2bc41358ce913",
  "repo_slug": "matematicsolutions/legalize-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_matematicsolutions_legalize_mc_5baa2d32/readme"
}