Tr Eli Mcp

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

MCP server for Turkish legislation (Adalet Bakanligi Bedesten API): verifiable citations.

概覽

AI 產生的概覽

讓助理檢索土耳其法規,並取得全文、目錄與可驗證的引註,資料來自司法部公開的 Bedesten API。

可以做什麼
提供依標題或全文檢索土耳其法規的工具,可依類型與編號篩選,並能取得單一文件的全文或條文樹。也會列出所有法規類型及其即時文件數量,並說明此連接器涵蓋與不涵蓋的範圍。每個回應都帶有引註契約:可解析的 mevzuat.gov.tr 標準識別碼、土耳其文的人類可讀引註,以及官方來源連結。
適用情境
當助理需要附可驗證引註的土耳其法律、法令、條例、總統令或公告時使用。適合必須精確引用土耳其法規的法律檢索與草擬工作。它只涵蓋法規,不含判例。
執行需求
以本機 Python 套件執行(PyPI 套件 tr-eli-mcp,可用 uvx 或 python -m tr_eli_mcp 啟動)。不需要 API 金鑰或帳號。需要連線 Bedesten API 與 mevzuat.gov.tr 的網路,以及用於快取與稽核記錄的本機檔案系統存取權。選用環境變數可設定基礎網址、快取目錄、稽核目錄與執行時設定網址。
安裝前請注意
對公開 API 唯讀;查詢內容與文件編號會傳送至司法部資料來源。每次呼叫會在本機檔案附加一行稽核記錄,並在磁碟上快取回應。首次使用時會從 GitHub Releases 取得一個小型設定檔,除非將 TR_ELI_RUNTIME_URL 設為空。在啟用 Smart App Control 的 Windows 11 上,uvx.exe、pip.exe 等未簽署啟動器會被封鎖;README 建議改用 python -m 執行,而非關閉該保護。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

tr-eli-mcp

An MCP server for Turkish legislation (Kanun/laws, KHK/decree-laws, Tuzuk/statutes, Yonetmelik/regulations, Cumhurbaskanligi Kararnamesi/presidential decrees, Teblig/communiques and more), served as a keyless JSON API by the Adalet Bakanligi (Ministry of Justice) at bedesten.adalet.gov.tr/mevzuat. It gives an AI agent legislation text and metadata with a verifiable citation: a resolvable identifier, a human-readable citation, and a link to the official source.

Part of the eu-legal-mcp line by MateMatic — one connector per country, the same citation contract everywhere. Turkey is included under this line's broader "Europe" framing (Council of Europe member, EU accession candidate), alongside connectors that map strictly to EU-27 membership.

On ELI. Turkey does not publish native ELI (/eli/) URIs. To keep the line's contract honest, eli_uri carries the canonical, resolvable mevzuat.gov.tr URL instead — e.g. https://www.mevzuat.gov.tr/mevzuat?MevzuatNo=5237&MevzuatTur=1&MevzuatTertip=5 — which every Bedesten search record already supplies. The connector never fabricates an /eli/ URI and says so in its tool instructions. See DISCOVERY.md.

On case law. This connector covers legislation only. Yargitay (Court of Cassation) decision search was unreachable (TCP timeout) from the build network, and Anayasa Mahkemesi (Constitutional Court) exposes only a client-rendered SPA with no discovered server API. Neither is wired up here — see DISCOVERY.md for what was actually checked.

Tools

ToolWhat it does
tr_search_legislation(query, mevzuat_turu=None, mevzuat_no=None, baslikta_ara=True)Search Turkish legislation by title and/or full text, optionally filtered by type and number.
tr_get_legislation_content(mevzuat_id)The full text of one document (HTML converted to plain text).
tr_get_legislation_toc(mevzuat_id)The article tree (madde agaci / table of contents) of one document.
tr_list_legislation_types()Enumerate all legislation types with live document counts (KANUN, KHK, YONETMELIK, ...).
tr_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 canonical, resolvable mevzuat.gov.tr identifier (see the ELI note above).
  • human_readable_citation — the Turkish citation convention: law number + name + Official Gazette (Resmi Gazete) date/number, e.g. 5237 sayili Turk Ceza Kanunu (Resmi Gazete: 12/10/2004, Sayi: 25611).
  • source_url — the same canonical mevzuat.gov.tr page.

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

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

json
{  "mcpServers": {    "tr-eli-mcp": {      "command": "tr-eli-mcp",      "env": {        "TR_ELI_BASE_URL": "https://bedesten.adalet.gov.tr/mevzuat",        "TR_ELI_CACHE_DIR": "~/.matematic/cache/tr-eli",        "TR_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 tr-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 tr-eli-mcppython -m tr_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 tr_eli_mcp.

json
{ "mcpServers": { "tr-eli-mcp": { "command": "python", "args": ["-m", "tr_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 Adalet Bakanligi Bedesten API; nothing is sent beyond the query / document id.
  • Audit log. Every call appends one JSON line to ~/.matematic/audit/tr-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 (tr-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. TR_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. Identifiers and titles are parsed from the source record. If Bedesten's schema 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, and what was ruled out).

Tests

bash
pytest tests/test_instructions_drift.py   # offlinepytest tests/test_smoke.py                # live Bedesten API

Licence

Apache-2.0. The Turkish legislation served is official public data of the Republic of Turkey; this connector adds no rights over it.

來源:README.md,提交 1f8a0bf

工具

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

版本歷史

2
  1. v0.3.4最新Sep 24, 2026
  2. v0.3.3Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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