PowerPoint MCP Server
PowerPoint 模型上下文协议 (MCP) 服务器
一个基于 Python 的模型上下文协议 (MCP) 服务器,提供使用 fastmcp 和 python-pptx 创建、检查和编辑 PowerPoint 演示文稿的工具。
前置条件
Windows 操作系统
Python 3.12(已安装在
C:\Users\Lumbini_User\AppData\Local\Programs\Python\Python312)本地虚拟环境
.venv,已安装所需依赖项。
Related MCP server: Office-PowerPoint-MCP
暴露的工具
服务器注册并运行以下工具:
create_presentation(path: str):在指定路径创建一个新的空白 PowerPoint 演示文稿。add_slide(path: str, layout_idx: int = 6):向path处的演示文稿添加一张新幻灯片,使用布局模板索引(例如6表示空白)。add_text(path, slide_idx, text, left_in, top_in, width_in, height_in, font_name, font_size_pt, bold, italic, color_hex, align):添加一个带有自定义格式文本的文本框。add_bullet_points(path, slide_idx, points, left_in, top_in, width_in, height_in, font_name, font_size_pt, color_hex):添加一个格式化的项目符号列表。add_shape(path, slide_idx, shape_type, left_in, top_in, width_in, height_in, fill_color_hex, line_color_hex, line_width_pt):插入几何形状,如矩形、椭圆、三角形等。add_picture(path, slide_idx, image_path, left_in, top_in, width_in, height_in):插入本地图片。add_table(path, slide_idx, rows, cols, left_in, top_in, width_in, height_in, data):插入并填充表格。get_presentation_info(path):返回所有幻灯片的详细结构、形状位置、文本和表格。search_replace_text(path, search_str, replace_str):在整个演示文稿中执行查找和替换,涉及文本框、形状和表格。delete_slide(path, slide_idx):删除指定索引处的幻灯片。
MCP 客户端配置
要向 MCP 主机(如 Claude Desktop 或 cursor)注册此服务器,请将以下条目添加到主机配置文件中:
{
"mcpServers": {
"powerpoint": {
"command": "c:\\Users\\Lumbini_User\\Desktop\\PPT\\.venv\\Scripts\\python.exe",
"args": [
"c:\\Users\\Lumbini_User\\Desktop\\PPT\\ppt_mcp_server.py"
],
"env": {}
}
}
}本地开发与测试
激活虚拟环境:
.venv\Scripts\Activate.ps1直接运行服务器:
python ppt_mcp_server.py
This server cannot be deployed
Maintenance
Related MCP Connectors
Generate, edit, merge, translate and PDF-convert PowerPoint (.pptx) over MCP. 8 tools.
Generate professional PowerPoint presentations from text, YouTube videos, or structured JSON data.…
Create professionally designed, editable PowerPoint presentations from a prompt.
Generate polished PowerPoint presentations from text prompts, YouTube videos, or structured outlin…
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables AI assistants to create, edit, and manipulate PowerPoint presentations programmatically with support for text styling, shapes, slide rearrangement, and direct Office XML access.81-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to programmatically create, manipulate, and analyze Microsoft PowerPoint presentations with advanced formatting and template management.5MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to create and manipulate PowerPoint presentations programmatically, including adding slides, exporting to PDF, and reading metadata.21 npm5MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to create, modify, and manage PowerPoint presentations programmatically using python-pptx.17-