OF

Office PowerPoint MCP Server for PPTX Manipulation

Create, read, and edit PowerPoint presentations with an MCP server for robust PPTX manipulation, automation, and integration.

Quick Install
npx -y @GongRzhe/Office-PowerPoint-MCP-Server

Overview

The Office PowerPoint MCP Server for PPTX Manipulation is a lightweight HTTP/MCP-compatible service that enables programmatic creation, reading, and editing of PowerPoint (.pptx) files. It exposes a set of tools (endpoints) that perform common PPTX operations such as adding slides, inserting text and images, extracting slide content, and merging or exporting presentations. Because it implements an MCP-style interface, it can be integrated into AI/automation pipelines, web services, or developer tools that need reliable PPTX handling.

This server is useful when you need to automate slide generation, perform bulk edits across many presentations, or provide an API for user-driven PPTX manipulation. It is designed for developers who want to build automated reporting, templated slide creation (for business reports, dashboards, or marketing collateral), or extract slide content for indexing and downstream processing (for example, feeding text into an LLM).

Features

  • Create new PPTX files from templates or from scratch
  • Read and extract text and metadata from existing slides
  • Add or remove slides and manipulate slide order
  • Insert and position text boxes, images, and shapes
  • Replace text across a presentation (e.g., template placeholders)
  • Merge multiple PPTX files into one
  • Export slides to images (PNG) for preview or thumbnails
  • HTTP/MCP-compatible API suitable for automation and AI integrations
  • Configurable storage directory and template support

Installation / Configuration

Clone the repository and run the server locally or in Docker. Example steps (Python environment):

# clone
git clone https://github.com/GongRzhe/Office-PowerPoint-MCP-Server.git
cd Office-PowerPoint-MCP-Server

# create virtualenv and install
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

# set environment variables (example)
export PORT=8000
export PPTX_STORAGE_DIR=./presentations
export TEMPLATE_DIR=./templates

# start server
python app.py

Docker example:

docker build -t pptx-mcp-server .
docker run -p 8000:8000 -e PPTX_STORAGE_DIR=/data/presentations -v $(pwd)/presentations:/data/presentations pptx-mcp-server

Common configuration options:

  • PORT: server listen port (default 8000)
  • PPTX_STORAGE_DIR: local folder for uploaded/created PPTX files
  • TEMPLATE_DIR: folder containing base .pptx templates
  • LOG_LEVEL: logging verbosity

Adjust these via environment variables or a configuration file depending on your deployment.

Available Tools / Resources

The server exposes a set of tools (HTTP endpoints) for PPTX manipulation. Below is a compact reference.

EndpointMethodPurpose
/createPOSTCreate a new presentation (optionally from a template)
/readGET/POSTExtract text/metadata from a presentation or a specific slide
/add_slidePOSTAppend a slide (with layout selection)
/replace_textPOSTFind-and-replace strings across a presentation
/add_imagePOSTInsert an image into a slide at specified coordinates
/mergePOSTMerge multiple PPTX files into one
/export_slideGETExport a slide as PNG for preview

Example JSON tool call (MCP-style):

{
  "tool": "create_presentation",
  "args": {
    "template": "monthly_report.pptx",
    "title": "April Metrics"
  }
}

Files are typically returned as downloadable URLs or streamed binaries depending on the endpoint.

Use Cases

  • Automated weekly reports: generate a new PPTX for each reporting period using a corporate template, insert charts as images, and populate bullet points from a data pipeline.

    • Example flow: call /create (template), call /add_slide for each section, call /add_image to insert chart PNGs, then download the final file.
  • Bulk template updates: replace outdated wording or corporate names across hundreds of presentations.

    • Example: POST to /replace_text with {“find”: “OldCorp”, “replace”: “NewCorp”} and process files in PPTX_STORAGE_DIR.
  • Slide extraction for search/indexing: extract text from slides to build a searchable index.

    • Example: call /read for each file to return slide text, then feed text into a search engine or LLM indexer.
  • AI-assisted slide authoring: use an LLM to draft slide text, then programmatically create slides and layout text boxes via the server endpoints (MCP-compatible tool calls from an agent).

Example Requests

Create a presentation from a template (curl):

curl -X POST "http://localhost:8000/create" \
  -H "Content-Type: application/json" \
  -d '{"template":"templates/sales_template.pptx","title":"Q1 Sales"}'

Replace text in a file:

curl -X POST "http://localhost:8000/replace_text" \
  -H "Content-Type: application/json" \
  -d '{"file":"presentations/old.pptx","find":"ACME Inc","replace":"ACME Corporation"}'

Export slide as PNG:

curl "http://localhost:8000/export_slide?file=presentations/report.pptx&slide=2" --output slide2.png

Tips and Best Practices

  • Use templates for consistent styling: keep master templates in TEMPLATE_DIR.
  • For large-scale processing, batch operations and asynchronous queuing will improve throughput.
  • Store generated files in persistent storage (S3 or network volume) for production deployments.
  • Sanitize uploaded content and enforce size limits to avoid resource exhaustion.

This MCP server provides a practical, API-first way to automate PPTX workflows and integrate slide manipulation into larger automation or AI systems.