mcp-data-service
Provides data query, insights, schema exploration, previews, aggregations, correlation analysis, and read-only SQL querying over SQLite database files.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-data-service What's the video with the highest completion rate?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Data Service · MCP 数据服务
Expose data query + insights + SQL as an MCP Server — plug into Claude Desktop, Cursor, or any MCP client in 30 seconds. 把「数据查询 + 自动洞察 + SQL」包装成 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 — pandas + SQLite locally.
v0.2.0: 11 tools + 2 resources + 2 prompts · CSV/SQLite · pagination · read-only SQL · health check · Docker
Tools (11)
Tool | What it does |
| Query: TOP/BOTTOM/AVG/SUM/by-date + filter + pagination + column select |
| Auto insights: overview + anomaly (1.5σ) + recommendations |
| List columns & dtypes |
| List configured sources |
| Clear cache |
| Detailed schema: dtype/nulls/mean/min/max/samples |
| Paginated preview with filter |
| Group-by agg (mean/sum/count/min/max/median) |
| Pearson correlation matrix |
| Read-only SELECT/WITH over DataFrame or SQLite file |
| Health: sources/rows/cols/tools |
Resources (2)
URI | What |
| First 5 rows |
| Schema JSON (rows + dtypes) |
Prompts (2)
Prompt | What |
| 6-step full analysis guide |
| Anomaly drill-down guide |
Quick Start
pip install -r requirements.txt
pip install -e .[dotenv] # or pipx install -e .[dotenv]
LOG_LEVEL=DEBUG python server.py --verbose --health # 详细日志
python tests/test_server.py # direct + MCP handshake (tools/resources/prompts)
python server.py --health # health check
python server.py # stdio (clients launch it)Connect from Claude Desktop / Cursor
{ "mcpServers": { "data-service": { "command": "python", "args": ["/absolute/path/to/mcp-data-service/server.py"] } } }Multiple sources (CSV + SQLite)
DATA_SOURCES="default=./data/video_stats.csv,archive=./data/archive.db" python server.py
# SQLite auto-detected by .db/.sqlite; table video_stats or first table is usedDocker
docker build -t mcp-data-service .
docker run -i --rm -v ./data:/app/data:ro mcp-data-service --health
docker compose upRelated MCP server: Pandas-MCP Server
中文
这是什么?
一个 MCP Server:把一张数据表变成任何 AI Agent 可调用的工具。不依赖 LLM API——pandas + SQLite 本地计算。
v0.2.0:11 工具 + 2 资源 + 2 提示 · 支持 CSV/SQLite · 分页 · 只读 SQL · 健康自检 · Docker
工具清单(11)
工具 | 作用 |
| 按指标查询:TOP/BOTTOM/平均值/总和/按日期 + 过滤 + 分页 + 选列 |
| 自动洞察:总览 + 异常(1.5σ)+ 建议 |
| 列出列名与类型 |
| 多源列表 / 清缓存 |
| 详细 Schema + 统计摘要 |
| 分页预览 + 条件过滤 |
| 分组聚合 mean/sum/count/min/max/median |
| 相关性矩阵 |
| 只读 SELECT/WITH(内存 DataFrame 或 SQLite 文件) |
| 健康自检 |
资源与提示
资源:
data://{source}/preview预览、data://{source}/schemaJSON提示:
analyze_video_data全流程引导、anomaly_drilldown异常下探
快速开始
pip install -r requirements.txt
pip install -e .[dotenv] # 或 pipx install -e .[dotenv]
LOG_LEVEL=DEBUG python server.py --verbose --health # 详细日志
python tests/test_server.py # 直调 + MCP 握手
python server.py --health # 自检
python server.py # stdio(客户端自动拉起)多数据源(CSV + SQLite)
DATA_SOURCES="default=./data/video_stats.csv,archive=./data/archive.db" python server.py
# .db/.sqlite 自动走 SQLite,表名为 video_stats 或首表Docker
docker build -t mcp-data-service .
docker compose upLicense
MIT © lengzhanbao
Available Tools
11 toolsaggregate_statsC
按字段分组聚合。
Inputs: agg, format, metric, source, +2 more. Returns: result
correlation_analysisB
数值列相关性矩阵(Pearson),可选指定列。
Inputs: format, source, columns. Returns: result
data_insightsC
自动洞察:数据总览 + 异常下探(1.5σ 偏离)+ 建议。列名以实际 CSV 为准。
Inputs: metric, source. Returns: result
get_schemaB
获取数据集详细 Schema:列名、类型、非空数、均值/分位数、取值示例。
Inputs: source. Returns: result
health_checkA
健康自检:返回数据源、行列数、必要列、MCP 工具数。
Inputs: no named parameters. Returns: result
list_columnsB
列出数据集的全部列名与类型。
Inputs: source. Returns: result
list_sourcesA
列出当前可用的数据源(通过 DATA_FILE / DATA_SOURCES 配置)。
Inputs: no named parameters. Returns: result
preview_dataC
分页预览数据,支持条件过滤。
Inputs: page, format, source, condition, +1 more. Returns: result
query_video_statsC
查询统计数据。列名以实际 CSV 为准,metric 必须是存在的列。
Inputs: page, rule, format, metric, +4 more. Returns: result
refresh_sourcesA
清除数据源缓存;下次查询重新读取 CSV/SQLite。只读操作,不修改文件。
Inputs: no named parameters. Returns: result
sql_queryA
只读 SQL 查询(仅 SELECT/WITH),在 SQLite 或 DataFrame 上执行。
Inputs: sql (required), format, source. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools are distinct, but list_columns and get_schema clearly overlap, and query_video_stats, aggregate_stats, and data_insights have fuzzy boundaries around statistics and insights. Descriptions help somewhat, but an agent could easily select the wrong tool for a given analytical request.
All names are snake_case, but conventions are mixed: verb-noun names like list_columns and preview_data coexist with noun-phrase names like data_insights and correlation_analysis. query_video_stats also stands out as a domain-specific exception to the otherwise general-purpose naming pattern.
Eleven tools is an appropriate size for a data service covering source management, schema inspection, preview, aggregation, correlation, SQL querying, and health checks. The count is neither bloated nor too thin for the stated purpose.
The tool surface covers the core read-only data workflow well: discovering sources, inspecting schema, previewing, aggregating, running SQL, checking correlations, and getting automated insights. Minor gaps exist—such as no explicit dataset-comparison or export tool—but they are workable through sql_query and preview_data.
Related MCP Connectors
List datasets, schemas, run APL queries, and use prompts for exploration, anomalies, and monitoring.
The all-in-one data stack for agents. Upload files, run SQL, evolve tables, and render charts.
Analytics your AI agent can actually use. Track, experiment, and optimize via MCP.
Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.
Related MCP Servers
- AlicenseAqualityAmaintenanceProduction Model Context Protocol (MCP) server for business — replaces stale generic descriptions with concrete 2026 technical intelligence and data agents. Exposes dynamic KPI analytics, forecasting, anomaly detection, and schema resources across 10 enterprise domains via FastMCP over stdio and SSE transports.9AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to safely execute pandas code for data analysis and generate interactive visualizations through MCP protocol.MIT
- FlicenseNot gradedqualityDmaintenanceEnables querying CSV or Excel data using natural language through MCP tools, running pandas operations on an uploaded dataset.-
- FlicenseNot gradedqualityDmaintenanceProvides MCP-compatible tools for data analysis, including file reading, Python/SQL execution, and hypothesis testing. Enables autonomous data analysis agents to interact with a sandboxed environment.1-