
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 分