The world's law in one git history, with an MCP server for Claude
The lexifina/global-law project puts the law of many jurisdictions into a single git history, where every word is traced to the law that wrote it, for any country and any date; it expands an earlier project that did the same for the US Code, which reached #1 on Hacker News on 28/10/26. Each jurisdiction's law is its own repository, in which every commit is one law taking effect, authored by that law; the top-level repository interleaves these histories in the order the changes took force, so a single commit there is the state of all of them on one day. The tree covers 193 UN members, other territories with their own ISO code, and the EU; Germany's submodule[1] holds the Grundgesetz since 1949 and every other federal act since 2019, while France has sources but no history yet. The project itself is free to use under CC0[2], though the law text in each country's repository stays under that repository's own terms.
Coverage differs widely: Czechia, Spain, Switzerland, Georgia and Malta hold whole statute books, the US corpus is nine titles of the United States Code, and the UK corpus is the special educational needs law; each corpus's history is labelled in-force (dated official versions), replayed (rebuilt by applying each amending act) or current-only (today's text only). A Python Model Context Protocol[3] (MCP) server, tools/mcp_server.py, lets Claude or any other MCP client ask what the law said on a date; it needs only Python 3.10+ and git, runs locally over stdio, changes nothing and makes no network calls. It offers 18 read-only tools, three prompts and a resource template, covering finding a provision, reading it on a date, attributing each word to a law, comparing dates, searching the text and change notes, and resolving the citations in a brief.
The first commit, dated 1 January 1970, holds the jurisdiction tree and no law; every later commit moves exactly one corpus to its next commit, and its trailers[4] name the corpus, the corpus commit, the law and the in-force date. Because git cannot store dates before 1970, Grundgesetz changes that took effect earlier carry 1970 commit dates one second apart, and the tools read the In-force trailer instead; laws adopted but not in force stay on each corpus's future branch, and retroactive laws are recorded in commit messages without changing the text shown on earlier dates. The build is deterministic: when a corpus is rebuilt, the repository is rebuilt from scratch and force-pushed; command-line tools show, blame and diff a provision on a date, and plain git commands such as git grep --recurse-submodules search all the law in force at a moment.
Read the original github.comDiscussion
Sources
-
GitHub
Using Claude to unify Global Legislation and Caselaw in Git
OriginalDiscussion · 70Discussion · 25Discussion · 4Discussion · 2


