返回市场
MCP-演示文稿服务器

MCP-演示文稿服务器

作者:islem-zaraa5 星标更新:2025-03-22

项目介绍

MCP PowerPoint 插件

这是一个用于PowerPoint操作的Model Context Protocol (MCP)插件,允许AI助手通过编程方式创建和操作PowerPoint演示文稿。

功能

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

安装

# 克隆仓库
git clone https://github.com/islem-zaraa/mcp-powerpoint.git

# 导航到项目目录
cd mcp-powerpoint

# 安装依赖
npm install

# 链接到本地开发环境
npm link

命令行工具使用

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

# 创建一个新的演示文稿
mcp-powerpoint create --outputPath="presentation.pptx" --title="我的演示文稿"

# 向现有演示文稿添加幻灯片
mcp-powerpoint add-slide --file="presentation.pptx" --title="新幻灯片" --content="这是幻灯片的内容"

# 获取演示文稿中的幻灯片
mcp-powerpoint get-slides --file="presentation.pptx"

# 将演示文稿导出为PDF
m
mcp-powerpoint export-pdf --file="presentation.pptx" --outputPath="presentation.pdf"

# 读取演示文稿的元数据
mcp-powerpoint read --file="presentation.pptx"

作为MCP插件使用

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

const mcpPowerPointPlugin = require('mcp-powerpoint/src/mcp-plugin');

// 将插件注册到您的MCP系统
mcpSystem.registerPlugin(mcpPowerPointPlugin);

// 现在AI可以通过MCP协议使用PowerPoint功能
// 示例函数调用:
// - 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导出是一个模拟功能

许可证

MIT

贡献

欢迎贡献!请随意提交Pull Request。 ### 主题

  • mcp
  • model-context-protocol
  • mcp-server
  • powerpoint
  • presentation
  • slides
  • office