npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-xlsx-server

v1.0.2

Published

MCP server for Excel file read/write operations using SheetJS (xlsx)

Readme

mcp-xlsx-server

基于 SheetJS (xlsx) 的 Excel 文件读写 MCP 服务。

功能

提供 5 个 MCP 工具:

| 工具 | 功能 | |------|------| | xlsx_list_sheets | 列出 xlsx 文件中所有 sheet 名称和行列数 | | xlsx_read | 读取指定 sheet 数据,支持 JSON/二维数组格式和范围选择 | | xlsx_create | 从 JSON 数据创建新的 xlsx 文件 | | xlsx_add_sheet | 向已有 xlsx 文件添加新 sheet | | xlsx_update_cells | 更新指定单元格值 |

安装

npm install -g mcp-xlsx-server

或直接运行:

npx mcp-xlsx-server

配置

在 Claude Code 中

编辑 claude.json,使用 mcpServers 字段:

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

在 VS Code (GitHub Copilot) 中

编辑 .vscode/mcp.json 或全局 mcp.json,使用 servers 字段(不是 mcpServers):

{
  "servers": {
    "xlsx": {
      "type": "stdio",
      "command": "npx",
      "args": ["mcp-xlsx-server"]
    }
  }
}

文件位置:

  • 工作区级别: .vscode/mcp.json
  • 全局: %APPDATA%\Code\User\mcp.json

在 Cline / Roo Code (VS Code 扩展) 中

编辑 cline.jsonmcp.json,使用 mcpServers 字段:

{
  "mcpServers": {
    "xlsx": {
      "command": "npx",
      "args": ["-y", "mcp-xlsx-server"]
    }
  }
}

在 Cursor 中

编辑 .cursor/mcp.json,使用 mcpServers 字段:

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

工具详解

xlsx_list_sheets

列出 xlsx 文件中所有 sheet。

参数:

  • file_path (string, 必填): xlsx 文件路径

xlsx_read

读取指定 sheet 的数据。

参数:

  • file_path (string, 必填): xlsx 文件路径
  • sheet (string|number, 必填): sheet 名称或索引 (从 0 开始)
  • format (string, 默认 "json"): "json" 返回对象数组, "array" 返回二维数组
  • range (string, 可选): 单元格范围,如 "A1:C10"

xlsx_create

从 JSON 数据创建新的 xlsx 文件。

参数:

  • file_path (string, 必填): 输出路径
  • data (string, 必填): JSON 数据字符串
  • sheet_name (string, 默认 "Sheet1"): sheet 名称
  • overwrite (boolean, 默认 false): 是否覆盖已有文件

xlsx_add_sheet

向已有 xlsx 文件添加新 sheet。

参数:

  • file_path (string, 必填): 已存在的 xlsx 文件路径
  • data (string, 必填): JSON 数据字符串
  • sheet_name (string, 必填): 新 sheet 名称

xlsx_update_cells

更新指定单元格。

参数:

  • file_path (string, 必填): xlsx 文件路径
  • sheet (string|number, 必填): sheet 名称或索引
  • cells (string, 必填): JSON 对象,如 {"A1": "值", "B2": 123}

本地开发

# 克隆仓库
git clone https://github.com/lubo3395/mcp-xlsx-server.git
cd mcp-xlsx-server

# 安装依赖
npm install

# 开发模式 (热重载)
npm run dev

# 构建
npm run build

# 运行
npm start

# MCP Inspector 测试
npx @modelcontextprotocol/inspector node dist/index.js

License

MIT