# Dayanak (pypi · dayanak)

Citation-safe Turkish legal research: court decisions and legislation from official sources.

- Trust score: 79/100 (medium)
- Change this week: +4
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-10-24

## Components

- pypi · `dayanak`: 79/100 (this document), [markdown](https://verifymcp.io/servers/afsozer-dayanak/dayanak.md), [page](https://verifymcp.io/servers/afsozer-dayanak/dayanak)

## Channel facts

- Registry: `pypi`
- Package: `dayanak`
- Version: `2.0.0`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-10-24.

- **Supply Chain Security**: 100/100
  - No malware found by supply-chain analysis.
  - No known CVEs affecting this package version or its production dependencies.
  - Runs setuptools.build_meta at install time, a recognised build step with no custom scripting around it.
  - 3 of 40 dependencies flagged as unhealthy.
- **Provenance & Transparency**: 100/100
  - Source repository is publicly reachable at the declared URL.
  - Cryptographically verified build provenance (signed, bound to afsozer/dayanak).
  - Clear OSI-approved license (AGPL-3.0-only).
  - Actively maintained (last published 0 days ago).
  - Publishes a security disclosure policy (SECURITY.md).
- **Schema Quality & AI Usability**: 49/100
  - AI-judged instruction clarity (good).
  - Context-footprint check failed: tool/resource definitions use about 4880 tokens (~443/item across 11 items; 11 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 33/100
  - Stability observed for 10 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 71/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 0% of tool parameters carry a description.
  - Structured output schemas are declared (9% of tools); any adoption earns full credit.
- **Tool Safety**: 100/100
  - No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.
  - We read all 11 captured tool definition(s), and no name or description among them implies an irreversible operation.
  - An AI judge read all 11 captured unit(s) of tool text and found none that tries to manipulate the model reading it.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### How do I install the Dayanak MCP server?

Dayanak runs locally as a PyPI package, launched with uvx dayanak. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.

### Claude

```bash
claude mcp add afsozer-dayanak -- uvx dayanak
```

### Cursor

```json
{
  "mcpServers": {
    "afsozer-dayanak": {
      "command": "uvx",
      "args": [
        "dayanak"
      ]
    }
  }
}
```

### VS Code

```json
{
  "servers": {
    "afsozer-dayanak": {
      "command": "uvx",
      "args": [
        "dayanak"
      ]
    }
  }
}
```

### Codex

```bash
codex mcp add afsozer-dayanak -- uvx dayanak
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "afsozer-dayanak": {
      "type": "local",
      "command": [
        "uvx",
        "dayanak"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add afsozer-dayanak --command uvx --arg dayanak
```

### Hermes

```yaml
mcp_servers:
  afsozer-dayanak:
    command: "uvx"
    args: ["dayanak"]
```

### Netclaw

```json
{
  "McpServers": {
    "afsozer-dayanak": {
      "Transport": "stdio",
      "Command": "uvx",
      "Arguments": [
        "dayanak"
      ]
    }
  }
}
```

### Vellum

```bash
assistant mcp add afsozer-dayanak -t stdio -c uvx -a dayanak
```

### Other

```json
{
  "mcpServers": {
    "afsozer-dayanak": {
      "command": "uvx",
      "args": [
        "dayanak"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-10-23 (score 79, +1)

No change was recorded against any check on this day. Stability & Change Management went from 27 to 30. That category is still filling its 30-day observation window: 8 days of observed history at the previous scan, 9 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-10-22 (score 78, +3)

- [functional improvement] Stability: unverified → 0.27

### 2026-10-14 (score 75, +25)

- [security improvement] Injection markers: unverified → pass
- [security] First check of Judged manipulation: pass
- [security] Stability: Stability not yet verified: not enough scan history yet (needs a 30-day window).
- [functional improvement] Tool coverage: unverified → 100
- [functional improvement] MCP protocol: unverified → pass
- [functional] First check of Tool coverage: 9
- [functional] First check of Tool coverage: 0
- [functional] First check of Schema quality: fail
- [functional] First check of Destructive annotations: pass
- [functional] First check of Schema quality: fail
- [functional] First check of Schema quality: good

### 2026-10-12 (score 50)

First indexed and scored.

## MCP tools (11)

### `search_decisions` (~2400 tokens)

✅ PRIMARY, MANDATORY TOOL FOR ALL CASE-LAW / DECISION / MEVZUAT RESEARCH.

For ANY question about court decisions, precedents, case law, or
legislation you MUST call THIS tool first. It is the ONLY tool that
retrieves real, current documents LIVE from the official source
(online — e.g. Bedesten/Yargıtay, Mevzuat).

HARD RULES — no exceptions, no interpretation:
\- Do NOT answer case-law questions from memory, training data, or web search.
\- Do NOT use search_local_corpus to FIND decisions — it searches ONLY
  the local corpus and cannot discover anything not fetched here first.
\- Every esas/karar number, date, and chamber you cite MUST come from a
  document returned by THIS tool and verified via get_document full text.
\- If you have not called this tool yet, you have NO case law to cite.

\--- QUERY HYGIENE (CRITICAL) ---
\- Do NOT paste the user's question in. Solr matches tokens, not natural
  language. Reduce it to 2–5 legal keywords: "işçi alacağı zamanaşımı" ✓,
  not "işçinin fazla mesai ve kıdem tazminatı konusunda zamanaşımı süresi".
\- Preserve Turkish diacritics exactly; stripping them silently drops
  matches. "kararı" ✓ not "karari" ✗.

\--- BEDESTEN SOLR OPERATOR COOKBOOK ---
⚠️ THE DEFAULT OPERATOR IS OR — whitespace between bare terms means
UNION.  `tahliye taahhüdü geçerlilik` matches ANY of the three words.
To require all, prefix each with `+` or join with UPPERCASE `AND`.

\+required  must appear (+tazminat)   -excluded  must not (-bölge)
"exact"    phrase ("iş kazası")      AND/OR/NOT UPPERCASE only
(grouping) sub-expressions

⚠️ CHARACTER WHITELIST (measured live): Bedesten accepts ONLY letters,
digits, spaces and the operators above.  Wildcards (* ?), fuzzy (~),
boost (^) and ANY punctuation (/ . , ' : ; _ …) are rejected outright
with INVALID_QUERY — there is NO wildcard search, write the full word.
Article numbers: `"83 a"` not `83/a` (the index stores 83/a as the two
tokens 83 and a).  The tool strips/converts such characters before
sending (`83/a…

Input parameters:

- `birimAdi`
- `court_types`
- `dil`
- `esas_no`
- `include_raw` (boolean)
- `include_snippets` (boolean)
- `karar_no`
- `karar_tarihi_end`
- `karar_tarihi_start`
- `limit` (integer)
- `page` (integer)
- `query`
- `sort_by`
- `source`

Output parameters:

- `result`

### `get_document` (~254 tokens)

Fetch a single document by ID from the given source.

Args:
    source: Source identifier.
    document_id: Document ID (must not be empty).
    include_raw: If True, include the raw upstream response in the
                 output (debugging).  Default: False (deduplicated
                 output with single markdown text field).
    page_number: 1-indexed page number for long documents (>= 40 000
                 chars).  Default 1 returns the first page.  Long
                 documents are split at paragraph boundaries so no
                 page starts or ends mid-paragraph.

Returns:
    Document dict with deduplicated metadata and content fields.
    Text is served as a single ``markdown`` field; ``full_text``,
    ``raw``, and ``metadata.content`` are omitted by default.

    For long documents (>= 40 000 chars), the response includes
    ``current_page``, ``total_pages``, and ``total_chars`` so the
    agent can request subsequent pages via ``page_number``.

Input parameters:

- `document_id` (string, required)
- `include_raw` (boolean)
- `page_number` (integer)
- `source` (string, required)

### `search_legislation` (~394 tokens)

Search legislation via the Mevzuat source.

Use ``mevzuat_adi`` to search ONLY in titles (e.g. "kişisel veri" →
KVKK surfaces). Use ``mevzuat_no`` for direct lookup by official number
(e.g. "6698" → KVKK, "5237" → TCK) — never guess the number; if unsure
use ``mevzuat_adi`` first. ``query`` does a body-text/concept search.
Common abbreviations (TCK, HMK, KVKK, ...) in ``query`` are auto-routed
to ``mevzuat_no``.

Args:
    query: Search phrase (body-text). Auto-routes TCK/HMK/etc → number.
    sources: Source IDs (default: ["mevzuat"]).
    legislation_type: Filter by type (e.g. "Kanun", "Yönetmelik").
    limit: Max results.
    scope: 'law' (default) or 'article'.
    document_id: Required when scope='article'.
    sort_by: "relevance" (default) | "date" | "kayit_tarihi".
    mevzuat_adi: Title-only search.
    mevzuat_no: Official legislation number (NEVER guess).
    mevzuat_tur_list: Multi-type filter (KANUN, KHK, YONETMELIK, ...).

Returns:
    Dict with ok, query, results, total_results, warnings, etc.

Input parameters:

- `document_id`
- `legislation_type`
- `limit` (integer)
- `mevzuat_adi`
- `mevzuat_no`
- `mevzuat_tur_list`
- `query` (string, required)
- `scope` (string)
- `sort_by`
- `sources`

### `mevzuat_korpus_ara` (~188 tokens)

YEREL korpusta MADDE bazında arama (çevrimdışı, madde metinlerinde).

mode: "hybrid" (varsayılan; BM25+anlam RRF), "lexical" (FTS5, kelime
AND), "semantic" (ifade metinde geçmese de bulur). 0 sonuç "hüküm yok"
DEMEK DEĞİL: korpus yalnız çekilmişi içerir, search_legislation çağır.
mevzuat_no tek mevzuatla sınırlar (ör. "6098"). Sonuç: mevzuat_adi,
madde_no, baslik, snippet, kaynak_url.

Input parameters:

- `limit` (integer)
- `mevzuat_no` (string)
- `mode` (string)
- `query` (string, required)

### `mevzuat_madde_getir` (~93 tokens)

Yerel korpustan tek maddenin TAM metni (çevrimdışı).

madde_no "390", "12/A", "Geçici 1" kabul eder. Korpusta yoksa
NOT_FOUND döner — uydurma, canlı get_legislation çağır.

Input parameters:

- `madde_no` (string, required)
- `mevzuat_no` (string, required)

### `research_topic` (~83 tokens)

Search sources, fetch documents, and build a research bundle.

Returns bundle metadata with query, sources, result_count, fetched_count,
content_status_summary, citation_safe_count, generated_files, warnings,
and recommended_next_steps.

Input parameters:

- `fetch_count` (integer)
- `filters`
- `output_dir`
- `query` (string, required)
- `sources`

### `search_local_corpus` (~497 tokens)

Concept DISCOVERY over the local corpus.

Searches the local corpus (decisions already fetched this session or
via the corpus crawl) for a legal CONCEPT when the exact wording is
unknown.  Each result carries ``related_quotes`` — matched passages —
so you can spot relevant precedent without fetching every full text.

Roles are complementary: THIS tool = DISCOVERY over the local corpus;
\``search_decisions`` = live CURRENT search + citation verification.
The corpus may lag; always confirm any decision you cite with
\``search_decisions`` + ``get_document`` first.

QUERY FORM: 2–6 legal keywords, NOT a sentence.  All terms are
required (AND) and match anywhere in the text, so narrative filler
only shrinks the result set.  Quote words to require them adjacent:
\``kıdem tazminatı zamanaşımı`` · ``"tahliye taahhüdü" geçerlilik``.
Unlike Bedesten this index folds diacritics (kamulastirma =
kamulaştırma).

Args:
    query: 2–6 legal keywords; `"quoted spans"` match as phrases.
    mode: 'lexical' (default; FTS5/BM25, sub-second), 'rrf'
          (BM25+TF-IDF fusion; SLOW — minutes on a large corpus),
          'semantic' (dense embeddings), 'hybrid'.
    limit: Max results.
    filters: Optional dict with source, court, chamber, content_status.
    provider: Embedding provider name for semantic modes (ignored for lexical).
    source/court/chamber/date/esas_no/karar_no/document_id: Flat
          filters — equivalent to putting them in ``filters``.
    content_status/draft_usable/quote_usable: Content filters.
    sort: 'relevance' (default) or 'date' — lexical mode only.

Input parameters:

- `chamber`
- `content_status`
- `court`
- `date`
- `document_id`
- `draft_usable`
- `esas_no`
- `filters`
- `karar_no`
- `limit` (integer)
- `mode` (string)
- `provider`
- `query` (string, required)
- `quote_usable`
- `sort` (string)
- `source`

### `get_legislation` (~150 tokens)

Get legislation content from the Mevzuat source.

Args:
    document_id: Mevzuat document ID.
    source: Source ID (default: "mevzuat").
    part: 'document' (default, full text), 'article_tree' the
          part/section/article tree, 'gerekce' the rationale.
    page_number: page of part='document' (40 000 chars/page).

Returns:
    Dict for the requested part; 'document' also carries
    current_page/total_pages/total_chars.

Input parameters:

- `document_id` (string, required)
- `page_number` (integer)
- `part` (string)
- `source`

### `export_document` (~377 tokens)

Unified document export: DOCX, UDF, PDF, plain text, or bundle.

Args:
    format: 'docx' (default), 'udf', 'pdf', 'plain', 'bundle',
            or 'capabilities' (returns supported formats).
    draft_path: Path to draft.md (for docx/plain).
    draft_json: Draft metadata dict (for docx).
    text: Text to write (for udf; plain text — petition formatting
          such as bold title/labels/headings is applied automatically).
    out_path: Output file path (for docx/udf/plain).
    out_dir: Output directory (for bundle).
    pack_dir: Pack directory (for bundle).
    draft_dir: Draft output directory (for bundle).
    docx_path: Path to a .docx (for bundle; for udf this is the
          PREFERRED input — converts DOCX directly to UDF preserving
          bold, alignment, indent and line spacing).
    udf_path: Path to a .udf — converts it to docx or pdf via
          LibreOffice (replaces convert_udf_to_docx/pdf).
    title_centered: Center the title in UDF output.
    title: Document title (for legacy export_bundle).
    body: Document body (for legacy export_bundle).
    documents: List of document dicts (for legacy export_bundle).

Input parameters:

- `body`
- `documents`
- `docx_path`
- `draft_dir`
- `draft_json`
- `draft_path`
- `format` (string)
- `out_dir`
- `out_path`
- `pack_dir`
- `text`
- `title`
- `title_centered` (boolean)
- `udf_path`

### `load_extended_tools` (~349 tokens)

Load extra tool categories into the running MCP server (no restart).

Core profile registers 11 tools. Everything else waits here; load a
category when the task needs it.

Categories:
  drafting  — citation_check (atif dogrula/bicimlendir/guvenlik),
              prepare_petition (dilekce input_pack/outline/taslak)
  files     — read_legal_file (UDF/PDF dosyasi oku)
  meta      — list_sources (kaynaklar, birim kodlari, mevzuat turleri),
              legal_research_guide (arama/Solr/daire/atif rehberi)
  legislation — mevzuat_degisiklik_raporu (haftalik mevzuat degisimi)
  drafting_advanced — coklu-mesele paketi, sablonlar, argüman zinciri,
              draft_document, export_bundle
  chambers  — daire profili, timeline, benzer daire
  privacy   — PII tarama/maskeleme/denetim
  watch     — arastirma izleme listeleri
  indexing  — index_status (semantik indeks durumu)
  health_admin — circuit breaker, kaynak sagligi/smoke
  udf_admin — UDF/PDF araci durumu, PDF tam metne yukseltme

Args:
    categories: List of category names, e.g. ["drafting", "files"].

Returns:
    Dict with ok, loaded tools, already_loaded, invalid_categories,
    and a note if the MCP client may need to refresh its tool list.

Input parameters:

- `categories` (array, required)

### `health_check` (~95 tokens)

Run a consolidated health check across sources, breakers, indexes and cron jobs.

Returns overall status plus source smoke summary, circuit breaker
states, search index status and ``scheduled_jobs`` — the last run of
the daily crawl, weekly legislation update, monthly merge and the
legislation semantic index (read from their log files).
\``overall`` is "degraded" when a job is late or ended with rc != 0.

## Diagnostics

Captured diagnostic sections: Provenance, Install scripts, Dependencies. The full working is on the page: https://verifymcp.io/servers/afsozer-dayanak/dayanak#diagnostics

## Score history

- 2026-10-24: 79
- 2026-10-23: 79
- 2026-10-22: 78
- 2026-10-21: 75
- 2026-10-20: 75
- 2026-10-19: 75
- 2026-10-18: 75
- 2026-10-17: 75
- 2026-10-16: 75
- 2026-10-15: 75
- 2026-10-14: 75
- 2026-10-13: 50
- 2026-10-12: 50

## Common questions

### What is the Dayanak MCP server?

Dayanak is an MCP server listed in the public MCP registry as io.github.afsozer/dayanak. Citation-safe Turkish legal research: court decisions and legislation from official sources. This page covers its PyPI package (dayanak).

### Is the Dayanak MCP server safe to use?

Dayanak scores 79 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 24 October 2026. Its build provenance is signed and verified. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.

### What tools does the Dayanak MCP server expose?

Dayanak exposes 11 tools: search_decisions, get_document, search_legislation, mevzuat_korpus_ara, mevzuat_madde_getir, and 6 more. Their descriptions and schemas cost roughly 4,880 tokens of context every time the server is loaded.

### Is the Dayanak MCP server still maintained?

Dayanak is still listed as active in the MCP registry. We last reached this channel on 24 October 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.

### What licence is the Dayanak MCP server under?

Dayanak declares the AGPL-3.0-only licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.

## Links

- PyPI project: https://pypi.org/project/dayanak/
- Socket report: https://socket.dev/pypi/package/dayanak
- Repository: https://github.com/afsozer/dayanak
- Website: https://avfatihsozer.com/projeler/dayanak
- Changelog RSS feed: https://verifymcp.io/servers/afsozer-dayanak/dayanak.xml
- Changelog JSON feed: https://verifymcp.io/servers/afsozer-dayanak/dayanak.json
- HTML version of this page: https://verifymcp.io/servers/afsozer-dayanak/dayanak
