
MCP PowerPoint Plugin

2025.03.22
4
JavaScriptPowerPoint 操作演示文稿自动化内容生成内容生成
MCP PowerPoint Plugin 是一个基于 Model Context Protocol (MCP) 的插件,用于通过编程方式创建和操作 PowerPoint 演示文稿。它允许 AI 助手自动化生成和修改演示文稿,支持创建新演示文稿、添加幻灯片、读取幻灯片信息、导出为 PDF 等功能。
View on GitHub
Overview
基本能力
产品定位
MCP PowerPoint Plugin 是一个用于自动化 PowerPoint 演示文稿创建和操作的 MCP 插件,适用于需要批量生成或修改演示文稿的场景。
核心功能
- 创建新的 PowerPoint 演示文稿
- 向演示文稿中添加幻灯片
- 从演示文稿中获取幻灯片信息
- 将演示文稿导出为 PDF
- 读取演示文稿的元数据和结构
适用场景
- AI 助手自动化生成演示文稿
- 批量创建或修改演示文稿
- 将演示文稿转换为 PDF 格式
工具列表
mcp_powerpoint_create_presentation
: 创建新的 PowerPoint 演示文稿mcp_powerpoint_add_slide
: 向现有演示文稿添加幻灯片mcp_powerpoint_get_slides
: 从演示文稿中获取幻灯片信息mcp_powerpoint_export_to_pdf
: 将演示文稿导出为 PDFmcp_powerpoint_read_presentation
: 读取演示文稿的元数据和结构
常见问题解答
- Q: 是否可以编辑现有幻灯片的内容? A: 当前版本对编辑现有幻灯片的功能有限制,主要由于 PPTX 格式的复杂性。
- Q: PDF 导出功能是否完全支持? A: 当前版本的 PDF 导出是一个模拟功能,可能存在一些限制。
使用教程
使用依赖
安装前需要确保已安装 Node.js 和 npm。
安装教程
# Clone the repository
git clone https://github.com/islem-zaraa/mcp-powerpoint.git
# Navigate to the project directory
cd mcp-powerpoint
# Install dependencies
npm install
# Link for local development
npm link
调试方式
安装完成后,可以通过以下命令进行基本调试:
# Create a new presentation
mcp-powerpoint create --outputPath="presentation.pptx" --title="My Presentation"
# Add a slide to an existing presentation
mcp-powerpoint add-slide --file="presentation.pptx" --title="New Slide" --content="This is the content of the slide"
# Get slides from a presentation
mcp-powerpoint get-slides --file="presentation.pptx"
# Export presentation to PDF
mcp-powerpoint export-pdf --file="presentation.pptx" --outputPath="presentation.pdf"
# Read presentation metadata
mcp-powerpoint read --file="presentation.pptx"
集成到 MCP 系统
const mcpPowerPointPlugin = require('mcp-powerpoint/src/mcp-plugin');
// Register the plugin with your MCP system
mcpSystem.registerPlugin(mcpPowerPointPlugin);
// Now the AI can use the PowerPoint functions through the MCP protocol
// Example function calls:
// - mcp_powerpoint_create_presentation
// - mcp_powerpoint_add_slide
// - mcp_powerpoint_get_slides
// - mcp_powerpoint_export_to_pdf
// - mcp_powerpoint_read_presentation