PPTX MCP Server

PPTX MCP Server

Enables AI assistants to create, edit, and manipulate PowerPoint presentations programmatically with support for text styling, shapes, slide rearrangement, and direct Office XML access.

Category
Visit Server

README

šŸ“Š 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 .pptx files without needing PowerPoint installed
  • AI-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

# Clone the repository
git clone https://github.com/YOUR_USERNAME/pptx-mcp-server.git
cd pptx-mcp-server

# Install the package
pip install -e .

2. Configure Your MCP Client

Add to your MCP settings:

<details> <summary><b>Claude Desktop</b></summary>

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "pptx": {
      "command": "python",
      "args": ["-m", "pptx_mcp_server"]
    }
  }
}

</details>

<details> <summary><b>Cursor</b></summary>

Add to your MCP configuration:

{
  "mcpServers": {
    "pptx": {
      "command": "python",
      "args": ["-m", "pptx_mcp_server"]
    }
  }
}

</details>

<details> <summary><b>Using a Virtual Environment (conda/venv)</b></summary>

Specify the full path to your Python interpreter:

{
  "mcpServers": {
    "pptx": {
      "command": "/path/to/your/python",
      "args": ["-m", "pptx_mcp_server"]
    }
  }
}

Examples:

  • Conda: /Users/username/miniconda3/bin/python
  • venv: /path/to/project/.venv/bin/python </details>

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 SDK
    • python-pptx - PowerPoint file manipulation
    • Pillow - Image processing
    • lxml - XML parsing
    • defusedxml - Secure XML parsing

Optional (for thumbnails)

# macOS
brew install --cask libreoffice
brew install poppler

# Ubuntu/Debian
sudo apt-get install libreoffice poppler-utils

šŸ› ļø Available Tools

Tool Description
create_presentation Create new presentations from scratch
extract_text_inventory Extract text content with positions and formatting
apply_text_replacements Replace text using JSON specifications
rearrange_slides Duplicate, delete, and reorder slides
create_thumbnail_grid Generate visual thumbnail grids
unpack_office_document Extract Office files to editable XML
pack_office_document Rebuild Office files from XML
validate_office_document Validate document structure

šŸ“– Usage Examples

Create a New Presentation

{
  "output_path": "/path/to/presentation.pptx",
  "layout": "16:9",
  "slides": [
    {
      "background": "#0f172a",
      "shapes": [
        {
          "type": "textbox",
          "left": 0.5,
          "top": 3,
          "width": 12,
          "height": 1.5,
          "text": "Welcome to My Presentation",
          "font_size": 54,
          "bold": true,
          "color": "#ffffff",
          "alignment": "center"
        },
        {
          "type": "textbox",
          "left": 0.5,
          "top": 5,
          "width": 12,
          "height": 1,
          "text": "Subtitle goes here",
          "font_size": 24,
          "color": "#94a3b8",
          "alignment": "center"
        }
      ]
    },
    {
      "shapes": [
        {
          "type": "textbox",
          "left": 0.5,
          "top": 0.5,
          "width": 12,
          "height": 1,
          "text": "Key Points",
          "font_size": 36,
          "bold": true
        },
        {
          "type": "textbox",
          "left": 0.5,
          "top": 1.8,
          "width": 12,
          "height": 5,
          "paragraphs": [
            {"text": "First important point", "font_size": 24, "bullet": true},
            {"text": "Second important point", "font_size": 24, "bullet": true},
            {"text": "Third important point", "font_size": 24, "bullet": true}
          ]
        }
      ]
    }
  ]
}

Supported shape types:

  • textbox - Text content
  • rectangle - Rectangle (can contain text)
  • rounded_rectangle - Rounded corners
  • oval - Circle/ellipse
  • image - Image file (use path property)
  • line - Line connector

Supported layouts: 16:9, 4:3, widescreen, standard

Extract Text Inventory

Get all text content from an existing presentation:

{
  "pptx_path": "/path/to/presentation.pptx"
}

Returns structured JSON:

{
  "slide-0": {
    "shape-0": {
      "left": 0.5,
      "top": 1.0,
      "width": 12.0,
      "height": 1.5,
      "paragraphs": [
        {"text": "Title Text", "font_size": 44.0, "bold": true}
      ]
    }
  }
}

Replace Text Content

Modify text in an existing presentation:

{
  "pptx_path": "/path/to/template.pptx",
  "output_path": "/path/to/output.pptx",
  "replacements_json": {
    "slide-0": {
      "shape-0": [
        {"text": "New Title", "font_size": 44, "bold": true}
      ]
    }
  }
}

Rearrange Slides

Reorder, duplicate, or remove slides:

{
  "template_path": "/path/to/template.pptx",
  "output_path": "/path/to/output.pptx",
  "slide_sequence": "0,2,2,1,3"
}
  • 0,2,2,1,3 → Keep slide 0, duplicate slide 2, then slides 1 and 3
  • Omit an index to delete that slide

Unpack/Pack for XML Editing

// Unpack to directory
{
  "office_file": "/path/to/document.pptx",
  "output_dir": "/path/to/unpacked"
}

// Pack back to file
{
  "input_dir": "/path/to/unpacked",
  "output_file": "/path/to/output.pptx"
}

šŸ”§ Troubleshooting

<details> <summary><b>ModuleNotFoundError: No module named 'mcp'</b></summary>

Ensure you're using the correct Python environment:

# Check which Python pip uses
pip --version

# Install with specific Python
/path/to/python -m pip install -e .

</details>

<details> <summary><b>Server not appearing in MCP client</b></summary>

  1. Verify the config file path is correct for your OS
  2. Ensure JSON syntax is valid (no trailing commas)
  3. Restart the MCP client completely
  4. Check logs for errors </details>

<details> <summary><b>Thumbnail generation fails</b></summary>

Install LibreOffice and poppler:

# macOS
brew install --cask libreoffice && brew install poppler

# Linux
sudo apt-get install libreoffice poppler-utils

</details>

<details> <summary><b>Permission denied errors</b></summary>

Ensure the output paths are writable and parent directories exist. </details>

šŸ“ Project Structure

pptx-mcp-server/
ā”œā”€ā”€ pyproject.toml              # Package configuration
ā”œā”€ā”€ README.md
└── pptx_mcp_server/
    ā”œā”€ā”€ __init__.py
    ā”œā”€ā”€ server.py               # MCP server implementation
    └── tools/
        ā”œā”€ā”€ __init__.py
        ā”œā”€ā”€ create.py           # Create new presentations
        ā”œā”€ā”€ inventory.py        # Extract text content
        ā”œā”€ā”€ replace.py          # Text replacement
        ā”œā”€ā”€ rearrange.py        # Slide manipulation
        ā”œā”€ā”€ thumbnail.py        # Visual thumbnails
        └── ooxml.py            # XML pack/unpack/validate

šŸ¤ Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

šŸ™ Acknowledgments

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured