YM

yzfly/mcp-excel-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

95 stars 20 forks 质量 67 趋势 19

yzfly/mcp-excel-server 是从 https://github.com/yzfly/mcp-excel-server. 导入的 MCP 服务器候选服务器。

概览

yzfly/mcp-excel-server 是从 https://github.com/yzfly/mcp-excel-server. 导入的 MCP 服务器候选服务器。

概述(AI 翻译)

一台MCP服务器,提供全面的Excel文件管理和数据分析功能。

特色

  • Excel 文件操作

  • 读取多种Excel格式(XLSX、XLS、CSV、TSV、JSON)

  • 编写和更新Excel文件

  • 获取文件信息和表名

  • 数据分析

  • 摘要统计与描述性分析

  • 数据质量评估

  • 枢透表

  • 数据过滤和查询

  • 可视化

  • 从Excel数据生成图表和图表

  • 创建数据预览

  • 导出可视化图像

安装

  1. 创建一个新的Python环境(推荐):

  2. 安装依赖:

与 Claude Desktop 的集成

  1. 安装Claude桌面
  2. 打开设置,进入开发者标签页
  3. 编辑 claude_desktop_config.json:

可用工具

文件阅读

  • read_excel:读取Excel文件
  • get_excel_info:获取文件详情
  • get_sheet_names:列表工作表名称

数据分析

  • analyze_excel:进行统计分析
  • filter_excel:按条件过滤数据
  • pivot_table:创建数据透视表
  • data_summary:生成全面的数据摘要

数据可视化

  • export_chart:生成图表

本页由 AI 翻译,技术细节请以原文为准。

README

Excel MCP Server

An MCP server that provides comprehensive Excel file management and data analysis capabilities.

Features

  • Excel File Operations

    • Read multiple Excel formats (XLSX, XLS, CSV, TSV, JSON)
    • Write and update Excel files
    • Get file information and sheet names
  • Data Analysis

    • Summary statistics and descriptive analysis
    • Data quality assessment
    • Pivot tables
    • Filtering and querying data
  • Visualization

    • Generate charts and plots from Excel data
    • Create data previews
    • Export visualizations as images

Installation

  1. Create a new Python environment (recommended):
# Using uv (recommended)
uv init excel-mcp-server
cd excel-mcp-server
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Or using pip
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install dependencies:
# Using uv
uv pip install -e .

Integration with Claude Desktop

  1. Install Claude Desktop
  2. Open Settings and go to the Developer tab
  3. Edit claude_desktop_config.json:
{
  "mcpServers": {
      "command": "uvx",
      "args": [
        "mcp-excel-server"
      ],
      "env": {
        "PYTHONPATH": "/path/to/your/python"
      }
  }
}

Available Tools

File Reading

  • read_excel: Read Excel files
  • get_excel_info: Get file details
  • get_sheet_names: List worksheet names

Data Analysis

  • analyze_excel: Perform statistical analysis
  • filter_excel: Filter data by conditions
  • pivot_table: Create pivot tables
  • data_summary: Generate comprehensive data summary

Data Visualization

  • export_chart: Generate charts
    • Supports line charts, bar charts, scatter plots, histograms

File Operations

  • write_excel: Write new Excel files
  • update_excel: Update existing Excel files

Available Resources

  • excel://{file_path}: Get file content
  • excel://{file_path}/info: Get file structure information
  • excel://{file_path}/preview: Generate data preview image

Prompt Templates

  • analyze_excel_data: Guided template for Excel data analysis
  • create_chart: Help create data visualizations
  • data_cleaning: Assist with data cleaning

Usage Examples

  • “Analyze my sales_data.xlsx file”
  • “Create a bar chart for product_sales.csv”
  • “Filter employees over 30 in employees.xlsx”
  • “Generate a pivot table of department sales”

Security Considerations

  • Read files only from specified paths
  • Limit file size
  • Prevent accidental file overwriting
  • Strictly control data transformation operations

Dependencies

  • pandas
  • numpy
  • matplotlib
  • seaborn

License

MIT License

在 GitHub 查看完整 README

安装

uvx mcp-excel-server
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "command": "uvx", "args": [ "mcp-excel-server" ], "env": { "PYTHONPATH": "/path/to/your/python" } } }