Skip to main content
Glama

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

Tool

What 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.

Related MCP server: BDDK MCP Server

Install

pip install -e ".[dev]"

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

{
  "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:

python -m pip install tr-eli-mcp
python -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.

{ "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 (AI Act art. 12 record-keeping).

  • Vendor-neutral. No LLM provider, no 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

pytest tests/test_instructions_drift.py   # offline
pytest 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.

Available Tools

5 tools
tr_coverageA
Read-onlyIdempotent

Declare what this connector covers, how it is sourced, and what it does NOT cover.

Call this before telling a user that the law "does not contain" something, and whenever a search comes back empty: the absence may be a gap in this connector rather than in the law. Every gap carries a fallback saying where to look instead.

Returns: Coverage with families, an as-of note, and a non-empty list of known gaps.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
statusNo
familiesNo
as_of_noteYesStates what the dates mean, and what they do not promise.
known_gapsNoNever empty. An empty list would mean 'not checked', not 'no gaps'.

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint. The description adds meaningful context by explaining that empty results may indicate a connector gap rather than an actual absence in the law, and that gaps include fallback guidance. This goes beyond what annotations provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded: purpose first, then when to call, then return shape. Every sentence earns its place, and the return block is clearly separated for readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a parameterless tool with an output schema and rich annotations, the description covers the essential usage context, return value, and the critical open-world caveat. Nothing needed to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the baseline is 4. The description correctly focuses on return value and usage rather than parameter details, since none exist.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: declaring what the connector covers, how it is sourced, and what it does not cover. It distinguishes this tool from the search/list/get siblings by focusing on coverage metadata rather than content retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit call conditions: before telling a user that the law 'does not contain' something, and whenever a search comes back empty. It does not name alternative sibling tools or state exclusions, so it falls short of a perfect 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tr_get_legislation_contentA
Read-onlyIdempotent

Fetch the full text of a Turkish legislative document by its mevzuat_id.

ParametersJSON Schema
NameRequiredDescriptionDefault
mevzuat_idYesDocument id, from a ``tr_search_legislation`` result.

Output Schema

ParametersJSON Schema
NameRequiredDescription
formatNo
contentNo
eli_uriNo
byte_sizeNo
mevzuat_idYes
source_urlNo
dataset_noteNo
human_readable_citationNo

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already declare readOnlyHint, idempotentHint, and destructiveHint false, providing a clear safety profile. The description adds minimal extra behavioral context beyond clarifying that it fetches the full text, and no contradictions exist. It does not disclose edge cases or rate limits, but the output schema covers return format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence that clearly states the action and resource. It is appropriately concise and front-loaded, with no unnecessary words or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one well-documented parameter, an output schema, and rich annotations. The description, while brief, is sufficient given the structured information. It could explicitly mention retrieving the ID from search, but that is already covered in the schema parameter description, making the context effectively complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The sole parameter mevzuat_id is fully described in the schema with an explanation that it comes from tr_search_legislation. The description itself adds no additional parameter semantics, and with 100% schema coverage, a baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Fetch' and the resource 'full text of a Turkish legislative document' with the lookup by mevzuat_id. It effectively distinguishes from sibling tools like tr_get_legislation_toc (which would fetch a table of contents) and tr_search_legislation (which searches).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool over alternatives, but the phrase 'full text' implies it is for retrieving complete content as opposed to the TOC tool. Additionally, the parameter schema mentions the ID comes from a tr_search_legislation result, which is a usage hint, but that is in the schema rather than the description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tr_get_legislation_tocA
Read-onlyIdempotent

Fetch the article tree (madde agaci / table of contents) of a document.

ParametersJSON Schema
NameRequiredDescriptionDefault
mevzuat_idYesDocument id, from a ``tr_search_legislation`` result.

Output Schema

ParametersJSON Schema
NameRequiredDescription
nodesNo
mevzuat_idYes
dataset_noteNo

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, fully covering the safety profile. The description adds no additional behavioral context beyond clarifying the Turkish term for article tree, providing marginal value in this dimension.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. The inclusion of the Turkish translation ('madde agaci') is useful for disambiguation and does not add unnecessary length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, read-only, with output schema), the description adequately states what it returns (article tree) and the parameter description covers input provenance. There are no significant gaps for invocation, though it could have mentioned the tree's depth or pagination, but the output schema presumably covers that.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers 100% of the single parameter, describing mevzuat_id as 'Document id, from a tr_search_legislation result,' which adds the provenance requirement. The description itself adds no parameter-specific information beyond the schema, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb ('Fetch') and resource ('article tree (madde agaci / table of contents) of a document'), distinguishing it from sibling tools like tr_get_legislation_content (content) and tr_search_legislation (search). It is unambiguous and well-scoped.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for retrieving a document's table of contents, and the parameter description adds a workflow constraint by specifying the ID comes from tr_search_legislation, which gives clear context for how to use the tool. However, it does not explicitly state when to prefer this over alternatives, so it falls short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tr_list_legislation_typesA
Read-onlyIdempotent

Enumerate all Turkish legislation types with live document counts.

Returns: LegislationTypeList with items like KANUN (laws), KHK (decree-laws), YONETMELIK (regulations), CB_KARARNAME (presidential decrees), etc.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsNo
dataset_noteNo

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare read-only, idempotent, and non-destructive behavior. Beyond that, the description adds useful context that the document counts are 'live' (i.e., dynamic) and describes the return structure with examples, which is not in the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences: the first states the purpose, the second gives the return type and examples. It is front-loaded, concise, and every word earns its place with no fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple, zero-parameter, read-only enumeration tool with an output schema, the description fully covers what the tool does, what it returns, and even gives concrete examples. The sibling tools are clearly different in purpose, so no additional context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so there are no parameter semantics to explain. Baseline for zero params is 4, and the description correctly focuses on the output rather than inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'enumerate' and resource 'Turkish legislation types', clearly distinguishing it from sibling tools that search, fetch content, or get table of contents. The examples of types (KANUN, KHK, etc.) further clarify exactly what the tool returns.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives, but the purpose of listing types implies it serves as a reference for valid type values before searching. This is implied rather than stated, so it lacks explicit when-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tr_search_legislationA
Read-onlyIdempotent

Search Turkish legislation by title and/or full text.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSearch phrase, e.g. ``"vergi"``.
mevzuat_noNoOptional legislation number filter.
baslikta_araNoSearch in title only (default True). Set False to search full text too.
mevzuat_turuNoOptional legislation type filter, e.g. ``"KANUN"``, ``"KHK"``, ``"YONETMELIK"``. See ``tr_list_legislation_types`` for the full list.

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemsNo
queryNo
returnedYes
dataset_noteNo
total_matchedYes

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare the tool as read-only, idempotent, and non-destructive, so the safety profile is clear. The description adds the title/full-text search distinction, which is useful but duplicates the parameter baslikta_ara. It omits other behavioral details like pagination, result limits, or search semantics (e.g., exact vs. fuzzy matching), but with annotations present, the added context is sufficient for a 3.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, tightly written sentence that front-loads the core purpose. There is no fluff or redundant information. Every word contributes to clarity, making it an exemplary concise description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema and comprehensive parameter documentation, the description need not explain return values or parameter semantics. It covers the essential purpose, and the annotations cover side effects. However, it could benefit from a brief note on result behavior (e.g., returns matching legislation list) and perhaps a pointer to sibling tools for related operations, so it isn't a 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with all 4 parameters having detailed descriptions. The tool description itself does not add any additional parameter semantics beyond what the schema already provides. Thus the baseline score of 3 applies, as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Search Turkish legislation by title and/or full text.' This is a specific verb (search) with a specific resource (Turkish legislation) and search scope. It inherently distinguishes from siblings like tr_get_legislation_content and tr_get_legislation_toc, which focus on retrieval rather than search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description only states what it does, without mentioning when not to use it or directing users to sibling tools for other use cases. The only cross-reference is in the schema for mevzuat_turu, which points to a type-listing tool but doesn't provide usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev0.3.3
    • Addedtr_coverage
  2. 4 tool updatesv0.2.1
    • First observedtr_get_legislation_content
    • First observedtr_get_legislation_toc
    • First observedtr_list_legislation_types
    • First observedtr_search_legislation

TDQS

A4.1/5.0
Disambiguation5/5

Each tool targets a distinct aspect of Turkish legislation: searching, listing types, fetching full text, fetching table of contents, and declaring coverage gaps. There is no meaningful overlap; even get_legislation_content and get_legislation_toc are clearly separated by the type of content returned.

Naming Consistency4/5

Most tools follow a consistent tr_<verb>_<object> pattern (tr_search_legislation, tr_list_legislation_types, tr_get_legislation_content, tr_get_legislation_toc). The lone exception is tr_coverage, which uses a noun instead of a verb, creating a minor but noticeable deviation.

Tool Count5/5

Five tools is well-scoped for a legal research connector: two for discovery, two for retrieval, and one for coverage metadata. Each tool serves a clear purpose and none feel redundant or extraneous.

Completeness5/5

The surface covers the core workflow of searching, enumerating types, fetching full text, and navigating structure via TOC, plus a dedicated gap-awareness tool. For a read-only legislation domain, this is complete; there are no obvious missing operations that would block typical agent workflows.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    A FastMCP server providing access to the Turkish Ministry of Justice's Legislative Information System, allowing LLM applications to search legislation, retrieve article lists, and get article contents in Markdown format.
    26
    234
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    MCP server for Legalize.dev, enabling AI to query and understand legal frameworks across countries via a structured legislation API.
    13
    1
    -
  • A
    license
    A
    quality
    A
    maintenance
    MCP server for querying French legislation and case law via the Legifrance API, enabling search and retrieval of laws, codes, and court decisions with verifiable citations.
    8
    1
    Apache 2.0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/matematicsolutions/tr-eli-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server