Office-PowerPoint-MCP-Server is a Model Context Protocol (MCP)-based server tool designed for creating, editing, and managing PowerPoint presentations through the python-pptx library. It allows users to manipulate PowerPoint directly through AI assistants such as Claude or Cursor to create slides, add content, apply themes and more. Project provides 25 kinds of professional slide templates , support dynamic text adjustment , gradient background and interactive effects and other functions , suitable for users who need to quickly generate high-quality presentations . The project is open source , the code is hosted on GitHub , easy to install , support for local and cloud operation .
Function List
- Create and save PowerPoint presentations that support multiple file formats.
- Add multiple types of slides such as title pages, content pages, data dashboards, etc.
- Apply 25 professional slide templates with dynamic text adjustments and gradient backgrounds.
- Supports insertion of text boxes, tables, charts, pictures and shapes with automatic layout adjustment.
- Available in 4 professional color schemes: Modern Blue, Business Gray, Elegant Green, and Warm Red.
- Support for animation effects, transition effects and interactive hover effects.
- Manage the structure and content of presentations with 32 tools and 11 modules.
- Automatically validate text and layout to ensure content meets professional standards.
Using Help
Installation process
Office-PowerPoint-MCP-Server provides easy way to install and run. The following are the detailed steps:
- Clone Code Repository
Run the following command in the terminal to download the project code:git clone https://github.com/GongRzhe/Office-PowerPoint-MCP-Server.git cd Office-PowerPoint-MCP-Server
- Installation of dependencies
Use Python's pip to install the required dependencies:pip install -r requirements.txt
Alternatively, use the provided
setup_mcp.py
The script completes the installation automatically:python setup_mcp.py
- Configuring the MCP Server
Edit the configuration file of an MCP client, such as Claude Desktop or Cursor, to add server information. The global configuration can be edited~/.cursor/mcp.json
::{ "mcpServers": { "ppt": { "command": "python", "args": ["/path/to/ppt_mcp_server.py"], "env": {} } } }
If you use the uvx package manager, you can run it directly without local installation:
{ "mcpServers": { "ppt": { "command": "uvx", "args": ["--from", "office-powerpoint-mcp-server", "ppt_mcp_server"], "env": {} } } }
- Start the server
Run the following command to start the server:python ppt_mcp_server.py
After startup, the server interacts with the AI assistant via the MCP protocol.
Main Functions
Below is the detailed operation flow of the main functions:
- Creating a New Presentation
Use the MCP tool to create a new presentation:result = use_mcp_tool(server_name="ppt", tool_name="create_presentation", arguments={}) presentation_id = result["presentation_id"]
This generates a new PowerPoint file and returns the unique identifier
presentation_id
The - Add Title Slide
Add a title slide and set the title and subtitle:result = use_mcp_tool( server_name="ppt", tool_name="add_slide", arguments={ "layout_index": 0, # 标题幻灯片布局 "title": "我的演示文稿", "presentation_id": presentation_id } ) slide_index = result["slide_index"] result = use_mcp_tool( server_name="ppt", tool_name="populate_placeholder", arguments={ "slide_index": slide_index, "placeholder_idx": 1, # 副标题占位符 "text": "由 PowerPoint MCP 服务器创建", "presentation_id": presentation_id } )
- Applied Professional Design
Apply professional color schemes and themes to slides or entire presentations:result = use_mcp_tool( server_name="ppt", tool_name="apply_professional_design", arguments={ "operation": "slide", "slide_type": "title_content", "color_scheme": "modern_blue", "title": "季度业务回顾", "content": [ "收入比上季度增长 15%", "客户满意度达到 94% 的历史新高", "成功推出 3 项新产品功能", "团队新增 12 名优秀员工" ] } )
Supported color schemes include
modern_blue
,corporate_gray
,elegant_green
cap (a poem)warm_red
The - Inserting Charts and Tables
Add slides with charts:result = use_mcp_tool( server_name="ppt", tool_name="add_slide_title_with_chart", arguments={ "presentation_name": presentation_id, "title": "销售趋势", "data": { "labels": ["Q1", "Q2", "Q3", "Q4"], "values": [100, 120, 150, 180] } } )
- Saving a Presentation
Save the presentation as a file:result = use_mcp_tool( server_name="ppt", tool_name="save_presentation", arguments={ "file_path": "my_presentation.pptx", "presentation_id": presentation_id } )
- View available templates
List of all 25 professional slideshow templates:templates = use_mcp_tool(server_name="ppt", tool_name="list_slide_templates", arguments={})
Featured Function Operation
- Dynamic Text Adjustment: The template supports automatic text size and layout adjustment based on content length. For example, the title slide will automatically adjust the font size based on the input text.
- interactive effect: Support interactive effects on mouse hover, such as highlighting or animation triggering, suitable for interactive presentations.
- Professional Color Matching: Provides 4 color schemes, each containing primary, secondary and text colors to optimize the visual effect.
- Modular tools: The program consists of 11 modules (e.g.
chart_tools.py
,transition_tools.py
The program includes 32 tools that cover every aspect of presentation creation.
caveat
- Ensure that the Python environment has the
python-pptx
Coop. - When manipulating files, check the file path permissions to avoid permission errors.
- When using Claude Desktop or Cursor, the client needs to be restarted to apply the MCP configuration.
application scenario
- business report
Business users can quickly generate quarterly business reports, add charts and tables to present data, and use professional color schemes to enhance presentations. - Education and training
Teachers can create instructional presentations and insert dynamic charts and interactive content to capture students' attention. - Conference Showcase
Event organizers can use the templates to quickly create conference slides, adding animations and transitions to enhance the audience experience. - Data Analysis Presentation
Data analysts can generate presentations that include charts and trendlines to visually present analysis results.
QA
- How to install Office-PowerPoint-MCP-Server?
Clone the GitHub repository, runpip install -r requirements.txt
or usesetup_mcp.py
Scripts are installed automatically. - What AI assistants are supported?
Support for MCP clients such as Claude Desktop, Cursor, etc., requires configuration.mcp.json
Documentation. - How to choose a slide template?
utilizationlist_slide_templates
tool to see all the templates, and then through theadd_slide
The tool specifies the template type. - Does it support custom color matching?
Currently provides 4 professional color schemes, does not support full customization, but you can modify the color parameters through the code.