{
  "markdown": "# tr-eli-mcp\n\n<!-- mcp-name: io.github.matematicsolutions/tr-eli-mcp -->\n\nAn MCP server for **Turkish legislation** (Kanun/laws, KHK/decree-laws, Tuzuk/statutes,\nYonetmelik/regulations, Cumhurbaskanligi Kararnamesi/presidential decrees, Teblig/communiques\nand more), served as a keyless JSON API by the **Adalet Bakanligi** (Ministry of Justice) at\n`bedesten.adalet.gov.tr/mevzuat`. It gives an AI agent legislation text and metadata with a\nverifiable citation: a resolvable identifier, a human-readable citation, and a link to the\nofficial source.\n\nPart of the **eu-legal-mcp** line by [MateMatic](https://matematic.co) — one connector per\ncountry, the same citation contract everywhere. Turkey is included under this line's broader\n\"Europe\" framing (Council of Europe member, EU accession candidate), alongside connectors that\nmap strictly to EU-27 membership.\n\n> **On ELI.** Turkey does **not** publish native ELI (`/eli/`) URIs. To keep the line's\n> contract honest, `eli_uri` carries the canonical, resolvable `mevzuat.gov.tr` URL instead —\n> e.g. `https://www.mevzuat.gov.tr/mevzuat?MevzuatNo=5237&MevzuatTur=1&MevzuatTertip=5` — which\n> every Bedesten search record already supplies. The connector never fabricates an `/eli/` URI\n> and says so in its tool instructions. See `DISCOVERY.md`.\n>\n> **On case law.** This connector covers **legislation only**. Yargitay (Court of Cassation)\n> decision search was unreachable (TCP timeout) from the build network, and Anayasa Mahkemesi\n> (Constitutional Court) exposes only a client-rendered SPA with no discovered server API.\n> Neither is wired up here — see `DISCOVERY.md` for what was actually checked.\n\n## Tools\n\n| Tool | What it does |\n|---|---|\n| `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. |\n| `tr_get_legislation_content(mevzuat_id)` | The full text of one document (HTML converted to plain text). |\n| `tr_get_legislation_toc(mevzuat_id)` | The article tree (madde agaci / table of contents) of one document. |\n| `tr_list_legislation_types()` | Enumerate all legislation types with live document counts (KANUN, KHK, YONETMELIK, ...). |\n| `tr_coverage()` | Declare what this connector covers, when each family was captured, and - explicitly - what it does NOT cover. Every gap carries a fallback. |\n\nEvery response carries the **citation contract**:\n\n- `eli_uri` — the canonical, resolvable `mevzuat.gov.tr` identifier (see the ELI note above).\n- `human_readable_citation` — the Turkish citation convention: law number + name + Official\n  Gazette (Resmi Gazete) date/number, e.g. *5237 sayili Turk Ceza Kanunu (Resmi Gazete:\n  12/10/2004, Sayi: 25611)*.\n- `source_url` — the same canonical `mevzuat.gov.tr` page.\n\n## Install\n\n```bash\npip install -e \".[dev]\"\n```\n\nRegister it with your MCP client (see `.mcp.json.example`):\n\n```json\n{\n  \"mcpServers\": {\n    \"tr-eli-mcp\": {\n      \"command\": \"tr-eli-mcp\",\n      \"env\": {\n        \"TR_ELI_BASE_URL\": \"https://bedesten.adalet.gov.tr/mevzuat\",\n        \"TR_ELI_CACHE_DIR\": \"~/.matematic/cache/tr-eli\",\n        \"TR_ELI_AUDIT_DIR\": \"~/.matematic/audit\"\n      }\n    }\n  }\n}\n```\n\n### Windows 11 with Smart App Control\n\nSmart App Control blocks unsigned executables, which covers `uvx.exe`, `pip.exe`\nand the `tr-eli-mcp.exe` launcher that pip writes at install time. The `python.exe` and\n`py.exe` from the python.org installer are signed by the Python Software\nFoundation, so running the module through the interpreter works:\n\n```bash\npython -m pip install tr-eli-mcp\npython -m tr_eli_mcp\n```\n\n`pip.exe` is blocked for the same reason, so install with `python -m pip`, not\n`pip install`. If `python` is not on PATH, use the Windows launcher: `py -3 -m tr_eli_mcp`.\n\n```json\n{ \"mcpServers\": { \"tr-eli-mcp\": { \"command\": \"python\", \"args\": [\"-m\", \"tr_eli_mcp\"] } } }\n```\n\nDo not turn Smart App Control off to work around this - it cannot be re-enabled\nwithout reinstalling Windows.\n\n## Design\n\n- **Public data only.** Read-only against the keyless Adalet Bakanligi Bedesten API; nothing is\n  sent beyond the query / document id.\n- **Audit log.** Every call appends one JSON line to `~/.matematic/audit/tr-eli-mcp.jsonl`\n  (AI Act art. 12 record-keeping).\n- **Vendor-neutral.** No LLM provider, no telemetry; own backoff + on-disk cache.\n- **No fabrication.** Identifiers and titles are parsed from the source record. If Bedesten's\n  schema changes, the connector fails loudly rather than returning stale or invented data.\n\nSee `CONSTITUTION.md` (the 4 principles) and `DISCOVERY.md` (how the source was mapped, and\nwhat was ruled out).\n\n## Tests\n\n```bash\npytest tests/test_instructions_drift.py   # offline\npytest tests/test_smoke.py                # live Bedesten API\n```\n\n## Licence\n\nApache-2.0. The Turkish legislation served is official public data of the Republic of Turkey;\nthis connector adds no rights over it.\n",
  "bytes": 4949,
  "sha": "0ac530362c2328d866894d646365f34e019ae3433a9daa866c089d7596500257",
  "repo_slug": "matematicsolutions/tr-eli-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_matematicsolutions_tr_eli_mcp_8fbf4698/readme"
}