mcp-data-service
Exposes data query and auto-insights (anomaly detection) as MCP tools. Enables AI agents to query metrics, list columns, and get data insights directly from pandas.
README
MCP Data Service · MCP 数据服务
Expose data query + auto-insights (anomaly detection) as an MCP Server — plug into Claude Desktop, Cursor, or any MCP client in 30 seconds. 把「数据查询 + 自动洞察」包装成 MCP 标准工具,Claude Desktop / Cursor 即插即用——给任意 AI Agent 装上数据能力,30 秒接入。
English · 中文
English
What is this?
An MCP (Model Context Protocol) server that turns a data table into callable tools for any AI agent. No LLM API needed — everything is computed locally with pandas, so it is free and fast.
Tools
| Tool | What it does |
|---|---|
query_video_stats(metric, rule, condition) |
Query by metric: TOP N / BOTTOM N / AVG / SUM / by date / with filter |
data_insights() |
Auto insights: overview + anomaly detection (1.5σ) + recommendations |
list_columns() |
List all column names and types |
Quick Start
pip install -r requirements.txt
# Self-test (direct calls + MCP handshake)
python tests/test_server.py
# Run the server (stdio transport; clients below will launch it automatically)
python server.py
Connect from Claude Desktop / Cursor
Add to your MCP config (e.g. claude_desktop_config.json):
{
"mcpServers": {
"data-service": {
"command": "python",
"args": ["/absolute/path/to/mcp-data-service/server.py"]
}
}
}
Restart the client, then ask your agent: "What's the video with the highest completion rate?" or "Run auto insights on the data."
Project Layout
server.py FastMCP server (@mcp.tool registers 3 tools)
data/video_stats.csv Sample data
tests/test_server.py Direct-call + MCP-stdio handshake tests
requirements.txt fastmcp + pandas
Tests
python tests/test_server.py
# [PASS] query_video_stats direct calls
# [PASS] data_insights auto insights
# [PASS] MCP stdio handshake: list_tools + call_tool
Roadmap
- [ ] Publish to PyPI (
pipx install mcp-data-service) - [ ] SQLite / PostgreSQL backend
- [ ] Multiple data sources per server
中文
这是什么?
一个 MCP(Model Context Protocol) Server:把一张数据表变成任何 AI Agent 可调用的工具。完全不依赖 LLM API——全部用 pandas 本地计算,免费且快速。
工具清单
| 工具 | 作用 |
|---|---|
query_video_stats(metric, rule, condition) |
按指标查询:TOP N / BOTTOM N / 平均值 / 总和 / 按日期 / 带条件过滤 |
data_insights() |
自动洞察:数据总览 + 异常下探(1.5σ)+ 运营建议 |
list_columns() |
列出全部列名与类型 |
快速开始
pip install -r requirements.txt
# 自测(直接调用 + MCP 握手)
python tests/test_server.py
# 启动(stdio 传输,客户端按下面配置自动拉起)
python server.py
接入 Claude Desktop / Cursor
在客户端 MCP 配置(如 claude_desktop_config.json)里加:
{
"mcpServers": {
"data-service": {
"command": "python",
"args": ["/绝对路径/mcp-data-service/server.py"]
}
}
}
保存并重启客户端,即可让 Agent 直接调用「完播率最高的视频」「自动洞察数据异常」等能力。
文件结构
server.py FastMCP Server(@mcp.tool 注册 3 个工具)
data/video_stats.csv 示例数据
tests/test_server.py 直调 + MCP stdio 握手双测试
requirements.txt fastmcp + pandas
测试
python tests/test_server.py
# [PASS] query_video_stats 直接调用
# [PASS] data_insights 自动洞察
# [PASS] MCP stdio 握手:list_tools + call_tool
开发计划
- [ ] 发布 PyPI(
pipx install mcp-data-service) - [ ] SQLite / PostgreSQL 后端
- [ ] 单个 Server 支持多个数据源
License · 许可证
MIT © lengzhanbao
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。