excel-mcp-server

1.0.0 • Public • Published

Excel文件读取MCP服务器

这是一个Model Context Protocol (MCP) 服务器,提供Excel文件读取功能,可用于Cursor等支持MCP的AI助手工具。

安装依赖

在使用之前,确保已安装以下依赖:

  1. Python 3.6+
  2. Node.js 12+
  3. 以下Python包:
    pip install pandas fastapi mcp-server
    

本地安装

# 全局安装
npm install -g .

# 运行
excel-mcp-server

使用npx运行

npx .

在Cursor中配置

在Cursor的配置文件中添加以下内容:

{
  "mcpServers": {
    "excel-reader": {
      "command": "npx",
      "args": [
        "excel-mcp-server"
      ]
    }
  }
}

对于Windows用户,如果遇到npx问题,可以使用以下替代配置:

{
  "mcpServers": {
    "excel-reader": {
      "command": "node",
      "args": [
        "路径到你的项目/index.js"
      ]
    }
  }
}

或者直接使用Python:

{
  "mcpServers": {
    "excel-reader": {
      "command": "python",
      "args": [
        "路径到你的项目/read_file_server.py"
      ]
    }
  }
}

功能

  • 读取Excel文件内容 (read_excel_file)
  • 获取Excel文件的工作表列表 (list_excel_sheets)
  • 查询Excel数据 (query_excel_data)

Readme

Keywords

Package Sidebar

Install

npm i excel-mcp-server

Weekly Downloads

245

Version

1.0.0

License

ISC

Unpacked Size

24.1 kB

Total Files

8

Last publish

Collaborators

  • lichard