Skip to main content
Glama

◈ Datyra MCP — AI 上下文中介器

作者:Nakano-04 — Mercenary Company “Mercenario del rojo” · 软件工程师(网络安全 · AI · 系统 · ERP)· 构建安全工具、AI 系统、ERP 模块与研究 · ✉️ nakano.04.2025@gmail.com · 🔗 https://github.com/Nakano-04

智能编排器 + 真正的通用 MCP 服务器,能理解自然语言并自动路由:Python · R · SQL · Spark · Jupyter · Power BI · Tableau — 兼容所有支持 MCP 的 AI

version python mcp style license


1. 它是什么?

CLI 中介器 + HTML MOD + MCP 服务器,无需代码即可分析 Recursos/ 中的任何文件。你只需说:

"analiza las ventas"
"genera dashboard con gráficos"
"predice moroso con machine learning"
"haz analisis estadistico correlacion"

面向人类 → CLI。面向 AI → MCP 工具(Claude、Devin、Codex、opencode、Cursor、Windsurf、Copilot、Gemini、ChatGPT 以及任何支持 MCP 的其他工具 — 开放协议)。


Related MCP server: mix_server

2. MCP 服务器 — 10 个工具(通用)

mcp_server.py(FastMCP,stdio + http)暴露完整的 1-6 周期 — 对所有 AI 通用

工具

描述

示例

analyze_data

自然语言 → 正确的引擎

analiza ciberseguridad

list_datasets

Recursos/ 清单

run_statistics

Pearson/Spearman/Shapiro/IQR

correlacion monto vs score

train_model

RF 回归/分类 + KMeans

predice moroso

generate_dashboard

4 张 MOD 180dpi PNG + HTML

dashboard mineria

batch_process

所有 CSV 批量处理

todos batch

profile_data

预览 + describe

finanzas_masivo.csv

query_sql

对 sqlite/duckdb 执行 SQL

SELECT region, SUM(ingreso)...

get_tool_status

可用引擎

author_info

Nakano-04 / Mercenary Company 信息

通用优势(任何支持 MCP 的 AI):

  • Devin: 直接分析、工作流报告、自动日志/指标

  • Claude: 复杂统计、仪表盘、大规模 Spark

  • Codex/opencode/Cursor/Windsurf/Copilot: 基于模式的建议、自动补全、生成 DS 代码

  • Gemini/ChatGPT/其他: 相同的 mcp.json — 标准协议,无供应商锁定

通用配置

任何支持 MCP 的 AI — Claude Desktop、opencode、Cursor、Windsurf、VS Code、Windsurf、Copilot、Gemini CLI 等(%APPDATA%\Claude\claude_desktop_config.json / mcp.json / .cursor/mcp.json):

{
  "mcpServers": {
    "datyra-mcp": {
      "command": "py",
      "args": ["C:/ruta/a/Mediador-Analisis-de-Datos/mcp_server.py"]
    }
  }
}

参见随附的 mcp.json.opencode.json.example

py mcp_server.py              # stdio (Claude/opencode)
py -m mcp dev mcp_server.py   # inspector

额外:profile_data + query_sql + get_tool_status 作为附加功能。


3. 视觉演示

Demo GIF

带 Rich 的 CLI: 青色/品红色表格、面板、dots12 加载动画。 HTML MOD 报告 salida/informe_*.html:渐变页眉 #0a0e14→#1a1033、霓虹徽章、base64 图库。 MOD 图表 visual_motor.py:KDE 直方图、水平条形图、带注释的热力图、时间序列 — 180dpiseaborn、背景 #151a23、霓虹调色板。


4. 架构

mediador_ia.py → mediador/nucleo.py → clasificar() → MOTOR_POR_CLAVE → motor.ejecutar() → informe.py → HTML+TXT
mcp_server.py  →  FastMCP 9 tools  →  nucleo/contexto  (mismo core)

motores/: python_motor (1-6), r_motor, sql_motor, spark_motor, jupyter_motor, visual_motor MOD
contexto.py: rglob Recursos/, tipos, filas
herramientas.py: detección binarios
estilos.py: PALETA_MOD, CSS_MOD

通过关键词 + ORDEN_PRECEDENCIAnucleo.py:22 进行分类:ml > big_data > sql > jupyter > visual > estadistica > r > python


5. 安装

5.1 要求

Python 3.10+ + pip

5.2 基础安装(CLI)

cd Mediador-Analisis-de-Datos
py -m venv .venv; .venv\Scripts\activate  # Windows
# Linux/Mac: python3 -m venv .venv; source .venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-extra.txt  # opcional: jupyter/pyspark
py mediador_ia.py -t; py mediador_ia.py -l
py mediador_ia.py "analiza las ventas"  # test rapido

requirements.txt: pandas, openpyxl, matplotlib, seaborn, scipy, scikit-learn, rich, jinja2, mcp, anyio, httpx, uvicorn, starlette

5.3 使用 opencode 安装(MCP)

npm install -g opencode-ai@latest
opencode --version  # verificar 1.18.22+

