xtai-mcp-data-analysis

xtai-mcp-data-analysis

An MCP server for data analysis and visualization supporting CSV and Excel files. It enables users to generate statistical summaries and create multi-dimensional charts like heatmaps and bar plots through natural language.

Category
Visit Server

README

xtai-mcp-data-analysis

一个基于MCP协议的数据分析和可视化 MCP server,支持CSV和Excel格式的数据文件处理。

功能特性

  • 数据概览:获取数据的表头信息、字段类型、数据条数等基本信息
  • 数据汇总分析:计算数值列的平均值、中位数、方差等统计指标
  • 多维数据透视可视化:生成柱状图、饼图、热力图、堆叠图等多种可视化图表
  • 灵活的聚合函数:支持求和(sum)、平均(mean)、计数(count)、最大值(max)、最小值(min)等多种聚合方式

如何在客户端引用

在MCP客户端配置中添加如下配置:

{
  "mcpServers": {
    "xtai-mcp-data-analysis": {
      "command": "uvx",
      "args": ["xtai-mcp-data-analysis"]
    }
  }
}

提示词

  • 如:从多个维度分析 <xxxxxx.xlsx> 的数据,并生成图表+文字的分析报告,以 Markdown 格式输出。

提供的工具

1. data_overview

获取数据的基本概览信息。

参数:

  • data_path: 数据文件路径,支持.csv、.xlsx、.xls格式

示例:

{
  "name": "data_overview",
  "arguments": {
    "data_path": "./sales_data.csv"
  }
}

2. data_summary

获取数据的汇总分析情况,包括数值列统计、类别列统计和缺失值统计。

参数:

  • data_path: 数据文件路径,支持.csv、.xlsx、.xls格式

示例:

{
  "name": "data_summary",
  "arguments": {
    "data_path": "./sales_data.xlsx"
  }
}

3. visualize_data

通过数据透视的方式可视化数据。

参数:

  • data_path: 数据文件路径,支持.csv、.xlsx、.xls格式
  • index: 数据透视的索引列名列表,支持1-2个维度,如['城市','季度']
  • values: 需要聚合的数值列名列表,如['销量','销售额']
  • aggfunc (可选): 聚合函数,支持sum | mean | count | max | min | median | std | var,默认是sum
  • output_dir (可选): 聚合图表的保存目录,默认./output

示例:

{
  "name": "visualize_data",
  "arguments": {
    "data_path": "./sales_data.csv",
    "index": ["城市"],
    "values": ["销售额"],
    "aggfunc": "sum",
    "output_dir": "./charts"
  }
}

支持的文件格式

  • CSV (逗号分隔值文件)
  • XLSX (Excel 2007+ 文件)
  • XLS (旧版 Excel 文件)

输出图表类型

根据输入参数的不同,服务器会自动生成多种类型的图表:

  • 单维度分析:柱状图、饼图
  • 双维度分析:热力图、堆叠柱状图、分组柱状图
  • 多值对比:多指标对比柱状图

所有生成的图表都会以PNG格式保存到指定的输出目录中,并返回图表路径和对应的数据信息。

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured