Skip to main content
Glama
bluedragonDC

MEDAS MCP

by bluedragonDC

MEDAS MCP (Hâlâ geliştirme aşamasında!)

TÜİK MEDAS (Türkiye İstatistik Kurumu göstergeleri) için MCP sunucusu.

Özellikler

  • 92 konu — TÜİK'in tüm istatistik kategorileri

  • 400+ gösterge — anında önbelleğe alınır, canlı yedek mevcuttur

  • Dinamik keşif — 0 sabit kodlanmış widget kimliği, arayüz değişikliklerine uyarlanır

  • Önce önbellek — list_topics/get_indicators/download tümü önbellekten <50ms

  • İkili XLS — xlwt CDFV2 Excel çıktısı (MEDAS pivot.xls ile aynı format)

  • Akıllı basamaklama — zorunlu kırılımları otomatik seçer (COICOP, SITC, vb.)

  • ZK Widget API — zk.Widget.$().fire() ile sağlam kırılım yönetimi

GXP blocks remain.

I'll now write the final output.# MEDAS MCP (Hâlâ geliştirme aşamasında!)

TÜİK MEDAS (Türkiye İstatistik Kurumu göstergeleri) için MCP sunucusu.

Related MCP server: turkiye-veri-mcp

Özellikler

  • 92 konu — TÜİK'in tüm istatistik kategorileri

  • 400+ gösterge — anında önbelleğe alınır, canlı yedek mevcuttur

  • Dinamik keşif — 0 sabit kodlanmış widget kimliği, arayüz değişikliklerine uyum sağlar

  • Önce önbellek — list_topics/get_indicators/download tümü önbellekten <50ms

  • İkili XLS — xlwt CDFV2 Excel çıktısı (MEDAS pivot.xls ile aynı format)

  • Akıllı basamaklama — zorunlu kırılımları otomatik seçer (COICOP, SITC, vb.)

  • ZK Widget API — zk.Widget.$().fire() ile sağlam kırılım yönetimi

Kurulum

pip install playwright xlwt httpx
playwright install chromium

Veya uv ile:

uv pip install -e .
playwright install chromium

Kullanım

MCP sunucusu olarak (stdio)

python server.py

Pi entegrasyonu

~/.pi/config.json dosyasına ekleyin:

{
  "extensions": {
    "medas": {
      "command": "python",
      "args": ["/path/to/medas_mcp/server.py"],
      "cwd": "/path/to/medas_mcp"
    }
  }
}

Claude Desktop

{
  "mcpServers": {
    "medas": {
      "command": "python",
      "args": ["/path/to/medas_mcp/server.py"]
    }
  }
}

Araçlar

Araç

Açıklama

Hız

list_topics(search?)

92 TÜİK konusunu listeler

<50ms (önbellek)

get_indicators(topic_index)

Göstergeleri + basamaklı dalları alır

<50ms (önbellek)

download(topic_index, indicators?, format?, save_path?, live?)

XLS/CSV raporu indirir

<50ms önbellek / ~12sn canlı

Örnek akış

1. list_topics("fiyat") → [{index:78, label:"Tüketici Fiyat Endeksi"}]
2. get_indicators(78) → {count:12, indicators:[...]}
3. download(78, format="xls") → /tmp/MEDAS_Tüketici_Fiyat_Endeksi_20260820.xls

Mimari

AI Agent  ⇄  MCP (stdio)  ⇄  server.py  ⇄  medas_client.py
                                            ├─ cache (data/*.json) → instant
                                            └─ Playwright (live=true) → ZK AU protocol

Önbellek vs Canlı

Mod

Kaynak

Hız

Veri

live=false (varsayılan)

data/*.json önbelleği

<50ms

Gösterge adları + sahte değerler

live=true

POST /medas/zkau → GET /pivot.xls

~12s

Gerçek MEDAS pivot tablosu

Dosyalar

medas_mcp/
├── server.py              # MCP server (3 tools)
├── medas_client.py        # Hybrid client (cache + live Playwright)
├── KNOWHOW.md             # ZK AU protocol traffic notes
├── AGENTS.md              # AI agent instructions
├── README.md              # This file
├── pyproject.toml         # Package metadata
├── .gitignore
└── data/
    ├── topic_mapping.json  # 92 topics with URLs
    ├── topic_gosterge.json # Indicators + cascading branches
    └── medas_unified.json  # Unified dataset

ZK AU Protokolü

  • dtid + toplu cmd_n=onSelect/onClick ile POST /medas/zkau;jsessionid=XXX

  • Widget kimlikleri her oturumda değişir — DOM üzerinden dinamik olarak keşfedilir

  • Basamaklama: zk.Widget.$().fire('onSelect', {items:[itemId], reference:itemId})

Lisans

MIT

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Enables querying Turkish economic data (inflation, FX rates, policy rates, etc.) from TCMB EVDS via curated tools, preventing LLM hallucination.
    6
    -
  • A
    license
    A
    quality
    B
    maintenance
    Provides unified access to Turkish official data from TÜİK (statistics via SDMX) and TCMB EVDS (financial series), enabling search, query, and tidy CSV export with full frequency, aggregation, and formula support.
    16
    1
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    MCP server that unifies official Turkish open data sources into a single interface, letting AI agents query and compare normalized indicators like population, inflation, and GDP through natural language.
    10
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI assistants to query Turkey's public data, including central-bank FX rates, earthquake catalog, weather forecasts, public holidays, and offline validation of Turkish ID, tax, and IBAN numbers, with sourced and timestamped responses.
    44
    93 npm
    1
    MIT