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

@8btc/ppt-generator-mcp

v0.0.28

Published

MCP service for generating PPT files from AI-generated outlines and templates

Readme

MCP PPT Generator

一个基于 Model Context Protocol (MCP)的 PowerPoint 生成服务,可以根据大纲文件和模板自动生成 PPT 演示文稿。

功能特性

  • 📝 大纲解析: 支持 JSON 格式的大纲文件解析
  • 🎨 模板应用: 支持自定义 PPT 模板
  • 🔧 MCP 协议: 完全兼容 MCP 协议,可与支持 MCP 的 AI 助手集成
  • 📊 多种幻灯片类型: 支持封面页、目录页、过渡页、内容页等

安装

npm install
npm run build

使用方法

作为 MCP 服务运行

node dist/index.js

可用工具

1. generate_ppt

根据大纲文件和模板生成 PPT 文件

参数:

  • outlineFile (必需): 大纲文件路径(JSON 格式)
  • templateFile (可选): 模板文件路径
  • outputPath (可选): 输出 PPT 文件路径
  • title (可选): PPT 标题

大纲文件格式

大纲文件应为 JSON 格式,包含幻灯片数组:

[
  {
    "type": "cover",
    "title": "演示标题",
    "subtitle": "副标题"
  },
  {
    "type": "contents",
    "title": "目录",
    "items": ["第一章", "第二章", "第三章"]
  },
  {
    "type": "content",
    "title": "内容标题",
    "content": "幻灯片内容"
  }
]

支持的幻灯片类型

  • cover: 封面页
  • contents: 目录页
  • transition: 过渡页
  • content: 内容页
  • end: 结束页

模板格式

模板文件为 JSON 格式,定义 PPT 的主题样式:

{
  "title": "模板名称",
  "width": 1920,
  "height": 1080,
  "theme": {
    "colors": {
      "primary": "#1f4e79",
      "secondary": "#70ad47",
      "accent": "#ffc000"
    },
    "fonts": {
      "title": "Microsoft YaHei",
      "body": "Microsoft YaHei"
    }
  }
}

测试

运行测试脚本验证功能:

node test-gen-ppt.cjs

项目结构

mcp-ppt-generator/
├── src/
│   ├── index.ts          # MCP服务主入口
│   └── ppt-generator.ts  # PPT生成核心逻辑
├── dist/                 # 编译输出目录
├── package.json
├── tsconfig.json
└── README.md

依赖项

  • @modelcontextprotocol/sdk: MCP 协议 SDK
  • pptxgenjs: PowerPoint 文件生成库
  • fs-extra: 文件系统操作增强
  • uuid: 唯一标识符生成

todo

fix: 修复模板中 svg 元素的导出问题 svg2Base64

许可证

MIT License