Skip to main content
Glama
lengzhanbao

mcp-data-service

by lengzhanbao

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 秒接入。

License: MIT Python 3.10+ CI PRs Welcome


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

⬆ Back to top


中文

这是什么?

一个 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

-
license - not tested
-
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 Connectors

  • Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.

  • Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.

  • Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.

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/lengzhanbao/mcp-data-service'

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