Skip to main content
Glama
bluedragonDC

MEDAS MCP

by bluedragonDC

MEDAS MCP(仍在开发中!)

MCP 服务器,用于 TÜİK MEDAS(土耳其统计研究所指标)。

功能

  • 92 个主题 — 涵盖所有 TÜİK 统计类别

  • 400+ 个指标 — 即时缓存,支持实时回退

  • 动态发现 — 0 个硬编码 widget ID,自适应 UI 变化

  • 缓存优先list_topics/get_indicators/download 均从缓存读取,<50ms

  • 二进制 XLS — xlwt CDFV2 Excel 输出(与 MEDAS pivot.xls 格式相同)

  • 智能级联 — 自动选择必填细分(COICOP、SITC 等)

  • ZK Widget API — 通过 zk.Widget.$().fire() 实现稳健的细分处理

Related MCP server: evds-mcp-server

安装

pip install playwright xlwt httpx
playwright install chromium

或者使用 uv:

uv pip install -e .
playwright install chromium

用法

作为 MCP 服务器(stdio)

python server.py

Pi 集成

添加到 ~/.pi/config.json

{
  "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"]
    }
  }
}

工具

工具

描述

速度

list_topics(search?)

列出 92 个 TÜİK 主题

<50ms(缓存)

get_indicators(topic_index)

获取指标及级联分支

<50ms(缓存)

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

下载 XLS/CSV 报告

<50ms 缓存 / ~12s 实时

示例流程

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

架构

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

缓存与实时

模式

来源

速度

数据

live=false(默认)

data/*.json 缓存

<50ms

指标名称 + 模拟值

live=true

POST /medas/zkauGET /pivot.xls

~12s

真实 MEDAS 透视表

文件

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 协议

  • POST /medas/zkau;jsessionid=XXX,带有 dtid 和批量的 cmd_n=onSelect/onClick

  • Widget ID 每次会话都会变化——通过 DOM 动态发现

  • 级联:zk.Widget.$('#selectId').fire('onSelect', {items:[itemId], reference:itemId})

许可证

MIT

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables users to search and access Turkish public procurement data from EKAP v2 portal. Provides comprehensive tender search, detailed tender information, announcements, and authority/classification code lookups through natural language interactions.
    12
    94
    MIT
  • F
    license
    A
    quality
    C
    maintenance
    Enables querying Turkish economic data (inflation, FX rates, policy rates, etc.) from TCMB EVDS via curated tools, preventing LLM hallucination.
    6
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables querying Kosovo Agency of Statistics (ASKdata) data through PxWeb. Supports navigating subjects, exploring table metadata, and fetching data via natural language or direct tool calls.
    4
    MIT
  • 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

View all related MCP servers

Related MCP Connectors

  • Macro indicators from World Bank, FRED, IMF, and OECD via unified query surface.

  • Macro data for AI agents: GDP, inflation, unemployment & trade, any country. No API keys.

  • Query 29,500+ World Bank development indicators for 200+ countries across 60+ years.

View all MCP Connectors

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/bluedragonDC/medas_mcp'

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