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.

概覽

AI 產生的概覽

本機 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,可用環境變數覆寫路徑、索引網址、校驗碼或自動建置。
安裝前請注意
此伺服器擷取公開入口網站而非使用官方 API,結果取決於這些網站持續可用且不變。它會在 ~/.matematic 下寫入本機 SQLite 索引與工具呼叫稽核日誌(不記錄原始查詢文字)。涵蓋範圍有限:最高法院檢索只涵蓋較窄的公開資料庫,而非付費的 Italgiure 服務;引註核對只標出無法查證之處,並不證明正確。不構成法律意見。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 It Eli Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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 a dataset_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)

ToolWhat it does
it_list_codesThe major Italian codes and consolidated acts (Codice civile, penale, di procedura, privacy/GDPR, CAD, D.Lgs. 231/2001, Costituzione, L. 241/1990) with their canonical URN.
it_resolveTurns act coordinates (act_type, year, number) into a canonical, resolvable URN:NIR. Offline.
it_get_actFetches act metadata (title, date, ELI, article count) for a code name, URN, ELI path, or normattiva.it URL.
it_get_textFetches the text of a whole act or a single article - with at_date for the point-in-time version.

Constitutional case-law tools (Corte Costituzionale, local index)

ToolWhat it does
it_case_searchFull-text search over the decisions (heading, reasoning, operative part). Filters by year and type (sentenza/ordinanza). Accent-insensitive.
it_case_get_decisionThe full text of one decision, by ECLI (ECLI:IT:COST:2024:1) or by year + number.
it_case_recentThe most recent decisions (newest first).
it_case_statsIndex coverage: total decisions, year range, counts by type, last build time.

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:

bash
italy-eli-mcp-caselaw-ingest

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)

ToolWhat it does
it_cassazione_searchFull-text search over decision bodies. Filters: chamber ('civile'/'penale'), sub_chamber ('lavoro'/'tributaria'), anno (year). Returns ranked hits with a highlighted snippet.
it_cassazione_getThe full text of one decision by its SentenzeWeb sic_id (from a search hit).

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)

ToolWhat it does
it_ga_searchFull-text search and/or decision-number lookup over the Giustizia Amministrativa portal - one backend for the whole administrative jurisdiction (3.4M+ provvedimenti). Filters: sede, tipo, numero, anno. Hits carry the court's native ECLI.
it_ga_get_decisionThe full text of one decision by its document_url (taken verbatim from a search hit).

No ingest step - every call queries the portal's own public decision search live.

Citation verification (anti-hallucination)

ToolWhat it does
it_verify_citationsExtracts Italian legal citations from any text (a drafted answer, a memo, a contract clause) and verifies each one against its source. Statute citations (art. 2043 c.c., art. 5 della legge 241/1990, artt. 1341 e 1342 c.c., commi) are checked against the live Normattiva act, article by article; ECLI:IT:COST:* citations are checked against the local Constitutional Court index.
it_coverageDeclare what this connector covers, when each family was captured, and - explicitly - what it does NOT cover. Every gap carries a fallback.

What it reports, per citation and overall:

  • Existence with a range hint. A cited article that does not exist comes back as not_found with 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_DETECTED and the tool response carries isError=true, so a calling model cannot mistake it for a passed check. When the text contains no citations at all, the status is NO_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 with it_cassazione_search / it_ga_search.
it_verify_citations(text="L'art. 2043 c.c. e l'art. 9999 della legge 241/1990 si applicano.")→ status: "HALLUCINATION_DETECTED" (isError=true)  citations: [    {raw: "art. 2043 c.c.", status: "verified", ...},    {raw: "art. 9999 della legge 241/1990", status: "not_found",     range_hint: "art. 9999 does not exist in this act; the act has <N> articles, ..."}  ]  gaps: []

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

it_list_codes()→ [{key: "codice civile", urn: "urn:nir:stato:regio.decreto:1942-03-16;262", ...}, ...]
it_resolve(act_type="d.lgs", year=2001, number=231)→ {urn: "urn:nir:stato:decreto.legislativo:2001;231",   human_readable_citation: "Decreto legislativo n. 231/2001", source_url: "..."}
it_get_text(reference="codice civile", article="2043")→ art. 2043 c.c. (Risarcimento per fatto illecito), with eli_uri + source_url
it_get_text(reference="codice privacy", article="1", at_date="2010-01-01")→ the privacy code's art. 1 as it stood on 1 January 2010
it_cassazione_search(query="responsabilita medica", chamber="civile", limit=5)→ {total_found: 81177, hits: [{sic_id: "snciv2025224393O",   citation: "Cass. civ., ord. n. 24393/2025", snippet: "...", source_url: "..."}, ...]}
it_cassazione_get(sic_id="snciv2025224393O")→ {citation: "Cass. civ., ord. n. 24393/2025", testo: "...", massima: "...", source_url: "..."}

Install

As a Claude plugin (Claude Code or the desktop app, needs uv); see plugin/README.md for what it sends and stores:

/plugin marketplace add matematicsolutions/it-eli-mcp/plugin install it-eli-mcp@it-eli-mcp

As a standalone server, from PyPI (uvx italy-eli-mcp), or from source:

bash
cd it-eli-mcppip install -e .

Configure (Claude Code / any MCP client)

Copy .mcp.json.example:

json
{  "mcpServers": {    "it-eli-mcp": { "command": "italy-eli-mcp" }  }}

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:

bash
python -m pip install italy-eli-mcppython -m it_eli_mcp

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.

json
{ "mcpServers": { "italy-eli-mcp": { "command": "python", "args": ["-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 - default https://www.normattiva.it
  • IT_ELI_CACHE_DIR - default ~/.matematic/cache/it-eli
  • IT_ELI_AUDIT_DIR - default ~/.matematic/audit
  • IT_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 .sha256 sidecar
  • IT_ELI_CASELAW_AUTOBUILD - 0 to skip the automatic local build (prefer the index_missing error)

Tests

bash
pip install -e ".[dev]"pytest -m "not smoke"   # offline (URN, Akoma Ntoso parser, case-law index, drift)pytest -m smoke         # live: Normattiva + Corte Costituzionale open data + SentenzeWeb

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
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.7.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分