Office PowerPoint MCP
About
Create, edit, and manipulate PowerPoint presentations using python-pptx.
Details
- Author
- gongrzhe
- Categories
- Productivity, Other
Jump to
Option 1: Using the Setup Script (Recommended)
The easiest way to set up the PowerPoint MCP Server is using the provided setup script, which automates the installation process:
- Check prerequisites
- Offer installation options:
- Install from PyPI (recommended for most users)
- Set up local development environment
The script offers different paths based on your environment:
- If you haveuvxinstalled, it will configure using UVX (recommended)
- If the server is already installed, it provides configuration options
- If the server is not installed, it offers installation methods
git clone https://github.com/GongRzhe/Office-PowerPoint-MCP-Server.git cd Office-PowerPoint-MCP-Server
Run the streamable-http server on port 8000:
python ppt_mcp_server.py --transport http --port 8000
docker build -t ppt_mcp_server . docker run -d --rm -p 8000:8000 ppt_mcp_server -t http
Add the server to your MCP settings configuration file:
{ "mcpServers": { "ppt": { "command": "python", "args": ](https://smithery.ai/server/@GongRzhe/Office-PowerPoint-MCP-Server)["/path/to/ppt_mcp_server.py"], "env": {} } } }
Create, edit, and manipulate PowerPoint presentations using python-pptx.
A comprehensive MCP (Model Context Protocol) server for PowerPoint manipulation using python-pptx.Version 2.0provides 32 powerful tools organized into 11 specialized modules, offering complete PowerPoint creation, management, and professional design capabilities. The server features a modular architecture with enhanced parameter handling, intelligent operation selection, and comprehensive error handling.
Not so ugly anymore with new slide_layout_templates
Demo's GIF -> (./public/demo.mp4)
- Round-trip supportfor any Open XML presentation (.pptx file) including all elements
- Template supportwith automatic theme and layout preservation
- Multi-presentation managementwith global state tracking
- Core document propertiesmanagement (title, subject, author, keywords, comments)
- Slide managementwith flexible layout selection
- Text manipulationwith placeholder population and bullet point creation
- Advanced text formattingwith font, color, alignment, and style controls
- Text validationwith automatic fit checking and optimization suggestions
- Image handlingwith file and base64 input support
- Image enhancementusing Pillow with brightness, contrast, saturation, and filter controls
- Professional image effectsincluding shadows, reflections, glows, and soft edges
- Shape creationwith 20+ auto shape types (rectangles, ovals, flowchart elements, etc.)
- Table creationwith advanced cell formatting and styling
- Chart supportfor column, bar, line, and pie charts
- Data series managementwith categories and multiple series support
- Chart formattingwith legends, data labels, and titles
- 4 professional color schemes(Modern Blue, Corporate Gray, Elegant Green, Warm Red)
- Professional typographywith Segoe UI font family and size presets
- Theme applicationwith automatic styling across presentations
- Gradient backgroundswith customizable directions and color schemes
- Slide enhancementtools for existing content
- 25 built-in slide templateswith dynamic sizing and visual effects
- Advanced template featuresincluding auto-wrapping, dynamic font sizing, and professional animations
- Font analysis and optimizationusing FontTools
- Picture effectswith 9 different visual effects (shadow, reflection, glow, bevel, etc.)
- Comprehensive validationwith automatic error fixing
- Template searchwith configurable directory paths
- Professional layout calculationswith margin and spacing management
To install PowerPoint Manipulation Server for Claude Desktop automatically viaSmithery:
npx -y @smithery/cli install @GongRzhe/Office-PowerPoint-MCP-Server --client claude
- Python 3.6 or higher (as specified in pyproject.toml)
- pip package manager
- Optional: uvx for package execution without local installation
Option 1: Using the Setup Script (Recommended)
The easiest way to set up the PowerPoint MCP Server is using the provided setup script, which automates the installation process:
- Check prerequisites
- Offer installation options:
- Install from PyPI (recommended for most users)
- Set up local development environment
The script offers different paths based on your environment:
- If you haveuvxinstalled, it will configure using UVX (recommended)
- If the server is already installed, it provides configuration options
- If the server is not installed, it offers installation methods
git clone https://github.com/GongRzhe/Office-PowerPoint-MCP-Server.git cd Office-PowerPoint-MCP-Server
Run the streamable-http server on port 8000:
python ppt_mcp_server.py --transport http --port 8000
docker build -t ppt_mcp_server . docker run -d --rm -p 8000:8000 ppt_mcp_server -t http
Add the server to your MCP settings configuration file:
{ "mcpServers": { "ppt": { "command": "python", "args": ["/path/to/ppt_mcp_server.py"], "env": {} } } }
Option 2: Using UVX (No Local Installation Required)
If you haveuvxinstalled, you can run the server directly from PyPI without local installation:
{ "mcpServers": { "ppt": { "command": "uvx", "args": [ "--from", "office-powerpoint-mcp-server", "ppt_mcp_server" ], "env": {} } } }
- Complete PowerPoint manipulationwith 34 specialized tools
- 11 organized modulescovering all aspects of presentation creation
- Enhanced parameter handlingwith comprehensive validation
- Intelligent defaultsand operation-based interfaces
- 25+ professional slide templateswith dynamic features built-in
- Advanced template systemwith auto-generation capabilities
- Auto-sizing textthat adapts to content length and container size
- Professional visual effectsincluding shadows, glows, and gradients
- Complete presentation generationfrom template sequences
- 11 specialized modules: presentation, content, structural, professional, template, hyperlink, chart, connector, master, and transition tools
- Better maintainabilitywith separated concerns
- Easier extensibilityfor adding new features
- Cleaner code structurewith shared utilities
The server provides34 specialized toolsorganized into the following categories:
- create_presentation- Create new presentations
- create_presentation_from_template- Create from templates with theme preservation
- open_presentation- Open existing presentations
- save_presentation- Save presentations to files
- get_presentation_info- Get comprehensive presentation information
- get_template_file_info- Analyze template files and layouts
- set_core_properties- Set document properties
- add_slide- Add slides with optional background styling
- get_slide_info- Get detailed slide information
- extract_slide_text- ✨NEWExtract all text content from a specific slide
- extract_presentation_text- ✨NEWExtract text content from all slides in presentation
- populate_placeholder- Populate placeholders with text
- add_bullet_points- Add formatted bullet points
- manage_text- ✨Unified text tool(add/format/validate/format_runs)
- manage_image- ✨Unified image tool(add/enhance)
- list_slide_templates- Browse available slide layout templates
- apply_slide_template- Apply structured layout templates to existing slides
- create_slide_from_template- Create new slides using layout templates
- create_presentation_from_templates- Create complete presentations from template sequences
- get_template_info- Get detailed information about specific templates
- auto_generate_presentation- Automatically generate presentations based on topic
- optimize_slide_text- Optimize text elements for better readability and fit
- add_table- Create tables with enhanced formatting
- format_table_cell- Format individual table cells
- add_shape- Add shapes with text and formatting options
- add_chart- Create charts with comprehensive customization
- apply_professional_design- ✨Unified design tool(themes/slides/enhancement)
- apply_picture_effects- ✨Unified effects tool(9+ effects combined)
- manage_fonts- ✨Unified font tool(analyze/optimize/recommend)
- manage_hyperlinks- Complete hyperlink management (add/remove/list/update)
- manage_slide_masters- Access and manage slide master properties and layouts
- add_connector- Add connector lines/arrows between points on slides
- update_chart_data- Replace existing chart data with new categories and series
- manage_slide_transitions- Basic slide transition management
manage_text- All-in-One Text Management
# Add text box manage_text(slide_index=0, operation="add", text="Hello World", font_size=24) # Format existing text manage_text(slide_index=0, operation="format", shape_index=0, bold=True, color=[255,0,0]) # Validate text fit with auto-fix manage_text(slide_index=0, operation="validate", shape_index=0, validation_only=False)
# Add image with enhancement manage_image(slide_index=0, operation="add", image_source="logo.png", enhancement_style="presentation") # Enhance existing image manage_image(slide_index=0, operation="enhance", image_source="photo.jpg", brightness=1.2, contrast=1.1, saturation=1.3)
apply_picture_effects- Multiple Effects in One Call
# Apply combined effects apply_picture_effects(slide_index=0, shape_index=0, effects={ "shadow": {"blur_radius": 4.0, "color": [128,128,128]}, "glow": {"size": 5.0, "color": [0,176,240]}, "rotation": {"rotation": 15.0} })
apply_professional_design- Theme & Design Management
# Add professional slide apply_professional_design(operation="slide", slide_type="title_content", color_scheme="modern_blue", title="My Presentation") # Apply theme to entire presentation apply_professional_design(operation="theme", color_scheme="corporate_gray") # Enhance existing slide apply_professional_design(operation="enhance", slide_index=0, color_scheme="elegant_green")
# Create a new presentation result = use_mcp_tool( server_name="ppt", tool_name="create_presentation", arguments={} ) presentation_id = result["presentation_id"] # Add a title slide result = use_mcp_tool( server_name="ppt", tool_name="add_slide", arguments={ "layout_index": 0, # Title slide layout "title": "My Presentation", "presentation_id": presentation_id } ) slide_index = result["slide_index"] # Populate subtitle placeholder result = use_mcp_tool( server_name="ppt", tool_name="populate_placeholder", arguments={ "slide_index": slide_index, "placeholder_idx": 1, # Subtitle placeholder "text": "Created with PowerPoint MCP Server", "presentation_id": presentation_id } ) # Save the presentation result = use_mcp_tool( server_name="ppt", tool_name="save_presentation", arguments={ "file_path": "my_presentation.pptx", "presentation_id": presentation_id } )
Creating a Professional Presentation with v2.0
# Create a professional slide with modern styling - CONSOLIDATED TOOL result = use_mcp_tool( server_name="ppt", tool_name="apply_professional_design", arguments={ "operation": "slide", "slide_type": "title_content", "color_scheme": "modern_blue", "title": "Quarterly Business Review", "content": [ "Revenue increased by 15% compared to last quarter", "Customer satisfaction scores reached all-time high of 94%", "Successfully launched 3 new product features", "Expanded team by 12 new talented professionals" ] } ) # Apply professional theme to entire presentation - SAME TOOL, DIFFERENT OPERATION result = use_mcp_tool( server_name="ppt", tool_name="apply_professional_design", arguments={ "operation": "theme", "color_scheme": "modern_blue", "apply_to_existing": True } ) # Add slide with gradient background - ENHANCED ADD_SLIDE result = use_mcp_tool( server_name="ppt", tool_name="add_slide", arguments={ "layout_index": 0, "background_type": "professional_gradient", "color_scheme": "modern_blue", "gradient_direction": "diagonal" } )
Working with Built-in Slide Templates (New in v2.0)
# List all available slide templates with their features result = use_mcp_tool( server_name="ppt", tool_name="list_slide_templates", arguments={} ) # Apply a professional template to an existing slide result = use_mcp_tool( server_name="ppt", tool_name="apply_slide_template", arguments={ "slide_index": 0, "template_id": "title_slide", "color_scheme": "modern_blue", "content_mapping": { "title": "Quarterly Business Review", "subtitle": "Q4 2024 Results", "author": "Leadership Team" } } ) # Create a new slide using a template result = use_mcp_tool( server_name="ppt", tool_name="create_slide_from_template", arguments={ "template_id": "text_with_image", "color_scheme": "elegant_green", "content_mapping": { "title": "Our Revolutionary Solution", "content": "• 250% increase in efficiency\n• 98% customer satisfaction\n• Industry-leading performance" }, "image_paths": { "supporting": "path/to/product_image.jpg" } } ) # Generate a complete presentation from multiple templates result = use_mcp_tool( server_name="ppt", tool_name="create_presentation_from_templates", arguments={ "template_sequence": [ { "template_id": "title_slide", "content": { "title": "2024 Annual Report", "subtitle": "Growth and Innovation", "author": "Executive Team" } }, { "template_id": "key_metrics_dashboard", "content": { "metric_1_value": "94%", "metric_2_value": "$2.4M", "metric_3_value": "247" } }, { "template_id": "before_after_comparison", "content": { "content_left": "Manual processes taking hours", "content_right": "Automated workflows in minutes" } } ], "color_scheme": "modern_blue" } )
# Add image with automatic enhancement - CONSOLIDATED TOOL result = use_mcp_tool( server_name="ppt", tool_name="manage_image", arguments={ "slide_index": 1, "operation": "add", "image_source": "company_logo.png", "left": 1.0, "top": 1.0, "width": 3.0, "height": 2.0, "enhancement_style": "presentation" } ) # Apply multiple picture effects at once - CONSOLIDATED TOOL result = use_mcp_tool( server_name="ppt", tool_name="apply_picture_effects", arguments={ "slide_index": 1, "shape_index": 0, "effects": { "shadow": { "shadow_type": "outer", "blur_radius": 4.0, "distance": 3.0, "direction": 315.0, "color": [128, 128, 128], "transparency": 0.6 }, "glow": { "size": 5.0, "color": [0, 176, 240], "transparency": 0.4 } } } )
# Add and format text in one operation - CONSOLIDATED TOOL result = use_mcp_tool( server_name="ppt", tool_name="manage_text", arguments={ "slide_index": 0, "operation": "add", "left": 1.0, "top": 2.0, "width": 8.0, "height": 1.5, "text": "Welcome to Our Quarterly Review", "font_size": 32, "font_name": "Segoe UI", "bold": True, "color": [0, 120, 215], "alignment": "center", "auto_fit": True } ) # Validate and fix text fit issues - SAME TOOL, DIFFERENT OPERATION result = use_mcp_tool( server_name="ppt", tool_name="manage_text", arguments={ "slide_index": 0, "operation": "validate", "shape_index": 0, "validation_only": False, # Auto-fix enabled "min_font_size": 10, "max_font_size": 48 } )
# First, inspect a template to see its layouts and properties result = use_mcp_tool( server_name="ppt", tool_name="get_template_info", arguments={ "template_path": "company_template.pptx" } ) template_info = result # Create a new presentation from the template result = use_mcp_tool( server_name="ppt", tool_name="create_presentation_from_template", arguments={ "template_path": "company_template.pptx" } ) presentation_id = result["presentation_id"] # Add a slide using one of the template's layouts result = use_mcp_tool( server_name="ppt", tool_name="add_slide", arguments={ "layout_index": 1, # Use layout from template "title": "Quarterly Report", "presentation_id": presentation_id } ) # Save the presentation result = use_mcp_tool( server_name="ppt", tool_name="save_presentation", arguments={ "file_path": "quarterly_report.pptx", "presentation_id": presentation_id } )
Adding Advanced Charts and Data Visualization
# Add a chart slide result = use_mcp_tool( server_name="ppt", tool_name="add_slide", arguments={ "layout_index": 1, # Content slide layout "title": "Sales Data", "presentation_id": presentation_id } ) slide_index = result["slide_index"] # Add a column chart with comprehensive customization result = use_mcp_tool( server_name="ppt", tool_name="add_chart", arguments={ "slide_index": slide_index, "chart_type": "column", "left": 1.0, "top": 2.0, "width": 8.0, "height": 4.5, "categories": ["Q1", "Q2", "Q3", "Q4"], "series_names": ["2023", "2024"], "series_values": [ [100, 120, 140, 160], [110, 130, 150, 170] ], "has_legend": True, "legend_position": "bottom", "has_data_labels": True, "title": "Quarterly Sales Performance", "presentation_id": presentation_id } )
Text Validation and Optimization with v2.0
# Validate text fit and get optimization suggestions - USING CONSOLIDATED TOOL result = use_mcp_tool( server_name="ppt", tool_name="manage_text", arguments={ "slide_index": 0, "operation": "validate", "shape_index": 0, "text": "This is a very long title that might not fit properly in the designated text box area", "font_size": 24, "validation_only": True } ) # Comprehensive slide validation with automatic fixes - SAME TOOL, AUTO-FIX ENABLED result = use_mcp_tool( server_name="ppt", tool_name="manage_text", arguments={ "slide_index": 0, "operation": "validate", "shape_index": 0, "validation_only": False, # Auto-fix enabled "min_font_size": 10, "max_font_size": 48 } )
Reading Slide Content with New Text Extraction Tools (v2.1)
# Extract text content from a specific slide - NEW TOOL result = use_mcp_tool( server_name="ppt", tool_name="extract_slide_text", arguments={ "slide_index": 0, "presentation_id": presentation_id } ) # The result includes: { "success": True, "slide_index": 0, "text_content": { "slide_title": "Quarterly Business Review", "placeholders": [ { "shape_index": 1, "shape_name": "Subtitle Placeholder 2", "text": "Q4 2024 Results", "placeholder_type": "SUBTITLE", "placeholder_idx": 1 } ], "text_shapes": [ { "shape_index": 3, "shape_name": "TextBox 4", "text": "Revenue increased by 15%" } ], "table_text": [], "all_text_combined": "Quarterly Business Review\nQ4 2024 Results\nRevenue increased by 15%" }, "total_text_shapes": 2, "has_title": True, "has_tables": False } # Extract text from all slides in the presentation - NEW TOOL result = use_mcp_tool( server_name="ppt", tool_name="extract_presentation_text", arguments={ "presentation_id": presentation_id, "include_slide_info": True } ) # The result includes comprehensive text extraction: { "success": True, "presentation_id": "pres_123", "total_slides": 5, "slides_with_text": 4, "total_text_shapes": 12, "slides_with_titles": 3, "slides_with_tables": 1, "slides_text": [...], # Detailed per-slide text content "all_presentation_text_combined": "=== SLIDE 1 ===\nTitle Here\nContent here..." } # Extract text without additional slide metadata for cleaner output result = use_mcp_tool( server_name="ppt", tool_name="extract_presentation_text", arguments={ "presentation_id": presentation_id, "include_slide_info": False } )
The PowerPoint MCP Server provides comprehensive template support for creating presentations from existing template files. This feature enables:
- Corporate brandingwith predefined themes, layouts, and styles
- Consistent presentationsacross teams and projects
- Custom slide mastersand specialized layouts
- Pre-configured propertiesand document settings
- Flexible template discoverywith configurable search paths
- Supported formats:.pptxand.potxfiles
- Existing content: Templates can contain existing slides (preserved during creation)
- Layout availability: All custom layouts and slide masters are accessible
- Search locations: Configurable viaPPT_TEMPLATE_PATHenvironment variable
- Default search paths: Current directory,./templates,./assets,./resources
Set thePPT_TEMPLATE_PATHenvironment variable to specify custom template directories:
# Unix/Linux/macOS export PPT_TEMPLATE_PATH="/path/to/templates:/another/path" # Windows set PPT_TEMPLATE_PATH="C:\templates;C:\company_templates"
- Inspect Template: Useget_template_infoto analyze available layouts and properties
- Create from Template: Usecreate_presentation_from_templatewith automatic theme preservation
- Use Template Layouts: Reference layout indices from template analysis when adding slides
- Maintain Branding: Template themes, fonts, and colors are automatically applied to new content
The server includes 4 built-in professional color schemes:
- Modern Blue: Microsoft-inspired blue theme with complementary colors
- Corporate Gray: Professional grayscale theme with blue accents
- Elegant Green: Forest green theme with cream and light green accents
- Warm Red: Deep red theme with orange and yellow accents
Each scheme includes primary, secondary, accent, light, and text colors optimized for business presentations.
🎨 Built-in Slide Templates (New in v2.0)
The PowerPoint MCP Server now includes25 professional slide templateswith advanced dynamic features. All templates support:
- Automatic text sizingbased on content length and container dimensions
- Intelligent text wrappingto fit within specified areas
- Visual effectsincluding shadows, glows, and outlines
- Gradient backgroundswith multi-layer compositions
- Professional animationsready for presentation delivery
- Interactive hover effectsfor enhanced user experience
- Smart content overflow handlingwith automatic adjustments
- title_slide- Dynamic title slide with gradient background and text effects
- chapter_intro- Section divider with chapter numbering and styling
- thank_you_slide- Closing slide with contact information and effects
- text_with_image- Text content with stylized image and interactive elements
- two_column_text- Two equal columns of text with dynamic sizing
- two_column_text_images- Two columns with text and corresponding images
- three_column_layout- Three equal columns with text and images
- full_image_slide- Large background image with text overlay
- key_metrics_dashboard- Interactive metrics dashboard with animated counters
- before_after_comparison- Dynamic comparison layout with visual dividers
- chart_comparison- Two charts side by side for performance comparison
- data_table_slide- Slide focused on tabular data with professional styling
- timeline_slide- Horizontal timeline with milestones and effects
- process_flow- Step-by-step process visualization with enhanced effects
- agenda_slide- Table of contents or agenda overview with styling
- quote_testimonial- Featured quote or customer testimonial with effects
- team_introduction- Team member showcase with photos and roles
# Browse all available templates templates = use_mcp_tool("ppt", "list_slide_templates", {}) # Key templates with their features: { "title_slide": { "features": ["Dynamic text sizing", "Gradient backgrounds", "Text effects"], "elements": ["title", "subtitle", "author", "decorative_accent"] }, "key_metrics_dashboard": { "features": ["Animated counters", "Gradient containers", "Trend visualization"], "elements": ["3 metric containers", "trend chart", "insights callout"] }, "before_after_comparison": { "features": ["Split gradient background", "VS divider", "Improvement arrow"], "elements": ["before/after headers", "comparison content", "improvement metrics"] } }
All templates work seamlessly with the 4 professional color schemes:
- modern_blue: Microsoft-inspired theme with dynamic gradients
- corporate_gray: Professional grayscale with blue accents
- elegant_green: Forest green with cream and light accents
- warm_red: Deep red with orange and yellow highlights
Templates automatically adjust to content:
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




