Hu Eli Mcp

io.github.matematicsolutions由 GitHub 帳號 matematicsolutions 發布v0.3.3更新於 Oct 24, 2026

MCP server for Hungarian legislation (Nemzeti Jogszabalytar): native ELI and verifiable citations.

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理依原生 ELI 從匈牙利官方法規資料庫 Nemzeti Jogszabálytár 取得法規,並附可驗證的引註。

可以做什麼
依 ELI(類型、年份、發布機關、序號)查詢法律或其他法規,回傳中繼資料與引註資訊,包括 ELI URI、可讀引註和官方頁面連結。取得已解析文件的完整 HTML 內容。列出有效的文件類型代碼與發布機關代碼,以便建立正確的 ELI 參照。說明此連接器涵蓋的範圍與未涵蓋的內容,並為每個缺口提供替代做法。文件必須以已知的 ELI 定位,不支援自由文字搜尋。
適用情境
適合助理需要閱讀或引用匈牙利法律與法令、且已知確切 ELI 或年份與序號的情況,例如引用民法典或核對某法令的中繼資料。不適合對匈牙利法律做探索式關鍵字搜尋。
執行需求
以 Python 套件形式在本機執行(可用 uvx 或 pip 安裝,再以模組方式啟動)。需要連線至官方網站 njt.jog.gov.hu 的網路存取。不需帳號、API 金鑰或身分驗證。可選環境變數用於設定基礎位址、快取目錄與稽核目錄。
安裝前請注意
對公開資料僅供讀取,但每次呼叫都會附加寫入本機稽核日誌檔。首次使用時可能從專案的 GitHub Releases 取得一個小型設定檔,可將 HU_ELI_RUNTIME_URL 設為空值來關閉。在啟用 Smart App Control 的 Windows 11 上,未簽署的啟動器會被封鎖;README 建議改用已簽署的 Python 解譯器執行,而非關閉該保護。

安裝

在 SourceWeft 中

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

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

hu-eli-mcp

An MCP server for Hungary's official national legislation database, the Nemzeti Jogszabalytar (NJT, njt.jog.gov.hu), maintained by MKIFK. It gives an AI agent a piece of Hungarian legislation resolved by its native ELI (European Legislation Identifier), with a verifiable citation: the ELI itself, a human-readable citation, and a link to the official source.

Part of the eu-legal-mcp line by MateMatic — one connector per EU member state, the same citation contract everywhere.

On ELI. Unlike the Netherlands and Sweden (earlier connectors in this line, neither of which publishes native ELI), Hungary has a genuine, documented national ELI implementation since 2023 (njt.jog.gov.hu/eli/urisemak). eli_uri is therefore the real /eli/ URI the tool resolved — never a substitute identifier. See DISCOVERY.md.

Tools

ToolWhat it does
hu_get_act(year, serial)Metadata for a Hungarian Act (torveny) by ELI, e.g. year 2013, serial 5 (the Civil Code). No issuer code needed.
hu_get_legislation(doc_type, year, issuer, serial)Metadata for any other legislation (decrees etc.) by ELI — type, year, issuer (case-sensitive) and serial.
hu_get_text(doc_type, year, serial, issuer=None)The full document HTML content for either an Act or other legislation.
hu_list_doc_types()Valid NJT document-type codes (e.g. TV=Act, R=decree).
hu_list_issuers()Valid NJT issuer codes (e.g. Korm=Government) — note the exact casing matters.
hu_coverage()Declare what this connector covers, when each family was captured, and - explicitly - what it does NOT cover. Every gap carries a fallback.

Every response carries the citation contract:

  • eli_uri — the native ELI URI resolved, e.g. https://njt.jog.gov.hu/eli/TV/2013/5.
  • human_readable_citation — built from the parsed title + subtitle, e.g. "2013. évi V. törvény (a Polgári Törvénykönyvről)".
  • source_url — the browsable njt.jog.gov.hu/jogszabaly/... document page.

No free-text search

NJT has no REST/JSON API and its search/browse UI is a JavaScript SPA requiring a session (not usable headlessly). Documents must be addressed by a known ELI — use hu_list_doc_types / hu_list_issuers to discover valid codes, then hu_get_act / hu_get_legislation. An unresolvable ELI (wrong year/serial/issuer, or wrong issuer-code case) surfaces as not_found — NJT itself redirects it to a search-assist page rather than a 404.

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/hu-eli-mcp/plugin install hu-eli-mcp@hu-eli-mcp
bash
pip install -e ".[dev]"

Register it with your MCP client (see .mcp.json.example):

json
{  "mcpServers": {    "hu-eli-mcp": {      "command": "hu-eli-mcp",      "env": {        "HU_ELI_BASE_URL": "https://njt.jog.gov.hu",        "HU_ELI_CACHE_DIR": "~/.matematic/cache/hu-eli",        "HU_ELI_AUDIT_DIR": "~/.matematic/audit"      }    }  }}

Windows 11 with Smart App Control

Smart App Control blocks unsigned executables, which covers uvx.exe, pip.exe and the hu-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 hu-eli-mcppython -m hu_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 hu_eli_mcp.

json
{ "mcpServers": { "hu-eli-mcp": { "command": "python", "args": ["-m", "hu_eli_mcp"] } } }

Do not turn Smart App Control off to work around this - it cannot be re-enabled without reinstalling Windows.

Design

  • Public data only. Read-only against the keyless, official njt.jog.gov.hu; nothing is sent beyond the ELI path being resolved. Honors robots.txt (never calls /search/*).
  • Audit log. Every call appends one JSON line to ~/.matematic/audit/hu-eli-mcp.jsonl (record-keeping).
  • Network - the server talks to the official source(s) named above and the local filesystem. Once, on first use, it also fetches a small configuration file (hu-runtime.json.gz, updated source addresses) from this repository's GitHub Releases. That request carries no query content; GitHub's download counter for the file is the only usage signal we see. HU_ELI_RUNTIME_URL="" turns it off; the Claude plugin ships with it off. No LLM provider, no other telemetry. Own backoff + on-disk cache.
  • No fabrication. The ELI, title and citation are parsed from the resolved document page. If NJT's markup changes, the connector fails loudly rather than returning stale or invented data.

See CONSTITUTION.md (the 4 principles) and DISCOVERY.md (how the source was mapped, including the njt.hu → njt.jog.gov.hu domain discovery and the issuer-code casing gotcha).

Tests

bash
pytest tests/test_instructions_drift.py   # offlinepytest tests/test_smoke.py                 # live NJT

Licence

Apache-2.0. The Hungarian legislation served is official public data of Hungary; this connector adds no rights over it.

來源:README.md,提交 b9f45e4

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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