配置 MCP — 在你的项目中创建 opencode.json,或全局 ~/.config/opencode/opencode.jsonc

{
  "mcp": {
    "datyra-mcp": {
      "type": "local",
      "command": ["py", "C:/ruta/a/Mediador-Analisis-de-Datos/mcp_server.py"],
      "enabled": true
    }
  }
}

参见随附的 .opencode.json.examplemcp.json。然后:

opencode mcp list  # debe salir ✓ datyra-mcp connected

仅限会话:只在 C:\ruta\proyecto\opencode.json 创建 opencode.json,完成后删除。


6. 使用

6.1 直接 CLI

py mediador_ia.py "analiza las ventas"
py mediador_ia.py "genera dashboard de mineria con graficos"
py mediador_ia.py "predice moroso con machine learning en finanzas"
py mediador_ia.py "analisis estadistico correlacion"
py mediador_ia.py "analiza todos batch"  # batch todos los CSVs
py mediador_ia.py                        # REPL: -l, -t, !cmd, salir
# flags: -l lista datasets, -t test motores, -o salida/, -v verbose

6.2 使用 opencode(实时 MCP)

opencode                          # abre TUI
# dentro de opencode escribe:
"analiza finanzas_masivo 20k filas: limpia IQR/nulos, EDA skew+Pearson, RF150 moroso, dashboard 4 graficos"
# o headless:
opencode run "analiza ventas con dashboard 4 graficos"

MCP 流程: opencode → datyra-mcp → nucleo.clasificar() → MOTOR_POR_CLAVE → visual_motor MOD → salida/informe_*.html 然后在 Edge/Chrome 中打开 salida/informe_*.html--app 无标签页)和 salida/*.png 180dpi。

6.3 MCP 工具(来自任何 AI)

analyze_datalist_datasetsrun_statisticstrain_modelgenerate_dashboardbatch_processprofile_dataquery_sqlget_tool_statusauthor_info

7. 包含的大规模数据集(测试)

数据集

行数

文件

矿业

15k

Recursos/mineria_masivo.csv

网络安全

20k

Recursos/ciberseguridad_masivo.csv

金融

20k

Recursos/finanzas_masivo.csv

销售

25

Recursos/ventas_ejemplo.csv

支持的格式:csv/tsv/csv.gz, xlsx/xls, json, parquet, db/sqlite/duckdb, ipynb, pbix, twb/twbx, r/rds, sql, pkl。优先级 csv>excel>parquet>json 或按名称匹配。


8. 引擎

Python(1-6): 重复项、空值百分比、IQR、skewtrain_test_splitRF 150 MAE/RMSE/R2/CVKMeans k=3/4/5Pearson/Spearman/Shapiro视觉 MOD: KDE、水平条形图、热力图、时间序列。 R: dplyr、summary、cor、shapiro、kmeans。SQL/Spark/Jupyter/PBI/Tableau: 检测二进制或回退。

9. 输出 salida/

analisis_*.py, graficos_*.py, *.png (180dpi), informe_*.txt, informe_*.html (dark, base64)

10. 数据科学 1-6(无横向)

阶段

覆盖内容

1 定义

自动分类

2 收集

多格式清单

3 清洗

重复项、空值、IQR、datetime

4 EDA

describe+skew+cor+4 张 MOD 图表

5 建模

RF+KMeans+Pearson/Spearman/Shapiro

6 评估

指标、train/test、HTML

应要求不包含横向模块(治理/伦理)。

11. 路线图

  • CLI Rich + HTML MOD + 180dpi

  • IQR 清洗 + ML 评估 + KMeans + Shapiro

  • 批量 + MCP 服务器 10 个工具

  • 35 秒实时 opencode 演示 GIF + 文档

  • Streamlit 拖放

  • ARIMA/Prophet

12. 作者

Nakano-04 — Mercenary Company “Mercenario del rojo” 软件工程师(网络安全 · AI · 系统 · ERP) 构建安全工具、AI 系统、ERP 模块与研究 📧 nakano.04.2025@gmail.com · 🔗 https://github.com/Nakano-04

13. 许可证

Apache 2.0 — 参见 LICENSE

使用 pandas · seaborn · rich · jinja2 · mcp 以 MOD 深色风格制作 — Datyra MCP by Nakano-04。

A
license - permissive license
Not graded
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (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

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI-powered business intelligence and data analysis using pandas and LLM code generation. Supports automated data processing, statistical analysis, and visualization creation through natural language interactions.
    15
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with local CSV and Parquet data files through natural language queries, facilitating tasks like summarizing datasets or retrieving specific information.
    5

View all related MCP servers

Related MCP Connectors

  • The statistical analyst in your AI chat — validated, citable, re-runnable analysis of your data.

  • Connect your AI assistants to Keboola and expose your data, transformations, SQL queries, ...

  • The grounded data layer for any LLM: governed SQL, metrics, lineage and catalog over your data.

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/Nakano-04/Datyra-MCP'

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