
Legalize Mcp
io.github.matematicsolutions由 GitHub 帳號 matematicsolutions 發布v0.2.4更新於 Oct 24, 2026
Legislation for 32 jurisdictions (21 EU) as law-as-git, keyless, with ELI-style citations.
發布方自己的服務:Legalize
概覽
唯讀 MCP 伺服器,讓助理透過讀取公開的 legalize-dev git 語料庫,查詢 32 個司法管轄區的國家立法並附上引註。
- 可以做什麼
- 列出司法管轄區,可僅篩選歐盟,含代碼、名稱與儲存庫,並說明本連接器涵蓋與未涵蓋的範圍及缺口備援方案。依關鍵字檢索某國法律,回傳法律識別碼與片段。取得法律的前置中介資料以快速核對引註,或依法律識別碼取得完整中介資料與正文,並可用提交 SHA 取歷史版本。讀取某部法律的修訂時間軸(提交紀錄),其 SHA 可回傳給取得工具以取舊版本。每次回應都附上法律自身前置中介資料中的官方來源網址、實際讀取的 GitHub 副本,以及人類可讀引註。
- 適用情境
- 適合需要以單一伺服器檢索或引用多個歐洲及其他司法管轄區立法的情境,例如確認某次修訂時生效的法律版本,或依官方來源中介資料核對引註。適用於對來源與版本準確性有要求的研究與起草工作。
- 執行需求
- 以 Python 套件形式在本機執行(uvx 或 pip),需要 Python。需要連線至 GitHub 的網路存取,僅進行唯讀 GET 請求。GITHUB_TOKEN 或 GH_TOKEN 為選用:關鍵字檢索必須使用,並可提高修訂時間軸的 GitHub 速率限制。LEGALIZE_AUDIT_DIR 可指定稽核日誌位置。在啟用 Smart App Control 的 Windows 11 上,應透過已簽署的 Python 解譯器執行,而非被封鎖的啟動器。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Legalize Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
legalize-mcp
Unofficial. Not affiliated with, or endorsed by, the legalize-dev project. An official legalize-dev MCP server is in development against the legalize.dev API; this one reads the public git corpus instead.
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). 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 self-hostable, with a narrow data path: nothing leaves the user's machine except read-only GETs to GitHub.
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
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
Claude Code (.mcp.json):
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:
pip.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.
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
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
Attribution
Legislative data © the respective national authorities (see each law's source). Corpus
normalisation by the legalize-dev project.
Licence of the corpus is per country, not MIT. The MIT licence covers legalize-dev's
pipeline and tooling. Each country repository carries terms inherited from its own official
source - legalize-es follows the BOE reuse conditions, which make citing the source
mandatory; legalize-at is CC BY 4.0; others differ. Check the country repository before
you rely on, quote or redistribute a text. Treating the corpus as MIT would skip an
attribution obligation you actually have.
Correction supplied by Enrique Lop (legalize-dev) in issue #18, 2026-08-24. This connector does not redistribute the corpus; it reads it on demand.
來源:README.md,提交 944721f
工具
0版本歷史
1- v0.2.4最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分