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

word-generator-mcp

v1.0.0

Published

MCP server:根据 report_data 生成 Word 报告/简报,保存到当前工作目录(项目根)

Readme

word-generator-mcp

Word文档生成 MCP Server,实现以下目标:

  1. 读取并理解skills的规范
  2. 根据规范生成对应的Node.js脚本(不保存到本地)
  3. 执行Node.js脚本,生成对应的Word文档

功能

工具列表

| 工具名称 | 功能描述 | |---------|---------| | list_skills | 列出所有可用的skills(读取.kilocode/skills目录) | | read_skill | 读取指定skill的SKILL.md文件内容 | | generate_word_script | 根据skill规范生成Node.js Word生成脚本(返回脚本内容,不保存) | | generate_word_document | 根据skill规范和报告数据直接生成Word文档 |

Word格式规范

根据 .kilocode/skills/word-format-common/SKILL.md 规范:

  • 标题颜色:全部黑色(RGB 0,0,0)
  • 标题字体:全部黑体(Heiti/SimHei)
  • 主标题:居中,黑体,22pt
  • 一级标题:黑体,18pt
  • 二/三级标题:黑体,16pt
  • 正文字体:仿宋
  • 首行缩进:2字符
  • 观点标红:框架建议与观点性内容使用红色加粗

安装

cd scripts/word-generator-mcp
npm install

在MCP客户端中配置

方式一:npx(推荐)

{
  "word-generator": {
    "command": "npx",
    "args": ["-y", "file:./scripts/word-generator-mcp"],
    "alwaysAllow": ["*"]
  }
}

方式二:本地安装后直接运行

{
  "word-generator": {
    "command": "node",
    "args": ["scripts/word-generator-mcp/server.js"],
    "alwaysAllow": ["*"]
  }
}

使用示例

1. 列出所有skills

{
  "name": "list_skills",
  "arguments": {}
}

2. 读取指定skill

{
  "name": "read_skill",
  "arguments": {
    "skill_name": "word-format-common"
  }
}

3. 生成Word文档

{
  "name": "generate_word_document",
  "arguments": {
    "skill_name": "sentiment-writer",
    "report_data": {
      "title": "舆情分析报告",
      "opening": "本报告旨在分析...",
      "sections": [
        {
          "heading": "一、事件概述",
          "subsections": [
            {
              "heading": "(一)背景",
              "paragraphs": [
                { "text": "这是正文内容..." },
                { "text": "这是观点性内容(红色加粗)", "isViewPoint": true }
              ]
            }
          ]
        }
      ],
      "references": [
        "【1】来源链接..."
      ]
    }
  }
}

报告数据结构

interface ReportData {
  title: string;                    // 报告标题
  opening?: string;                 // 开篇段落
  sections: Section[];              // 各节内容
  references?: string[];            // 参考文献
}

interface Section {
  heading: string;                  // 一级标题(如:一、事件概述)
  subsections?: Subsection[];       // 二级内容
  paragraphs?: Paragraph[];         // 直接段落
}

interface Subsection {
  heading: string;                  // 二级标题(如:(一)背景)
  paragraphs: Paragraph[];          // 段落列表
}

interface Paragraph {
  text: string;                     // 段落文本
  isViewPoint?: boolean;            // 是否为观点性内容(红色加粗)
}

输出

  • 生成的Word文档保存在 word/ 目录
  • 文件名格式:{标题}_{时间戳}.docx

要求

  • Node.js >= 18

License

MIT