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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@zhaixiaowei/mcp-ppt-to-html

v1.0.0

Published

MCP server for converting PPT outlines to HTML presentations

Readme

PPT 转 HTML MCP 服务器

npm version License: MIT

一个模型上下文协议 (MCP) 服务器,为将 PowerPoint 演示文稿大纲转换为完整的 HTML 演示文稿提供结构化指导。完美适用于 Cursor、Claude Desktop 和其他兼容 MCP 的 AI 工具。

展示的核心 MCP 概念

此服务器展示了模型上下文协议的基本概念:

1. 服务器架构

  • 服务器实例: 处理客户端请求的主要 MCP 服务器
  • 传输层: 使用 StdioServerTransport 实现命令行兼容性
  • 能力: 向 MCP 客户端声明提供工具的能力

2. 工具系统

  • 工具定义: 基于 JSON Schema 的工具规范
  • 输入验证: 使用模式进行结构化参数验证
  • 响应格式化: 标准化的 MCP 响应格式

3. 通信协议

  • 请求处理器: 实现 ListToolsRequestSchemaCallToolRequestSchema
  • 错误处理: 正确的 MCP 错误响应格式化
  • 异步操作: 非阻塞工具执行

功能特性

  • 结构化转换流程: 通过系统性的 5 步流程指导 AI 模型
  • 全面指导: 为每个转换阶段提供详细指令
  • 灵活输入: 接受各种幻灯片布局和内容类型的 PPT 大纲
  • 响应式设计: 包含创建移动友好演示文稿的指导
  • 无障碍访问: 确保生成的 HTML 遵循无障碍访问最佳实践
  • 修订支持: 允许对之前步骤进行完善和改进

转换流程

服务器通过以下步骤进行指导:

  1. 分析 (ANALYZE) - 理解 PPT 结构和需求
  2. 构建 (STRUCTURE) - 创建 HTML 文档框架
  3. 样式 (STYLE) - 设计视觉呈现的 CSS
  4. 内容 (CONTENT) - 生成和格式化幻灯片内容
  5. 完善 (FINALIZE) - 完成、验证和优化

使用方法

工具: ppt_to_html_generator

通过结构化指导将 PPT 大纲转换为 HTML 演示文稿。

必需参数

  • outline: 包含标题和幻灯片的 PPT 大纲对象
  • generationStep: 当前步骤 (analyze/structure/style/content/finalize)
  • stepDescription: 当前工作的描述
  • nextStepNeeded: 是否需要更多步骤

可选参数

  • currentSlide: 当前正在处理的幻灯片
  • totalSlides: 幻灯片总数
  • isRevision: 是否正在修订之前的工作
  • revisesStep: 正在修订的步骤
  • customInstructions: 额外要求

示例输入

{
  "outline": {
    "title": "Web开发入门",
    "author": "张三",
    "theme": "现代简约",
    "slides": [
      {
        "slideNumber": 1,
        "title": "欢迎",
        "content": ["课程介绍", "学习目标", "前置知识"],
        "layout": "title"
      },
      {
        "slideNumber": 2,
        "title": "HTML基础",
        "content": ["什么是HTML?", "基本结构", "常用标签"],
        "notes": "重点强调语义化HTML",
        "layout": "content"
      }
    ]
  },
  "generationStep": "analyze",
  "stepDescription": "分析演示文稿结构并规划HTML转换方法",
  "nextStepNeeded": true
}

安装

使用 npm 全局安装

npm install -g @zhaixiaowei/mcp-ppt-to-html

使用 npx (推荐用于 Cursor)

npx @zhaixiaowei/mcp-ppt-to-html

本地项目安装

npm install @zhaixiaowei/mcp-ppt-to-html

配置

在 Cursor 中使用

要在 Cursor 中使用此 MCP 服务器,请将以下配置添加到你的 Cursor 的 MCP 配置文件中:

方法 1: 使用 npx (推荐)

{
  "mcpServers": {
    "ppt-to-html": {
      "command": "npx",
      "args": [
        "-y",
        "@zhaixiaowei/mcp-ppt-to-html"
      ]
    }
  }
}

方法 2: 使用全局安装

{
  "mcpServers": {
    "ppt-to-html": {
      "command": "@zhaixiaowei/mcp-ppt-to-html"
    }
  }
}

环境变量

设置环境变量:

  • DISABLE_PPT_LOGGING=true - 禁用步骤日志输出到 stderr

支持的幻灯片布局

  • title - 带主标题的标题幻灯片
  • content - 带要点列表的标准内容幻灯片
  • two-column - 双栏布局幻灯片
  • image-text - 图文组合幻灯片
  • conclusion - 结论/总结幻灯片

响应格式

服务器提供:

  • HTML 生成的分步指导
  • 每个转换阶段的具体指令
  • 转换过程的进度跟踪
  • 错误处理和验证
  • 迭代改进的修订功能

工作原理

  1. 分析阶段: 服务器分析你的 PPT 大纲结构和需求
  2. 构建阶段: 创建 HTML 文档框架和基本布局
  3. 样式阶段: 设计 CSS 样式和响应式布局
  4. 内容阶段: 生成和格式化具体的幻灯片内容
  5. 完善阶段: 完成、验证和优化最终演示文稿

最佳实践

  1. 从 'analyze' 步骤开始以了解范围
  2. 系统性地逐步推进
  3. 使用修订功能来完善工作
  4. 包含响应式设计考虑
  5. 始终关注无障碍访问
  6. 在完善步骤中验证和测试

使用场景

对于开发者

  • 将技术演示大纲转换为交互式 HTML 演示
  • 从结构化内容创建文档演示
  • 构建响应式演示网站

对于内容创作者

  • 将演示概念转换为网络就绪格式
  • 创建无障碍在线演示
  • 生成用于网络部署的 HTML 演示

对于教育工作者

  • 将课程大纲转换为交互式网络演示
  • 创建无障碍教育内容
  • 构建响应式学习材料

贡献

此服务器是模型上下文协议服务器集合的一部分。欢迎贡献!

许可证

MIT 许可证 - 详情请参阅 LICENSE 文件。

相关链接