ZE

zhiwei5576/excel-mcp-server

开发工具

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

51 stars 11 forks 质量 62 趋势 0MIT

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

概览

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

概述(AI 翻译)

简体中文 |英语

基于模型上下文协议(MCP)的 Excel 文件处理服务器,提供读取、写入和分析 Excel 文件的功能。

特色

  • 📖 读取Excel文件

  • 获取工作表列表

  • 阅读特定的工作表数据

  • 阅读所有工作表数据

  • ✍️ 编写Excel文件

  • 创建新的 Excel 文件

  • 写到具体的练习题

  • 支持多张练习题

  • 🔍 分析Excel结构

  • 分析工作表结构

  • 导出结构到新文件

  • 💾 缓存管理

  • 自动文件内容缓存

  • 定时缓存清理

  • 手动缓存清除

  • 📝 日志管理

  • 自动操作日志

  • 定期日志清理

安装

通过Smithery安装

通过Smithery自动安装Claude Desktop的excel-mcp-server:

手动安装

通过NPM安装 通过在MCP服务器配置中添加以下配置,可以自动安装Excel-MCP-server。

Windows平台:

其他平台:

注意:LOG_PATH是可选的。如果未设置,日志将存储在应用根目录下的“log”文件夹中。其他参数则为可选。

API 工具

结构工具

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

README

以下为原文 README 节选,完整内容请查看原文。

Excel MCP Server

简体中文 | English

Excel file processing server based on Model Context Protocol (MCP), providing functionalities for reading, writing, and analyzing Excel files.

Features

  • 📖 Read Excel Files

    • Get worksheet list
    • Read specific worksheet data
    • Read all worksheets data
  • ✍️ Write Excel Files

    • Create new Excel files
    • Write to specific worksheet
    • Support multiple worksheets
  • 🔍 Analyze Excel Structure

    • Analyze worksheet structure
    • Export structure to new file
  • 💾 Cache Management

    • Automatic file content caching
    • Scheduled cache cleanup
    • Manual cache clearing
  • 📝 Log Management

    • Automatic operation logging
    • Periodic log cleanup

Installation

Installing via Smithery

To install excel-mcp-server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @zhiwei5576/excel-mcp-server --client claude

Installing Manually

Installing via NPM excel-mcp-server can be automatically installed by adding the following configuration to the MCP servers configuration.

Windows Platform:

{
  "mcpServers": {
    "excel": {
        "command": "cmd",
        "args": ["/c", "npx", "--yes", "@zhiweixu/excel-mcp-server"],
        "env": {
            "LOG_PATH": "[set an accessible absolute path]",
            "CACHE_MAX_AGE": "1",
            "CACHE_CLEANUP_INTERVAL": "4",
            "LOG_RETENTION_DAYS": "7",
            "LOG_CLEANUP_INTERVAL": "24"
        }
    }
}

Other Platforms:

{
  "mcpServers": {
    "excel": {
        "command": "npx",
        "args": ["--yes", "@zhiweixu/excel-mcp-server"],
        "env": {
            "LOG_PATH": "[set an accessible absolute path]",
            "CACHE_MAX_AGE": "1",
            "CACHE_CLEANUP_INTERVAL": "4",
            "LOG_RETENTION_DAYS": "7",
            "LOG_CLEANUP_INTERVAL": "24"
        }
    }
}

Note: LOG_PATH is optional. If not set, logs will be stored in the ‘logs’ folder under the application root directory.other arguments are optional.

API Tools

Structure Tools

  1. analyzeExcelStructure

    • Function: Get Excel file structure including sheet list and column headers in JSON format
    • Parameters:
      • fileAbsolutePath: Absolute path of the Excel file
      • headerRows: Number of header rows (default: 1)
  2. exportExcelStructure

    • Function: Export Excel file structure (sheets and headers) to a new Excel template file
    • Parameters:
      • sourceFilePath: Source Excel file path
      • targetFilePath: Target Excel file path
      • headerRows: Number of header rows (default: 1)

Read Tools

  1. readSheetNames
在 GitHub 查看完整 README

安装

npx --yes @zhiweixu/excel-mcp-server
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "excel": { "command": "cmd", "args": ["/c", "npx", "--yes", "@zhiweixu/excel-mcp-server"], "env": { "LOG_PATH": "[set an accessible absolute path]", "CACHE_MAX_AGE": "1", "CACHE_CLEANUP_INTERVAL": "4", "LOG_RETENTION_DAYS": "7", "LOG_CLEANUP_INTERVAL": "24" } } }