{"id":51576135,"url":"https://github.com/matematicsolutions/legalize-mcp","last_synced_at":"2026-07-11T00:31:49.934Z","repository":{"id":369119074,"uuid":"1284812306","full_name":"matematicsolutions/legalize-mcp","owner":"matematicsolutions","description":"MCP server over the legalize-dev law-as-git corpus - 37 jurisdictions of legislation as versioned Markdown with ELI-style citations. RODO-safe.","archived":false,"fork":false,"pushed_at":"2026-07-03T16:40:51.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-03T18:26:58.800Z","etag":null,"topics":["eli","eu","gdpr","law","law-as-git","legaltech","legislation","mcp","model-context-protocol","rodo"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matematicsolutions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-30T08:08:56.000Z","updated_at":"2026-07-03T16:40:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/matematicsolutions/legalize-mcp","commit_stats":null,"previous_names":["matematicsolutions/legalize-mcp"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/matematicsolutions/legalize-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matematicsolutions%2Flegalize-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matematicsolutions%2Flegalize-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matematicsolutions%2Flegalize-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matematicsolutions%2Flegalize-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matematicsolutions","download_url":"https://codeload.github.com/matematicsolutions/legalize-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matematicsolutions%2Flegalize-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35347554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-10T02:00:06.465Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eli","eu","gdpr","law","law-as-git","legaltech","legislation","mcp","model-context-protocol","rodo"],"created_at":"2026-07-11T00:31:49.069Z","updated_at":"2026-07-11T00:31:49.909Z","avatar_url":"https://github.com/matematicsolutions.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# legalize-mcp\n\n\u003c!-- mcp-name: io.github.matematicsolutions/legalize-mcp --\u003e\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). MIT-licensed source corpus; 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` — `\"\u003ctitle\u003e (\u003cidentifier\u003e)\"`.\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\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`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 \u0026\u0026 .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 under the MIT License.\nThis connector does not redistribute the corpus; it reads it on demand.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatematicsolutions%2Flegalize-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatematicsolutions%2Flegalize-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatematicsolutions%2Flegalize-mcp/lists"}