
It Eli Mcp
io.github.matematicsolutions由 GitHub 账号 matematicsolutions 发布v0.7.3更新于 Nov 3, 2026
Italian law: Normattiva legislation + Corte Costituzionale, Cassazione and TAR case law, live.
概览
本地 MCP 服务器,让助手实时查询意大利法律:Normattiva 法规文本,以及宪法法院、最高法院和行政法院判例。
- 可以做什么
- 列出、解析并获取意大利法规:主要法典、URN:NIR 与 ELI 标识、法规元数据、全文或单条条文,并可按历史日期取版本
- 检索并读取宪法法院裁判:本地索引全文搜索、按 ECLI 或年份加编号取全文、最近裁判与索引统计
- 实时检索并读取最高法院(Cassazione)裁判,可按民事/刑事、分庭和年份筛选
- 实时检索并读取行政法院(国务委员会、C.G.A.R.S.、TAR)裁判,结果带 ECLI
- 核查文稿中的意大利法律引注是否与来源一致,并报告覆盖缺口
- 适用场景
- 适合起草或核对引用意大利法规与判例的答复、备忘录或合同条款,以及需要某法规在特定历史日期的文本或某份具体裁判全文的场景。
- 运行要求
- 以本地 Python 包运行(uvx italy-eli-mcp 或 pip 安装)。需能访问 Normattiva、SentenzeWeb 和 Giustizia Amministrativa 门户,无需 API 密钥。宪法法院索引在首次调用时下载并缓存于 ~/.matematic,可用环境变量覆盖路径、索引地址、校验和或自动构建。
安装
在 SourceWeft 中
- 打开 控制台中的 It Eli Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
it-eli-mcp
An MCP server for Italian law, in two layers:
- Legislation via Normattiva, the official portal of the Ministero della Giustizia. It fetches acts as Akoma Ntoso with verifiable URN:NIR and ELI identifiers, and returns the text as it stood on any past date (multivigenza). Live and keyless.
- Constitutional case law (Corte Costituzionale): a local, keyless full-text index of every decision since 1956, each with its native ECLI, built from the Court's official open data.
- Supreme Court case law (Corte di Cassazione): live, keyless full-text search over SentenzeWeb, the Court's own free public search engine - civil and criminal decisions, full OCR text, no local index to build.
- Administrative case law (Consiglio di Stato, C.G.A.R.S., TAR): live, keyless search over the Giustizia Amministrativa portal's own public decision search - one backend for the whole administrative jurisdiction, 3.4M+ provvedimenti with native ECLI and structured full text.
Italy has the EU's largest legal profession by headcount - roughly 240,000 lawyers per CCBE figures, ahead of Germany and Spain. No live, keyless MCP connector covered its statute book. This one does, and it also covers the constitutional case law.
Part of the MateMatic eu-legal-mcp production line: the Italian sibling of de-eli-mcp (Germany)
and sejm-eli-mcp (Poland), built on the same architecture and citation contract against the
Italian source.
No JSON API. Normattiva does not publish a REST API. This connector drives the same session-based flow a browser uses - resolve a URN, read the act page, fetch its Akoma Ntoso export - so every act comes back as structured XML with its ELI intact. See
DISCOVERY.md.Licence. Italian official legal texts are outside copyright (art. 5, l. 633/1941), and Normattiva declares CC-BY-4.0 for its data from 2026-01-01. This connector relays individual acts on request, with attribution and a
source_url; it does not bulk-harvest the database (Normattiva's terms restrict that). Every response carries adataset_note. (A practitioner's read, not formal legal advice.)Cassazione is NOT Italgiure/ItalgiureWeb. The Court's full-database search (ItalgiureWeb, 35M+ documents) is free only for the judiciary; practitioners pay a subscription. This connector does not use that service. It queries SentenzeWeb (
italgiure.giustizia.it/sncass), a separate, free, public search engine the Court itself publishes, under the Italian Open Data License (IODL 2.0), with no authentication
- verified live during development (see
DISCOVERY.md). Coverage is narrower than the full Italgiure database but real: 420K+ civil and criminal decisions with full OCR text.
Legislation tools (Normattiva, live)
Constitutional case-law tools (Corte Costituzionale, local index)
The case-law tools read a local SQLite index that is provisioned automatically on the first
call - no setup step. On first use the server downloads a small, sha256-verified pre-built
cost.sqlite.gz from the GitHub release (built and attached by CI on each release) and
decompresses it, or, if none is published, builds the index from the Court's open data (all
decisions since 1956); the index is then cached under ~/.matematic and every later call
queries it offline. it_case_stats reports provenance and ingested_at so you can see how
fresh it is.
To refresh, or to pre-build it ahead of time (e.g. in an offline deployment), run:
Tuning env vars: IT_ELI_CASELAW_INDEX_URL (override/disable the pre-built download),
IT_ELI_CASELAW_INDEX_SHA256 (pin the checksum), IT_ELI_CASELAW_AUTOBUILD=0 (skip the
automatic local build). The legislation tools need no index; they fetch live.
Supreme Court case-law tools (Corte di Cassazione, SentenzeWeb, live)
No ingest step - every call queries SentenzeWeb live. Coverage: civil (snciv, ~190K) and
criminal (snpen, ~238K) decisions, including the Labour (szdec:L, ~30K) and Tax (szdec:5,
~59K) sub-chambers, full OCR text.
Administrative case-law tools (Consiglio di Stato, C.G.A.R.S., TAR, live)
No ingest step - every call queries the portal's own public decision search live.
Citation verification (anti-hallucination)
What it reports, per citation and overall:
- Existence with a range hint. A cited article that does not exist comes back as
not_foundwith a hint of what does exist:art. 9999 does not exist in this act; the act has 372 articles, numbered art. 1-372. - Optional content check. A parenthetical description right after a citation
(
art. 2043 c.c. (risarcimento per fatto illecito)) is compared with the real provision using a character-trigram match. A mismatch is a review signal (content_mismatch), never a hard block - paraphrase is legitimate. - Hard semantics. When any cited article does not exist, the result status is
HALLUCINATION_DETECTEDand the tool response carriesisError=true, so a calling model cannot mistake it for a passed check. When the text contains no citations at all, the status isNO_CITATIONS_FOUND- explicitly NOT a verification success. - Structured
gaps. Everything the tool could not verify is listed as a typed gap (out_of_corpus,unparseable_citation,act_unresolvable,upstream_unavailable,comma_not_checkable) instead of being hidden in prose. An act Normattiva cannot resolve is a gap, not a hallucination: existence is unknown, not disproven. Cassazione and administrative-court ECLIs are out of the local corpus; verify those withit_cassazione_search/it_ga_search.
The parse-verify-report loop is adapted from chrisryugj/korean-law-mcp (MIT) - see
THIRD_PARTY.md. The content matcher uses character trigrams (the Korean original uses bigrams,
which fit an agglutinative script; trigrams discriminate better for Italian).
Every legislation response carries the citation contract: eli_uri (e.g.
eli/id/1990/08/18/090G0294/CONSOLIDATED), urn (e.g. urn:nir:stato:legge:1990-08-07;241),
human_readable_citation (e.g. Legge 7 agosto 1990, n. 241), and source_url.
How it identifies an act
- URN:NIR -
urn:nir:{authority}:{type}:{date};{number}. A partial URN with the year alone (urn:nir:stato:legge:1990;241) also resolves, so you can cite an act you only know as "L. 241/1990". - ELI -
eli/id/{year}/{month}/{day}/{code}/CONSOLIDATED, read from the act itself. Never invented.
Examples
Install
As a Claude plugin (Claude Code or the desktop app, needs uv); see plugin/README.md for what it sends and stores:
As a standalone server, from PyPI (uvx italy-eli-mcp), or from source:
Configure (Claude Code / any MCP client)
Copy .mcp.json.example:
Windows 11 with Smart App Control
Smart App Control blocks unsigned executables, which covers uvx.exe, pip.exe
and the italy-eli-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 it_eli_mcp.
Do not turn Smart App Control off to work around this - it cannot be re-enabled without reinstalling Windows.
Environment:
IT_ELI_BASE_URL- defaulthttps://www.normattiva.itIT_ELI_CACHE_DIR- default~/.matematic/cache/it-eliIT_ELI_AUDIT_DIR- default~/.matematic/auditIT_ELI_CASELAW_DB- constitutional case-law index path (default~/.matematic/data/it-eli-caselaw/cost.sqlite)IT_ELI_CASELAW_INDEX_URL- pre-built index download URL (default: the GitHub release asset;''disables)IT_ELI_CASELAW_INDEX_SHA256- pin the expected index checksum instead of fetching the.sha256sidecarIT_ELI_CASELAW_AUTOBUILD-0to skip the automatic local build (prefer theindex_missingerror)
Tests
Audit trail
Every tool call appends one JSON line to ~/.matematic/audit/it-eli-mcp.jsonl (timestamp, tool,
input hash, output size, duration, status) for record-keeping. No raw query text is
stored.
Licence
Apache-2.0. See LICENSE.
来源:README.md,提交 f44873f
工具
0版本历史
1- v0.7.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分