π PPTX MCP Server
A Model Context Protocol (MCP) server that enables AI assistants to create, edit, and manipulate PowerPoint presentations programmatically.
β¨ Features
Full PowerPoint Control - Create, read, and modify
.pptxfiles without needing PowerPoint installedAI-Native Design - Built specifically for LLMs to generate and edit presentations through structured JSON
Rich Formatting Support - Text styling, colors, alignment, bullets, shapes, and backgrounds
Template Workflows - Extract content from existing presentations, modify, and regenerate
Visual Debugging - Generate thumbnail grids to preview slides programmatically
Office XML Access - Direct access to underlying OOXML for advanced customization
π Quick Start
1. Install
2. Configure Your MCP Client
Add to your MCP settings:
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Add to your MCP configuration:
Specify the full path to your Python interpreter:
Examples:
Conda:
/Users/username/miniconda3/bin/pythonvenv:
/path/to/project/.venv/bin/python
3. Restart Your MCP Client
Restart Claude Desktop, Cursor, or your MCP client to load the server.
π¦ Requirements
Python 3.10+
Dependencies (installed automatically):
mcp- Model Context Protocol SDKpython-pptx- PowerPoint file manipulationPillow- Image processinglxml- XML parsingdefusedxml- Secure XML parsing
Optional (for thumbnails)
π οΈ Available Tools
Tool | Description |
| Create new presentations from scratch |
| Extract text content with positions and formatting |
| Replace text using JSON specifications |
| Duplicate, delete, and reorder slides |
| Generate visual thumbnail grids |
| Extract Office files to editable XML |
| Rebuild Office files from XML |
| Validate document structure |
π Usage Examples
Create a New Presentation
Supported shape types:
textbox- Text contentrectangle- Rectangle (can contain text)rounded_rectangle- Rounded cornersoval- Circle/ellipseimage- Image file (usepathproperty)line- Line connector
Supported layouts: 16:9, 4:3, widescreen, standard
Extract Text Inventory
Get all text content from an existing presentation:
Returns structured JSON:
Replace Text Content
Modify text in an existing presentation:
Rearrange Slides
Reorder, duplicate, or remove slides:
0,2,2,1,3β Keep slide 0, duplicate slide 2, then slides 1 and 3Omit an index to delete that slide
Unpack/Pack for XML Editing
π§ Troubleshooting
Ensure you're using the correct Python environment:
Verify the config file path is correct for your OS
Ensure JSON syntax is valid (no trailing commas)
Restart the MCP client completely
Check logs for errors
Install LibreOffice and poppler:
Ensure the output paths are writable and parent directories exist.
π Project Structure
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/AmazingFeature)Commit your changes (
git commit -m 'Add some AmazingFeature')Push to the branch (
git push origin feature/AmazingFeature)Open a Pull Request
π Acknowledgments
Built with python-pptx
Uses the Model Context Protocol by Anthropic