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

sks-convert-file-mcp

v1.1.0

Published

文件格式转换 MCP 服务器

Readme

sks-convert-file-mcp

文件格式转换 MCP 服务器,支持 CSV、JSON、YAML、Markdown、HTML、XML、Excel 等多种格式之间的相互转换。

安装

# 全局安装
npm install -g sks-convert-file-mcp

# 或使用 npx 直接运行(无需安装)
npx sks-convert-file-mcp

MCP 客户端配置

在支持 MCP 的客户端(如 Claude Desktop、Cursor 等)中添加以下配置:

{
      "sks-convert-file-mcp": {
        "name": "文件格式转换 MCP",
        "description": "支持CSV、JSON、YAML、Markdown、HTML、XML、Excel等多种格式之间的相互转换",
        "command": "npx",
        "args": [
          "-y",
          "sks-convert-file-mcp"
        ],
        "env": {
          "npm_config_registry": "https://registry.npm.taobao.org"
        },
        "icon": "📄"
      }
}

支持的转换工具

文本格式转换

| 工具 | 功能 | 输入参数 | |------|------|----------| | csv_to_json | CSV → JSON | csv_content | | json_to_csv | JSON → CSV | json_content | | json_to_yaml | JSON → YAML | json_content | | yaml_to_json | YAML → JSON | yaml_content | | markdown_to_html | Markdown → HTML | markdown_content | | xml_to_json | XML → JSON | xml_content | | json_to_xml | JSON → XML | json_content |

Excel 转换

| 工具 | 功能 | 输入参数 | |------|------|----------| | excel_to_html | Excel → HTML 表格 | excel_base64 | | excel_to_markdown | Excel → Markdown 表格 | excel_base64 | | excel_to_json | Excel → JSON | excel_base64 | | excel_to_csv | Excel → CSV | excel_base64 |

Excel 工具接收 Base64 编码的文件内容,支持多 Sheet 转换。

命令行工具

项目附带独立的 CLI 工具,可直接转换本地 Excel 文件:

# 用法
node convert-cli.js <输入文件> <输出格式>

# 示例
node convert-cli.js "C:\path\to\file.xlsx" html
node convert-cli.js "C:\path\to\file.xlsx" markdown
node convert-cli.js "C:\path\to\file.xlsx" json
node convert-cli.js "C:\path\to\file.xlsx" csv

支持的输出格式:htmlmarkdown(输出 .md)、jsoncsv

输出文件保存在输入文件同目录下,文件名保持一致仅更换扩展名。

项目结构

sks-convert-file-mcp/
├── src/
│   ├── index.js          # MCP 服务器入口,注册所有工具
│   └── tools/
│       ├── excel.js      # Excel 转换核心模块(单一来源)
│       └── convert.js    # MCP 工具封装(处理 base64 解码与响应格式)
├── convert-cli.js        # 独立 CLI 工具(引用核心模块)
├── mcp-config.json       # MCP 客户端配置示例
└── package.json

架构说明

Excel 转换逻辑统一封装在 excel.js 核心模块中,MCP 工具和 CLI 工具共同引用,避免重复维护:

  • excel.js - 纯转换函数,接收 Buffer,返回字符串
  • convert.js - MCP 封装层,处理 Base64 解码和 MCP 响应格式
  • convert-cli.js - CLI 封装层,处理文件读写和命令行参数

技术栈

License

MIT