Jp Eli Mcp

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

MCP server for Japan's e-Gov law search API: search, fetch, and cite national legislation.

概覽

AI 產生的概覽

面向日本官方 e-Gov 法令檢索 API 的唯讀 MCP 伺服器,讓助理搜尋、取得並引用日本國家法律法規。

可以做什麼
  • 依法律標題片段或全文關鍵字搜尋法律,並回傳醒目片段
  • 取得法律中繼資料:標題、法令編號、公布日期
  • 依法律 ID 與條文號取得單一條文,或取得法律全文(超長法律會被截斷)
  • 說明涵蓋範圍:包含哪些法律類別、擷取時間,以及明確未涵蓋的內容
  • 在每次回應附上引用資訊:穩定的 e-Gov 瀏覽連結、可讀引用文字與來源 URL
適用情境
適合助理需要查閱日本法律、政令或省令並提供可驗證引用的情境,例如法律研究、法遵查核,或需要依據現行日本法律的文書撰寫。
執行需求
以本機 Python 套件(jp-eli-mcp)執行,通常透過 uvx 或 python -m jp_eli_mcp 啟動;README 指出正式發布前可能需從原始碼安裝。不需要 API 金鑰。選用環境變數可設定 API 基礎位址、快取目錄與稽核目錄。需要能連線至 e-Gov 法令 API 的網路。
安裝前請注意
對 e-Gov 公開資料為唯讀操作,但每次工具呼叫都會附加寫入本機稽核日誌檔。選用環境變數可改寫 API 基礎位址,並改變快取與稽核檔案的寫入位置。超長法律的全文會被截斷,長篇法規可能不完整;請以回傳的來源 URL 核對引用。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

jp-eli-mcp

An MCP server for Japan's official e-Gov law search API (laws.e-gov.go.jp), run by the Digital Agency. It searches, fetches, and cites national legislation - acts, cabinet orders, ministerial ordinances - with a verifiable citation on every response.

Part of the MateMatic eu-legal-mcp production line, extended into Asia. Same citation contract (a stable identifier + a human-readable citation + a source URL) as the 18 EU/EEA connectors, adapted for a jurisdiction with no ELI scheme.

Scope. Discovery is by law title (jp_search_laws) or full-text keyword (jp_search_by_keyword); fetch a specific article (jp_get_article) or the full text (jp_get_full_text, truncated for very large laws such as the Civil Code). Every response carries a dataset_note.

Licence. e-Gov law data is official public information published by the Japanese government as open data (keyless, REST/JSON). This connector relays it with attribution and a source_url.

The tools

ToolWhat it does
jp_search_lawsSearch laws by (partial) title.
jp_search_by_keywordFull-text search across all laws, with highlighted snippets.
jp_get_lawMetadata for a law by law_id: title, law number, promulgation date.
jp_get_articleThe text of one article of a law, by law_id and article_num.
jp_get_full_textThe full text of a law (truncated at ~300,000 characters).
jp_coverageDeclare 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 contract: eli_uri (Japan has no ELI - this is the durable e-Gov viewer URL, e.g. https://laws.e-gov.go.jp/law/129AC0000000089, see eli_note), human_readable_citation (e.g. 民法(明治二十九年法律第八十九号)), and source_url (the machine-readable API URL).

Install

Not yet on PyPI - install from source until the first release ships:

bash
git clone https://github.com/matematicsolutions/jp-eli-mcpcd jp-eli-mcppip install -e .

Once released, this will be uvx jp-eli-mcp.

Configuration via env:

  • JP_ELI_BASE_URL - default https://laws.e-gov.go.jp/api/2
  • JP_ELI_CACHE_DIR - default ~/.matematic/cache/jp-eli
  • JP_ELI_AUDIT_DIR - default ~/.matematic/audit

No API key. e-Gov's law search API is keyless.

Configure (Claude Code / any MCP client)

json
{  "mcpServers": {    "jp-eli-mcp": { "command": "jp-eli-mcp" }  }}

Windows 11 with Smart App Control

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

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

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

Governance

  • Public data only - read-only against e-Gov; no client data leaves the machine.
  • Audit log - every tool call appends one JSON line to ~/.matematic/audit/jp-eli-mcp.jsonl.
  • Vendor-neutral - talks only to laws.e-gov.go.jp; no LLM provider, no telemetry.
  • Verifiable citations - every response is independently checkable via source_url.

See CONSTITUTION.md and DISCOVERY.md.

Tests

bash
pip install -e ".[dev]"pytest tests/test_instructions_drift.py -v   # offlinepytest tests/test_smoke.py -v                # hits live e-Gov

Licence

Apache-2.0. © Matematic Solutions / Wieslaw Mazur.

來源:README.md,提交 d5769b2

工具

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

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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