PowerPoint AI幻灯片编辑器
# 翻译 一个服务器使AI助手能够创建和编辑PowerPoint演示文稿,具备添加各种幻灯片类型、表格、图表以及通过Stable Diffusion生成的图像的功能。
服务介绍
Powerpoint MCP 服务器
一个创建 PowerPoint 演示文稿的MCP服务器项目
此分支的主要变更
使用Stable Diffusion (ForgeUI/Automatic-1111) API替代了together ai。
组件
工具
该服务器实现了多个工具:
create-presentation: 开始一个演示文稿- 需要 "name" 作为必需的字符串参数
- 创建一个演示文稿对象
add-slide-title-only: 向演示文稿中添加仅含标题的幻灯片- 需要 "presentation_name" 和 "title" 作为必需的字符串参数
- 使用 "title" 创建一个标题幻灯片并将其添加到演示文稿中
add-slide-section-header: 向演示文稿中添加节标题幻灯片- 需要 "presentation_name" 和 "header" 作为必需的字符串参数
- 使用 "header"(可选地包含 "subtitle")创建一个节标题幻灯片并将其添加到演示文稿中
add-slide-title-content: 向演示文稿中添加带有内容的标题幻灯片- 需要 "presentation_name", "title", "content" 作为必需的字符串参数
- 使用 "title" 和 "content" 创建一个带有内容的标题幻灯片并将其添加到演示文稿中
add-slide-title-with-table: 向演示文稿中添加带有表格的标题幻灯片- 需要 "presentation_name", "title", "data" 作为必需的字符串和数组参数
- 使用 "title" 创建一个标题幻灯片,并根据数据动态构建一个表格添加进去
add-slide-title-with-chart: 向演示文稿中添加带有图表的标题幻灯片- 需要 "presentation_name", "title", "data" 作为必需的字符串和对象参数
- 使用 "title" 创建一个标题幻灯片,并根据数据动态构建一个图表。尝试从数据源中确定最佳类型的图表。
add-slide-picture-with-caption: 向演示文稿中添加带有说明文字的图片幻灯片- 需要 "presentation_name", "title", "caption", "image_path" 作为必需的字符串参数
- 使用提供的 "title", "caption", 和 "image_path" 创建一个带有说明文字的图片幻灯片。可以使用通过 "generate-and-save-image" 工具生成的图片,或者用户提供的 "image_path"(图片必须存在于 folder_path 中)
open-presentation: 打开演示文稿进行编辑- 需要 "presentation_name" 作为必需参数
- 打开指定的演示文稿,并自动保存其备份为 "backup.pptx"
- 此工具允许客户端处理现有的 pptx 文件并向其中添加幻灯片。只需确保客户端在最后调用 "save-presentation" 工具即可。
save-presentation: 将演示文稿保存到文件- 需要 "presentation_name" 作为必需参数
- 将演示文稿保存到 folder_path。客户端必须调用此工具以完成整个过程。
generate-and-save-image: 使用 T2I 模型为演示文稿生成图像- 需要 "prompt" 和 "file_name" 作为必需的字符串参数
- 使用稳定扩散 API (ForgeUI/Automatic1111) 创建图像
配置
需要环境变量来通过 ForgeUI API 生成图像
"env":
{
"SD_WEBUI_URL": "http://your-sd-webui-url:7860",
"SD_AUTH_USER": "your-username", // Optional: if authentication is enabled
"SD_AUTH_PASS": "your-password", // Optional: if authentication is enabled
}
需要一个 folder_path。所有演示文稿和图像都将保存在这个文件夹中。
"--folder-path",
"/path/to/decks_folder"
快速开始
安装
确保已安装 UV
MacOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
克隆仓库
git clone https://github.com/Ichigo3766/powerpoint-mcp.git
Claude Desktop(适用于任何mcp客户端)
在MacOS上: ~/Library/Application\ Support/Claude/claude_desktop_config.json
在Windows上: %APPDATA%/Claude/claude_desktop_config.json
--directory: 你克隆上述仓库的路径(例如:/full/path/to/powerpoint-mcp/src)--folder-path: 保存PowerPoint演示文稿和图片的路径。也是你应该放置任何希望MCP服务器使用的图片的路径。
# Add the server to your claude_desktop_config.json
"mcpServers": {
"powerpoint": {
"command": "uv",
"env": {
"SD_WEBUI_URL": "http://your-sd-webui-url:7860",
"SD_AUTH_USER": "your-username", // Optional: if authentication is enabled
"SD_AUTH_PASS": "your-password", // Optional: if authentication is enabled
},
"args": [
"--directory",
"/path/to/powerpoint",
"run",
"powerpoint",
"--folder-path",
"/path/to/decks_folder"
]
}
}
使用示例
Create a presentation about fish, create some images and include tables and charts
Create a presentation about the attached paper. Please use the following images in the presentation:
author.jpeg
假设你已经安装了SQLite MCP Server。
Review 2024 Sales Data table. Create a presentation showing current trends, use tables and charts as appropriate
致谢
本项目是supercurses的powerpoint的一个分支,并添加了一些额外的功能和修改。原项目为这个MCP服务器提供了基础。
许可证
此MCP服务器采用MIT许可证发布。这意味着你可以自由使用、修改和分发该软件,但需遵守MIT许可证的条款和条件。更多详情,请参阅项目仓库中的LICENSE文件。