Git for Global Law

Git for Global Law

global-law•bylexifina

A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

License: CC0•Runtime: Awaiting documentation review•Category: file systems-docs

WHAT IT DOES

  • •Offers a Model Context Protocol server with read-only tools for finding and reading law.
  • •Returns the law of any country on any date by reading the In-force date of every commit.
  • •Traces who wrote each word, compares dates and a provision's history, and searches the text and changes.
  • •Checks a case or brief against the law in force and lists decisions that applied a provision.

BEST FOR

  • •Asking what a specific provision said on a date and which law last changed it.
  • •Comparing dates and reviewing a provision's history.
  • •Checking whether a case or brief matches the law in force, and finding decisions that applied a provision.

ABOUT GLOBAL-LAW

Git for Global Law is cataloged as an MCP server attributed to lexifina. A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force. It is categorized under file systems-docs. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: CC0. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Git for Global Law are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What can the MCP server do?

It provides read-only tools to find a provision, read it on a date, trace the law behind each word, compare dates, review a provision's history, search text and changes, and check a case or brief against law in force.

Can it return law for historical dates?

Yes; the tools read the In-force date of every commit, so they give the law of any country on any date.

Does it check case law?

`check_precedent` lists the decisions that applied a provision and says whether the text each one applied is still in force.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 851c418e707f · 采集于 2026-11-13 05:37:33 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Git for Global Law

The world's law in one git history. Every word traced to the law that wrote it for any country and any date.

An expansion of the same for the US Code, #1 on Hacker News (28/10/26). Semantic, searchable law on a global scale.

https://github.com/user-attachments/assets/f24f3411-24d9-416a-8c45-9cebc817c64e

Free to use: CC0. Fork it, build on it, ship it in a product: no permission or credit needed. The law text sits in each country's repository, under that repository's own terms.

Each jurisdiction's law is its own repository, lexifina/<country>-law, where every commit is one law taking effect, written by that law. This repository holds them all as submodules, arranged by jurisdiction, and moves each one forward to its latest commit. The tools read the In-force date of every commit, so they give the law of any country on any date.

global-law/
├── manifest.json              every corpus: path, repository, coverage and dates
├── jurisdiction.json          the world, and the jurisdictions in it
├── germany/bund/acts/         a country's law (submodule)
├── brazil/bahia/acts/         a state's
├── brazil/bahia/salvador/acts/  a city's
└── …

Start

git clone --depth 1 https://github.com/lexifina/global-law && cd global-law
python3 tools/countries.py add united-states/federal/usc   # one corpus; every country is several GB
python3 tools/law.py show 2022-05-01 united-states/federal/usc/title-11/1182.md

On Windows, type py or python where these say python3.

--depth 1 downloads the index without its whole history, a fraction of the size. The tools never read that history, so they work the same. To have it without its file contents, clone with --filter=blob:none instead. For every country, add --recurse-submodules. Don't clone a country's repository with --depth: its dates are read from its whole history, and countries.py add fetches all of it.

From an AI model (MCP)

tools/mcp_server.py is a Model Context Protocol server with 18 read-only tools: find a provision, read it on a date, who wrote each word, compare dates, a provision's history, search the text and the changes, and check a case or a brief against the law in force. It needs only Python 3.9+ and git, runs on your machine and makes no network calls.

The clone carries the setup for Claude Code, Cursor, VS Code and Codex, so the server starts when you open the folder. For another client:

{ "mcpServers": { "global-law": { "command": "git", "args": ["-C", "/path/to/global-law", "-c", "alias.global-law-mcp=!sh tools/mcp.sh", "global-law-mcp"] } } }

Then ask, for example, "What did 11 U.S.C. §1182(1) say on 1 May 2022, and which law last changed it?" MCP.md has every tool and the details.

Command line

python tools/law.py world 2022-05-01                       every corpus on that day
python tools/law.py show 2022-05-01 <path>                 a provision on a date
python tools/law.py blame 2022-07-01 <path>                the law behind each line
python tools/law.py words 2022-07-01 <path>                the law behind each word
python tools/law.py diff 2022-05-01 2022-07-01 <path>      what changed between two dates
python tools/law.py laws 1990-01-01 1990-12-31 germany     the laws that took effect

Dates are YYYY-MM-DD. The first read of a corpus indexes its history once and keeps the index in .git/global-law-cache.

  • A corpus moved to a new folder still answers under its old path (data/moved-paths.tsv). After a pull that moves corpora, run git submodule sync and git submodule update --init.
  • manifest.json and the jurisdiction.json files are written by tools/describe.py.

Case law

Court decisions sit beside the law in <country>/<court>/caselaw, one file and one commit per published decision, dated the day it was decided. manifest.json gives each corpus's court, coverage and gaps; where a source's licence asks for credit, the tools show it as a Credit: line.

A decision is a ruling, not a law (Kind: court), so the tools leave case law out of everything about law (laws, searches, change lists) unless you name it. Each corpus also files, under the law's own paths, the decisions that cite each article, with the version of the law in force on the day decided.

python tools/countries.py add netherlands/caselaw                   a country's case law (not added with the country)
python tools/law.py laws 2024-01-01 2024-01-31 netherlands/caselaw   decisions given in a window
python tools/law.py caselaw-index                                   after a pull: index the case law checked out

From an assistant, check_precedent lists the decisions that applied a provision and says whether the text each one applied is still in force, and what_else_changes counts them. find_provision and law_details take a court's own references (an ECLI, a docket or case number, a reporter citation), and resolve_citations reads citations of law in each country's usual form (Art. 336 OR, § 823 Abs. 1 BGB, article 1240 du code civil).

More

Videos

See all videos

https://github.com/user-attachments/assets/6020acb1-53f3-4b65-94a4-fe132b867358

https://github.com/user-attachments/assets/3e3076d7-cfb4-4e0a-8552-2926a630fc8e

How updates are checked and pinned every 15 minutes (Monitoring); how each figure in the film was counted:

https://github.com/user-attachments/assets/ebfea880-c7f7-4310-b8fb-b64849811fe3

License

This repository is CC0. The law text is in each country's repository, under that repository's own terms.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Git for Global Law from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/global-law)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related file systems-docs MCP Servers

Alternative and complementary servers in the same category

View all in file systems-docs →
LoreKeeper MCP server
lorekeeper-rpg-lorekeeper-com•lore-keeper

Hosted MCP server for tabletop RPG worlds that organizes messy notes and documents into a private store and lets MCP apps search lore, read documents, find characters, and optionally generate character or world pictures.

Repository stats unavailable
Files & Documentation

An MCP server that gives AI assistants scoped file system operations inside a project directory, with read-only reference projects plus git and GitHub tools.

Repository stats unavailable
Files & Documentation
Knowledge Base MCP Server
knowledge-base-mcp-server•jeanibarz

An MCP server that makes a folder of markdown notes searchable by meaning from an AI client or shell.

Repository stats unavailable
Files & Documentation