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

excel-parser-mcp

v1.0.7

Published

MCP server for parsing Excel documents and extracting test case data

Readme

Excel Parser MCP Server

一个基于TypeScript实现的MCP(Model Context Protocol)服务器,专门用于解析Excel文档并提取测试用例数据。

功能特性

  • 🔍 智能多工作表检测 - 自动检测多工作表情况并提供用户选择
  • 📊 完整数据保留 - 保留原始表头和数据结构
  • 🛡️ 安全验证 - 文件大小、完整性和恶意内容检测
  • 🎯 类型安全 - 完全用TypeScript编写,提供完整类型支持
  • 🔄 多格式支持 - 支持.xlsx和.xls格式

支持的MCP工具

1. parse-excel - 主解析工具

智能解析Excel文档,自动处理多工作表情况。

输入参数:

  • fileContent (string) - Base64编码的Excel文件内容
  • filename (可选) - 原始文件名
  • options (可选) - 解析选项
    • sheetName - 指定工作表名称
    • sheetIndex - 指定工作表索引
    • parseAllSheets - 解析所有工作表
    • headerRow - 表头行索引

2. preview-excel-sheets - 预览工具

预览所有工作表的基本信息。

输入参数:

  • fileContent (string) - Base64编码的文件内容
  • includeDataSample (可选) - 是否包含数据样例

3. validate-excel-file - 验证工具

验证上传的文件是否为有效的Excel文件。

输入参数:

  • fileContent (string) - Base64编码的文件内容
  • filename (可选) - 原始文件名

安装

npm install @shinho-sh/excel-parser-mcp --registry http://10.211.62.41:4873

使用方法

在编辑器中使用

本包提供了MCP(Model Context Protocol)服务器,可以在支持MCP的编辑器和开发环境中使用。

VS Code中配置

在VS Code的设置中添加MCP服务器配置,或通过相关扩展进行配置。

配置MCP

由于包部署在私有仓库,需要先配置npm使用私有仓库,然后在Claude Code配置文件中添加:

方式1:直接在npx中指定registry(推荐)

{
  "mcpServers": {
    "excel-parser": {
      "command": "npx",
      "args": ["--registry=http://10.211.62.41:4873/", "@shinho-sh/excel-parser-mcp"]
    }
  }
}

方式2:预先配置私有仓库

# 为该组织配置私有仓库
npm config set @shinho-sh:registry http://10.211.62.41:4873/

然后在Claude Code配置文件中添加:

{
  "mcpServers": {
    "excel-parser": {
      "command": "npx",
      "args": ["@shinho-sh/excel-parser-mcp"]
    }
  }
}

使用示例

配置完成后,可以直接在编辑器中使用以下MCP工具:

  • parse-excel - 解析Excel文档
  • preview-excel-sheets - 预览工作表信息
  • validate-excel-file - 验证Excel文件

输出格式

单工作表解析结果

{
  "headers": ["用例ID", "测试场景", "前置条件", "操作步骤", "预期结果"],
  "data": [
    {
      "用例ID": "TC001",
      "测试场景": "用户登录验证",
      "前置条件": "用户已注册",
      "操作步骤": "输入用户名密码点击登录",
      "预期结果": "登录成功"
    }
  ],
  "metadata": {
    "total_rows": 1,
    "sheet_name": "Sheet1",
    "parsing_time_ms": 125,
    "file_size": 15360
  }
}

多工作表检测响应

{
  "type": "multi_sheet_detected",
  "message": "检测到多个工作表,请选择处理方式",
  "sheet_info": [
    {
      "index": 0,
      "name": "测试用例",
      "row_count": 150,
      "has_data": true,
      "headers_preview": ["用例ID", "测试场景", "前置条件"]
    }
  ],
  "recommendation": "推荐使用工作表: 测试用例(数据量最大)",
  "next_actions": {
    "选择特定工作表": {
      "example": { "options": { "sheetName": "测试用例" } }
    }
  }
}

## 开发

```bash
# 安装依赖
npm install

# 开发模式运行
npm run dev

# 构建
npm run build

# 运行测试
npx @modelcontextprotocol/inspector node dist/index.js

# 代码检查
npm run lint

许可证

MIT License