PowerPoint操作插件

一个用于PowerPoint操作的MCP插件,允许AI助手以编程方式创建和操作PowerPoint演示文稿。

  • by islem-zaraa
  • JavaScript
  • 本地部署
  • 5 星标
  • 更新于
在 GitHub 查看 islem-zaraa/mcp-powerpoint

使用说明

MCP PowerPoint插件

用于PowerPoint操作的模型上下文协议(MCP)插件,允许AI助手以编程方式创建和操纵PowerPoint演示文稿。

特性

  • 创建新的PowerPoint演示文稿
  • 在演示文稿中添加幻灯片
  • 从演示文稿中获取幻灯片信息
  • 将演示文稿导出为PDF
  • 读取演示文稿元数据和结构

安装

# 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

作为CLI使用

此插件可以直接用作命令行工具:

# 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插件使用

此插件可以集成到MCP兼容的AI辅助系统中:

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

功能说明

mcp_powerpoint_create_presentation

创建新的PowerPoint演示文稿。

参数:

  • outputPath:保存PowerPoint文件的路径(必须以.pptx结尾)
  • title:(可选)演示文稿的标题

mcp_powerpoint_add_slide

将幻灯片添加到现有PowerPoint演示文稿中。

参数:

  • file:PowerPoint文件的路径
  • title:(可选)幻灯片标题
  • content:(可选)幻灯片内容

mcp_powerpoint_get-slides

从PowerPoint演示文稿中获取幻灯片。

参数:

  • file:PowerPoint文件的路径

mcp_powerpoint_export_to_pdf

将PowerPoint演示文稿导出为PDF。

参数:

  • file:PowerPoint文件的路径
  • outputPath:保存PDF文件的路径(必须以.PDF结尾)

mcp_powerpoint_read_presentation

从PowerPoint演示文稿中读取元数据和结构。

参数:

  • file:PowerPoint文件的路径

局限性

  • 该插件目前提供基本的PowerPoint功能
  • 由于PPTX格式的复杂性,编辑现有幻灯片存在局限性
  • PDF导出是此版本中的模拟功能

许可证

麻省理工学院

贡献

欢迎投稿!请随时提交拉取请求。###主题

  • 主控程序
  • 模型上下文协议
  • mcp服务器
  • 幻灯片
  • 演示
  • 幻灯片
  • 办公室