Emsal MCP
This server supports citation-safe Turkish legal research: finding and verifying case law and legislation from live official sources or a local 11M-decision corpus, then reading, organizing, and exporting the results.
Search live decisions across Yargıtay, Danıştay, AYM, AİHM, Resmî Gazete, and BTK, with filters for court type, chamber, date range, esas no, and karar no.
Fetch a single document by ID, including paginated full text for long decisions.
Search legislation by title, official number, body text, or type; retrieve full text, article tree, or gerekçe.
Search the local corpus for decisions and legislation articles using lexical, semantic, or hybrid modes.
Build research bundles with quality and citation-safety summaries.
Export documents to DOCX, UDF, PDF, plain text, or bundles.
Load extended tools for citation checking, petition drafting, legal file reading, source metadata, legislation change reports, chamber analysis, privacy scanning/redaction, research watches, index status, and source health.
Run consolidated health checks across sources, circuit breakers, search indexes, and scheduled jobs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Emsal MCP İş kazası tazminatına dair emsal Yargıtay kararlarını bul"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Ipsa Verba
v3.0.0 — 12 core + 36 extended MCP tools (48 total) · 152 CLI commands · 80 test files · 49 source modules
![]()
Proje sayfası: avfatihsozer.com/projeler/ipsa-verba · English: README.en.md
Resmi ve kamuya açık Türk hukuk kaynaklarında (emsal kararlar ve mevzuat) citation-safe arama, araştırma ve belge hazırlık için MCP sunucusu.
Proje 2.0.0 sürümünde emsal-mcp'den Dayanak'a, 3.0.0 sürümünde Ipsa Verba
(ipsa-verba) adına geçti. Eski dayanak ve emsal-mcp paketleri artık ipsa-verba'yı
kurar; eski DAYANAK_* / EMSAL_* ortam değişkenleri ile ~/.dayanak ve ~/.emsal_mcp
veri dizinleri okunmaya devam eder.
İki şekilde çalışır:
Yerel korpus — 11,1 milyon karar ve güncel mevzuatın tamamı tek bir SQLite dosyasında; FTS5 tam metin + FAISS anlamsal arama. Ağ gerekmez.
Canlı kaynaklar — Bedesten/Yargıtay, AYM, Danıştay, Uyuşmazlık, Rekabet, Sayıştay, GİB, mevzuat.gov.tr, Resmî Gazete, KVKK adaptörleri.
Kırmızı çizgiler
Karar, metadata, tarih, esas/karar no, daire, atıf veya kanun maddesi uydurulmaz.
full_text/html_markdowniçeriği olmayan belgeler quote/draft için kullanılmaz.quoteUsablevedraftUsablesadece tam metin/HTML markdown varsatrueolur.Rate-limit bilinçli olarak muhafazakâr değildir; tek kullanıcı/tek bilgisayar hedeflenmiştir.
Related MCP server: Hukuk MCP
Korpus
Ölçüm tarihi 16 Eylül 2026, canlı korpus (cache.sqlite3, 72 GB).
Katman | Ölçü |
Kararlar | 11.108.242 belge ( |
Mevzuat belgeleri | 14.298 kayıt / 14.171 güncel sürüm: 916 kanun, 63 KHK, 33 CBK, 8.840 yönetmelik (8.830 güncel), 4.446 tebliğ (4.329 güncel) |
Mevzuat maddeleri | 303.454 madde, 96.186 değişiklik kaydı |
Karar anlamsal indeksi | 29.554.075 parça vektörü — |
Mevzuat anlamsal indeksi | 423.920 parça vektörü (303.454 maddeden), aynı model ve indeks tipi |
Ayrıntı ve ölçümler: docs/BULK_INDEX.md.
Kurulum
Hızlı kurulum (korpussuz)
Ipsa Verba, 11 milyon kararlık yerel korpus olmadan da çalışır. Bu durumda karar ve
mevzuat aramaları resmî kaynaklardan (Bedesten, mevzuat.gov.tr, AYM, Danıştay ve
diğerleri) canlı yapılır, kararın tam metni de canlı getirilir. Yalnız yerel korpusta
arayan araçlar (search_local_corpus, mevzuat_korpus_ara, mevzuat_madde_getir)
boş sonuç döndürür ve canlı araca yönlendirir. Python 3.11 ya da üstü gerekir.
# Kurmadan doğrudan çalıştırmak için (uv gerekir)
uvx --from ipsa-verba ipsa-verba-server
# ya da kalıcı kurulum
pipx install ipsa-verbaClaude Code'a eklemek için:
claude mcp add ipsa-verba -- uvx --from ipsa-verba ipsa-verba-serverClaude Desktop ya da başka bir MCP istemcisi için yapılandırma:
{
"mcpServers": {
"ipsa-verba": {
"command": "uvx",
"args": ["--from", "ipsa-verba", "ipsa-verba-server"]
}
}
}Varsayılan araç profili 12 temel araçtır; tamamı için IPSA_VERBA_TOOL_PROFILE=full
ortam değişkenini verin. Çekilen belgeler ~/.ipsa-verba/cache.sqlite3 dosyasında
önbelleğe alınır (IPSA_VERBA_CACHE_PATH ile değişir).
Geliştirme kurulumu (korpusla)
# Windows
cd <repo-dizini>
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e ".[dev,mcp,embeddings]"
# macOS / Linux
cd <repo-dizini>
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,mcp,embeddings]"
ipsa-verba versionAnlamsal aramanın toplu FAISS indeksini kullanabilmesi için ayrıca
pip install faiss-cpu gerekir. Ayrıntılı kurulum: INSTALL.md.
Çalıştırma
HTTP (streamable-http) sunucusu
Canlı kurulumda sunucu scripts\mcp_http_sunucu.cmd ile başlar; bu betik
ortam değişkenlerini kendi içinde kurar ve logu
%LOCALAPPDATA%\ipsa-verba\mcp_http.log dosyasına yazar.
.\scripts\mcp_http_sunucu.cmdWindows'ta EmsalMcpHttp zamanlanmış görevi aynı betiği oturum açılışında
çalıştırır. Uç nokta: http://<host>:<port>/mcp.
stdio sunucusu
call .\scripts\ipsa-verba-env.cmd
ipsa-verba-serverOrtam değişkenleri
Değişken | Ne işe yarar | Örnek değer |
| Korpus SQLite dosyası |
|
| fp16 vektör sidecar'ları (refine için) |
|
| Gömme sağlayıcısı |
|
| ONNX model önbelleği |
|
|
|
|
| HTTP dinleme adresi |
|
|
|
|
| Sync araçları için thread havuzu (0 = kapalı) |
|
| Araç başına saniye sınırı |
|
Tek seferlik CLI çağrıları için scripts\ipsa-verba-env.cmd aynı değişkenleri
kurar (call .\scripts\ipsa-verba-env.cmd && .venv\Scripts\ipsa-verba ...).
Makineye özel değerler (veri dizini, dinleme adresi, yedek hedefi) repoda
tutulmaz: scripts\yerel-ayar.ornek.cmd dosyasını scripts\yerel-ayar.cmd
adıyla kopyalayıp doldurun (.gitignore'dadır). ipsa-verba-env.cmd,
crawl_incremental.ps1 ve Python betikleri (scripts/_yollar.py) bu dosyayı
okur; boş bırakılan her yol ~/.ipsa-verba altından türetilir.
MCP araçları
Varsayılan profil core — 12 araç kayıtlı gelir. Geri kalanı çalışan sunucuya
load_extended_tools ile kategori kategori eklenir. Sözleşmeler:
docs/MCP_CONTRACTS.md.
Core (12):
Araç | Ne yapar |
| Canlı kaynaklarda karar araması (yönlendirme dahil) |
| Tek belge getirme |
| Yerel 11 M karar korpusunda FTS5 + anlamsal arama |
| mevzuat.gov.tr üzerinde mevzuat araması |
| Mevzuat metni / madde getirme |
| Yerel mevzuat korpusunda madde bazlı arama |
| Yerel korpustan tek madde |
| Bir değişiklik kanununun hangi maddeleri değiştirdiği ve işlenme durumu |
| Konu araştırması paketi (bundle + kalite panosu) |
| Belge dışa aktarma |
| Extended kategorileri çalışırken yükleme |
| Kaynak/breaker/indeks/zamanlanmış iş sağlığı |
Extended (36), kategori bazında:
Kategori | Araç sayısı | Araçlar |
| 1 |
|
| 2 |
|
| 1 |
|
| 2 |
|
| 4 |
|
| 4 |
|
| 3 |
|
| 4 |
|
| 1 |
|
| 10 |
|
| 4 |
|
Core profilin docstring bütçesi (20.000 karakter) dolduğu için
citation_check,prepare_petition,read_legal_file,list_sourcesvelegal_research_guide6 Eylül 2026'da extended'a alındı;load_extended_toolsile geri gelirler.
CLI örnekleri
ipsa-verba sources
ipsa-verba search bedesten "muvazaa" --limit 5
ipsa-verba get bedesten DOCUMENT_ID
ipsa-verba semantic bulk-status
ipsa-verba mevzuat korpus-ara "tahliye taahhüdü"
ipsa-verba smoke --offlineKorpus crawl + panel
Uzun soluklu korpus taraması (Bedesten'den yıl yıl karar indirme) bir master script ile yürür, durumu tarayıcıdan izlenir.
.\scripts\kur-otomatik-baslatma.ps1 # oturum açılışına ekler (yönetici gerekmez)
.\scripts\kur-otomatik-baslatma.ps1 -Durum # ne çalışıyor?
.\scripts\kur-otomatik-baslatma.ps1 -Kaldir # geri alParça | Ne yapar |
| Yılları sırayla tarar. Tek örnek kilidi (mutex), |
| http://127.0.0.1:8799 — canlı crawl durumu, yıl hedefleri, kütüphane dağılımı, hız/tahmin. Ek bağımlılık yok. |
Zamanlanmış görevler |
|
Notlar:
Rate limit
IPSA_VERBA_RATE_LIMIT_MAX=12. Ölçüldü: 12'de 429 yok (~2.800 belge/saat), 15'te 429 cooldown döngüsüne girip hız sıfırlanıyor.Panel,
cache.sqlite3üzerinde yıl sayımı yapmaz — tek bir yıl sorgusu tam tablo taraması yüzünden ~60 sn sürüyor. Sayımlar~/.ipsa-verba/panel_stats.sqlite3içinde artımlı (yalnız yenirowid'ler) tutulur, günde bir kez tam sayım yapılır.Yıl hedefleri Bedesten'in
totalalanından ölçülür (crawl_logs\hedefler.json), tahmin edilmez.
İşletim
Zamanlanmış işler (Windows Görev Zamanlayıcı, korpus sunucusu):
Görev | Zaman | Betik | Ne yapar |
| oturum açılışı |
| MCP sunucusunu yayınlar |
| her gün 04:30 |
| Artımlı karar crawl'ı |
| Pazar 03:00 |
| Mevzuat güncellemesi (+ art-işlem |
| ayın 1'i 02:00 |
| Delta vektörlerini toplu FAISS indeksine katar |
health_check aracı bu işlerin son koşusunu scheduled_jobs bloğunda
raporlar: schtasks çağırmaz, işlerin kendi log dosyalarına yazdığı bitiş
işaretini ve dosya zaman damgasını okur. Bir iş gecikmişse ya da rc != 0
ile bitmişse overall "degraded" döner (src/ipsa_verba/ops_status.py).
Aynı çıktıda tool_runtime bloğu thread havuzu / zaman aşımı sayaçlarını
verir; runaway > 0 ise sunucu yeniden başlatılmalıdır.
Belgeler
Belge | İçerik |
Toplu korpus kurulumu, FAISS indeks yapısı, chunking v2, ölçümler, tuzaklar | |
MCP araç sözleşmeleri, profiller, kategoriler | |
Kopyala-çalıştır iş akışı reçeteleri | |
Genel API fonksiyonlarının JSON çıktı sözleşmeleri | |
Hata kodları ve önerilen eylemler | |
Tüm belgelerin dizini | |
Sürüm geçmişi |
Test
.venv\Scripts\python.exe -X utf8 -m pytest tests -q
ruff check src tests scriptsCanlı kaynağa giden testler varsayılan olarak atlanır; açmak için
IPSA_VERBA_LIVE_TESTS=1.
Lisans
GNU Affero Genel Kamu Lisansı sürüm 3 ile lisanslanmıştır (AGPL-3.0-only); tam
metin LICENSE dosyasındadır. Yazılımı değiştirip ağ üzerinden başkalarına
hizmet olarak sunarsanız, değiştirdiğiniz kaynak kodu da o kullanıcılara aynı lisansla
sunmanız gerekir. Güvenlik açıklarının nasıl bildirileceği SECURITY.md
dosyasında anlatılıyor.
Telif hakkı © 2026 Alpaslan Fatih Sözer
Available Tools
11 toolsexport_documentA
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).
Inputs: body, text, title, format, +10 more.
get_documentA
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``.
Inputs: source (required), document_id (required), include_raw, page_number.
get_legislationA
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.
Inputs: document_id (required), part, source, page_number.
health_checkA
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.
Inputs: no named parameters.
load_extended_toolsA
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.
Inputs: categories (required).
mevzuat_korpus_araA
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.
Inputs: query (required), mode, limit, mevzuat_no.
mevzuat_madde_getirA
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.
Inputs: madde_no (required), mevzuat_no (required).
research_topicC
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.
Inputs: query (required), filters, sources, output_dir, +1 more.
search_decisionsA
✅ 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 → "83 a", maaş. → maaş) and reports it in
warnings + query_sanitized; write them clean to avoid surprises.
⚠️ THE INDEX IS NOT STEMMED — each inflected form is its own token:
+taahhüdü ≈ 16 700 hits vs +taahhüt ≈ 43 800. Prefer noun stems or
quoted phrases, and keep the diacritics (+taahhut ≈ 10 hits).
TWO-PASS BEHAVIOUR: A plain multi-word query with NO operators is first
tried with every term required (+t1 +t2 ...). If that pass cannot
fill limit — normal for 3+ inflected terms on an unstemmed index — the
ORIGINAL query re-runs as OR. Nothing is lost (OR is a superset, and
Solr ranks multi-term matches higher). Reported in warnings and as
fallback_to_or, so a starved AND pass never looks like "no precedent".
Worked examples (query string → what it does): +işçi +tazminat → BOTH "işçi" AND "tazminat" +"iş kazası" +tazminat → phrase "iş kazası" AND "tazminat" (+işçi OR +memur) +tazminat -manevi → (işçi OR memur) AND tazminat, not "manevi"
⚠️ Quote each concept rather than listing bare inflected words:
+"tahliye taahhüdü" +"adli tatil" ✓. A +-joined query returning 0
is a real finding about the phrasing — retry broader or with the stem,
not with more terms.
Notes:
A single common term ("karar") returns noise; add a specific constraint.
At least ONE criterion is required (query, esas_no, karar_no, birimAdi, or a date range). court_types alone is rejected — it is a filter.
Args:
source: Optional source identifier. Available sources:
- 'bedesten' (default) — combined Yargıtay + Danıştay sweep
- 'resmigazete' — Resmî Gazete. With query and NO
single day (no date, or a karar_tarihi_start /
karar_tarihi_end range) it searches the local TITLE index
(2000-06-27 →, titles only, not full text; accent-insensitive,
prefix match, "quoted phrase" ok) across all issues,
paginated; sort_by='date' = newest first. Only
karar_tarihi_start = start..today. One issue: give
start==end, or no query and only start (default today) to
list/filter that day live. Index missing → single-day
fallback + warning. Ids: 20260731-1, mükerrer
20230309m1-1.
- 'aym' — Anayasa Mahkemesi (bireysel başvuru + norm
denetimi kararları, tam metin)
- 'aihm' — AİHM/ECHR via HUDOC (EXPERIMENTAL ama arama ve
get_document CANLI çalışır; Türkiye aleyhine kararlar).
Varsayılan olarak Türkçe çeviriler (dil='TUR') döner;
Türkçe yoksa ENG/FRE'ye düşer ve warnings'e yazar.
karar_tarihi_start/_end HUDOC kpdate alanına bağlanır.
Kısa anahtar kelime/dava adı yazın (ör. "Kavala").
- 'btk' — BTK Kurul Kararları (PARTIAL; HTML card scraping
with PDF download for full text)
query: Search query string (optional when filtering by docket no /
chamber / date). For best results, craft a short 2–5 term
keyword query using the operators above.
limit: Max results (default 10, must be positive).
page: Page number for pagination (default 1).
court_types: Optional list of court item types for multi-court search
in a single call. Bedesten values (exact spelling — verified
live): YARGITAYKARARI (Yargıtay), DANISTAYKARAR (Danıştay, no
trailing I), YERELHUKUK (yerel hukuk mahkemeleri), ISTINAFHUKUK
(bölge adliye hukuk daireleri), KYB (kanun yararına bozma).
Defaults to ["YARGITAYKARARI", "DANISTAYKARAR"] when
source=bedesten and omitted. An unrecognised value is rejected
with INVALID_COURT_TYPE — Bedesten answers a bogus itemType
with a silent total=0 that is indistinguishable from "no such
precedent", so we never forward one.
birimAdi: Optional chamber code. Yargıtay H1–H23 / C1–C23 (hukuk /
ceza daireleri), HGK, CGK, BGK; Danıştay D1–D17, IDDK, VDDK;
AYIM. Full list: list_sources(detail="birim_codes").
karar_tarihi_start: Optional ISO start date, inclusive
(e.g. "2023-01-01").
karar_tarihi_end: Optional ISO end date, inclusive
(e.g. "2024-12-31").
esas_no: Optional case file number, YIL/SIRA ("2023/1234").
karar_no: Optional decision number, YIL/SIRA ("2023/5678").
sort_by: Result ordering — "relevance" (Solr score, default when a
query/phrase is present) or "date" (newest first, default when
only filters like esas_no/karar_no/date range are given). When
omitted, the source infers: non-empty query → relevance,
filter-only lookup → date.
include_snippets: When true, fetch the full text of the first 5
results and attach a snippet (~360-char passage centred on
the query terms) to each. Lets you triage relevance without
calling get_document per result. Results already in the local
corpus get a snippet for free even when this is false.
dil: Yalnızca source='aihm': belge dili. Verilmezse önce Türkçe
çeviriler ('TUR'), sonuç yoksa ENG/FRE. 'ENG', 'FRE', 'TUR',
virgülle çoklu ('ENG,FRE') ya da 'HEPSI' (tüm diller; Almanca,
Rumence vb. üçüncü dil çevirileri dahil).
include_raw: When true, keep the raw upstream metadata block.
Default false: fields duplicated by the flat keys
(esas_no, karar_no, decision_date, chamber, ...)
are dropped to save context. Nothing unique is lost.
Returns:
Dict with results, pagination metadata, and optional warnings.
The results key holds the list of matching document dicts.
total_results (int or null) is the total count across pages,
page (int) the current page, and total_pages (int or null)
the total number of pages. When the source cannot provide a total
(e.g. Mevzuat search), total_results and total_pages are
null and a warning is appended. Example::
{
"results": [ /* SearchResult dicts */ ],
"total_results": 543,
"page": 1,
"total_pages": 55
}
Inputs: dil, page, limit, query, +10 more. Returns: result
search_legislationA
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.
Inputs: query (required), limit, scope, sort_by, +6 more.
search_local_corpusA
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.
Inputs: query (required), date, mode, sort, +12 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
The search surface is heavily overlapping: mevzuat_korpus_ara, search_local_corpus, search_decisions, search_legislation all perform searches with only subtle distinctions (local vs live, decisions vs legislation). Descriptions spend enormous effort explaining which to use and the corpus-lag nuance, which itself signals the boundaries are unclear; search_legislation vs mevzuat_korpus_ara vs get_legislation further blur retrieval vs fetch.
Names mix English and Turkish (search_decisions vs mevzuat_korpus_ara vs mevzuat_madde_getir), and verb styles vary (get_document, get_legislation, mevzuat_madde_getir, search_*, research_topic, load_extended_tools, health_check). There is a loose verb_noun pattern but the Turkish/English split and inconsistent word order make it unpredictable.
11 core tools for a legal research server is well within a reasonable range, and the load_extended_tools mechanism sensibly gzips the broader surface into categories rather than exposing everything upfront.
Search, fetch, legislation retrieval, research bundle, export and health check cover the core legal-research lifecycle; drafting, citation check, file reading and PII are gated behind load_extended_tools rather than absent. Minor gaps: no direct delete/cleanup or a default-visible listing of extended tools' own availability.
Maintenance
Related MCP Connectors
Resolve, search and verify legal citations against the official sources, with provenance.
Grounded MENA legal search, reasoning, citation resolution, and citation-graph traversal.
Search U.S. case law, fetch opinions, and ask matter-aware legal questions over your documents.
French case law (Judilibre) and codes (Légifrance) from official sources, with citation checking.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible AI clients to research official Turkish legal sources locally by searching judicial decisions, legislation, and Constitutional Court decisions, and by retrieving legal documents, individual articles, and legislation structures.MIT
- AlicenseBqualityCmaintenanceConnects AI clients to public Turkish legislation and court/board decisions, letting users search and retrieve legal texts, case law, and institutional rulings, and generate petition drafts and UYAP UDF files.20MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants and agents to search a legal document collection via hybrid BM25+dense retrieval, read articles with context, and generate full or short citations. It also exposes whole acts as Markdown resources, provides a citation-answering prompt, and supports stdio and streamable HTTP transports.MIT
- FlicenseNot gradedqualityCmaintenanceEnables local, privacy-conscious research across Turkish case law and legislation by searching precedent and statutes, retrieving decisions and article trees/content, and assembling sourced research drafts with verified quotations.-