Skip to main content
Glama
CSOAI-ORG

CSV Analytics MCP Server

by CSOAI-ORG

CSV 分析 MCP 服务器

由 MEOK AI Labs 提供 | meok.ai

为 AI 代理提供的电子表格和 CSV 分析工具包。加载 CSV 文件、过滤和查询数据、计算统计信息、创建聚合、构建数据透视表,并导出适合图表展示的数据——所有功能均由 pandas 驱动。

工具

工具

描述

load_csv

将 CSV 文件加载到内存中以供分析

query_data

过滤、选择列、排序和切片数据

describe_columns

统计摘要(平均值、标准差、四分位数、最高值等)

aggregate

使用 sum、mean、count、median 等进行 GROUP BY 操作

export_chart_data

以 Chart.js / Plotly 兼容格式导出数据

pivot_table

Excel 风格的数据透视表

安装

pip install mcp pandas

使用方法

运行服务器

python server.py

Claude Desktop 配置

{
  "mcpServers": {
    "csv-analytics": {
      "command": "python",
      "args": ["/path/to/csv-analytics-mcp/server.py"]
    }
  }
}

工作流程

  1. 加载 CSV 文件(按名称存储在内存中)

  2. 探索 使用 describe_columns

  3. 查询 使用过滤器、排序、列选择

  4. 聚合透视 以获取摘要

  5. 导出 可视化所需的图表数据

调用示例

加载 CSV 文件:

Tool: load_csv
Input: {"file_path": "/Users/me/data/sales.csv"}
Output: {"name": "sales", "rows": 15432, "columns": ["date", "product", "region", "amount", "quantity"], "dtypes": {"amount": "float64", "quantity": "int64"}}

描述列:

Tool: describe_columns
Input: {"name": "sales"}
Output: {"columns": {"amount": {"mean": 245.32, "std": 89.10, "min": 5.00, "max": 2500.00, "median": 210.50}, "region": {"unique": 4, "top_values": {"North": 4210, "South": 3890, ...}}}}

带过滤器的查询:

Tool: query_data
Input: {"name": "sales", "filter_expr": "amount > 500 and region == 'North'", "sort_by": "amount", "ascending": false, "limit": 10}
Output: {"rows": [...], "row_count": 10, "total_rows": 312}

聚合:

Tool: aggregate
Input: {"name": "sales", "group_by": ["region"], "metrics": {"amount": "sum", "quantity": "mean"}}
Output: {"rows": [{"region": "North", "amount": 1234567.89, "quantity": 12.3}, ...]}

数据透视表:

Tool: pivot_table
Input: {"name": "sales", "index": "region", "columns": "product", "values": "amount", "aggfunc": "sum"}
Output: {"pivot": {"North": {"Widget A": 50000, "Widget B": 32000}, "South": {"Widget A": 45000, ...}}}

导出用于绘图:

Tool: export_chart_data
Input: {"name": "sales", "x_column": "region", "y_columns": ["amount"], "chart_type": "bar"}
Output: {"chart_type": "bar", "labels": ["North", "South", "East", "West"], "datasets": [{"label": "amount", "data": [1234567, 987654, ...]}]}

定价

层级

限制

价格

免费版

每天 30 次调用,每次查询最多 500 行

$0

专业版

无限制 + Excel/Parquet 支持 + 多文件连接

$9/月

企业版

定制 + 流式处理大文件 + 定时报告

联系我们

许可证

MIT

-
security - not tested
F
license - not found
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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/CSOAI-ORG/csv-analytics-mcp'

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