Skip to main content
Glama
office-powerpoint-mcp-server

office-powerpoint-mcp-server

Office PowerPoint MCP Server (office-powerpoint-mcp-server)

CI Python 3.12+ FastMCP v4 License: MIT

A production-ready Model Context Protocol (MCP) server for automated PowerPoint (.pptx) generation, OpenXML-enhanced financial styling, and presentation inspection. Built with Python 3.12+, FastMCP v4, python-pptx, lxml, Pillow, and Pydantic v2.

Inspired by and functionally referencing GongRzhe/Office-PowerPoint-MCP-Server, upgraded to modern 2026 standards with path sandboxing, consolidated tool surface, hybrid state persistence, and native OpenXML table formatting.


Key Architectural Highlights

Feature

GongRzhe Reference (v2.0)

Office PowerPoint MCP Server (v4)

MCP Framework

FastMCP v1 / MCP Python SDK v1

FastMCP v4 (fastmcp>=4.1.0) with ToolAnnotations hints

Tool Surface

32 scattered tools (context bloat)

14 consolidated, action-dispatched tools with strict Pydantic schemas

Path Security

Unrestricted filesystem access

Strict Path Sandbox (--allow-dir) with traversal (..) blocking

State Model

In-memory only (lost if server restarts)

Hybrid State: In-memory sessions + direct disk auto-save (auto_save: true)

Table Formatting

Basic python-pptx cells

Direct OpenXML (lxml): zebra striping, subtle borders, cell padding

Default Dimensions

Variable 4:3 / 16:9

Widescreen 16:9 (13.333" x 7.5") institutional standard

Package Management

pip / setup.py

Modern uv workflows with Python 3.12+


Related MCP server: Office-PowerPoint-MCP

Installation

Install using uv:

# Clone or navigate to the project directory
cd office-powerpoint-mcp-server

# Create virtual environment and sync dependencies
uv sync

Running the MCP Server

The server provides a standard CLI entry point ppt-mcp-server:

1. Standard I/O (Default for MCP Clients like Claude Desktop, Cursor, Antigravity)

# Sandboxed to current working directory
uv run ppt-mcp-server

# Sandboxed to specific directories
uv run ppt-mcp-server stdio --allow-dir /Users/username/decks --allow-dir /Volumes/Presentations

2. HTTP Transport (Streamable HTTP / SSE)

uv run ppt-mcp-server http --host 127.0.0.1 --port 8000 --allow-dir /Users/username/decks

Client Configuration

Claude Desktop / Antigravity (claude_desktop_config.json / mcp-config.json)

{
  "mcpServers": {
    "powerpoint": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/path/to/office-powerpoint-mcp-server",
        "ppt-mcp-server",
        "stdio",
        "--allow-dir",
        "/path/to/allowed/decks"
      ]
    }
  }
}

Tool Reference (14 Consolidated Tools)

All tools expose MCP ToolAnnotations (read_only_hint, destructive_hint, idempotent_hint).

1. Lifecycle & Ingestion (tools/lifecycle.py)

  • manage_presentation: Actions: create, open, save, close, set_properties.

    • Sets widescreen 16:9 (13.333" x 7.5") by default.

    • Supports hybrid in-memory IDs and direct disk paths with auto_save: true.

  • inspect_presentation (Read-Only): Ingests an entire presentation in one call.

    • Returns slide counts, layout names, speaker notes, all text frames, and table rows as structured JSON or publication Markdown.

2. Themes & Institutional Styling (tools/design.py & templates.json)

  • apply_theme: Applies institutional color schemes, slide background, and font hierarchies across slides or tables.

    • Supported Themes: institutional_navy, modern_blue, corporate_gray, elegant_green, warm_red.

  • format_master_footer: Adds institutional divider line, confidentiality notice, current date, and dynamic page numbers (Slide X of Y) across slides.

3. Template-Driven Slide Generation (tools/slides.py)

  • add_slide_from_template: Builds pre-calculated coordinate slides from templates.json:

    1. title_slide: Authoritative title slide with decorative accent bar, subtitle, author, and date.

    2. executive_summary: Dual strategic cards for observations and recommendations.

    3. two_column_comparison: Side-by-side comparison cards (Option A vs Option B / Current vs Target).

    4. kpi_metrics_grid: 4 high-impact metric cards with prominent numbers, labels, and YoY trends.

    5. table_with_commentary: Left-side financial data table with right-side commentary card.

    6. chart_with_takeaways: Left-side native chart with right-side analyst takeaways card.

  • manage_slides: Slide operations: add, duplicate, delete, reorder, populate_placeholder.

  • list_templates (Read-Only): Lists all available layout templates and color schemes.

4. Financial & Data Tables (tools/tables.py)

  • add_data_table: Creates publication-ready financial tables:

    • Header row: Theme primary background (#1B365D) with bold white text.

    • Alternating rows: Slate gray zebra striping (#F1F5F9).

    • Subtle OpenXML horizontal borders (#CBD5E1) via lxml.

    • Left-aligned text in Column 0, right-aligned numbers in Columns $\ge 1$.

    • Optional bottom source / footnote line.

  • update_table_cells: Fine-grained cell updates (text, colors, bold, alignment, font sizes).

5. Text & Shape Management (tools/content.py)

  • manage_text: Add, update, or clear text boxes and multi-level bulleted lists (levels 0–4) with run-level overrides and auto-fit shrink-to-fit sizing.

  • add_bullet_slide: Quick creation of institutional structured bullet slide with header and divider.

  • manage_shapes: Create cards, callout containers, arrows, rectangles, and rounded containers.

6. Media & Charts (tools/media_charts.py)

  • add_native_chart: Creates native editable PowerPoint charts (COLUMN_CLUSTERED, LINE, PIE, BAR_CLUSTERED) using CategoryChartData.

  • add_image: Inserts images from a validated local file path or base64 string (e.g. from matplotlib), locking aspect ratio within a bounding box (left, top, max_width, max_height).


Institutional Navy Palette Specifications

Primary Accent / Header: '#1B365D' (Muted Institutional Navy)
Secondary Accent:        '#0F172A' (Slate Navy)
Zebra Row / Card Fill:   '#F1F5F9' (Slate Gray)
Border Lines:            '#CBD5E1' (Light Slate Border)
Body Text:               '#1A1A1A' (Dark Charcoal)
Muted Subtext:           '#64748B' (Muted Slate)
Background:              '#FFFFFF' (Pure White)
Fonts:
  Title: 'Helvetica'
  Body:  'Arial'

Quality & Automated Verification

Run tests and code formatting checks:

# Run full pytest test suite
uv run pytest -v

# Run Ruff linter and formatter checks
uv run ruff check .
uv run ruff format --check .

License

MIT License.

Available Tools

14 tools
add_bullet_slideAdd Bullet SlideB

Quickly add an institutional structured bullet slide with header and divider.

Inputs: title (required), bullet_points (required), theme, subtitle, +4 more. Returns: object

add_data_tableAdd Data TableB

Create a publication-ready institutional data table on a slide.

Features:

  • Automatic column width calculation with wider category/label column 0

  • Institutional styled header with theme primary background (#1B365D) and bold white text

  • Alternating row zebra striping with slate gray fill (#F1F5F9)

  • Subtle OpenXML horizontal bottom borders (#CBD5E1) on every row

  • Intelligent alignment: Left-aligned for text/labels, Right-aligned for numeric data

  • Clean cell margins / padding and optional source footnote

Inputs: rows (required), headers (required), slide_index (required), top, +10 more. Returns: object

add_imageAdd ImageA

Insert an image into a slide from a local file path or base64 string.

Automatically preserves aspect ratio within the specified bounding box (left, top, max_width, max_height).

Inputs: slide_index (required), top, left, auto_save, +7 more. Returns: object

add_native_chartAdd Native ChartB

Create a native, editable PowerPoint chart.

Supports COLUMN_CLUSTERED, LINE, PIE, and BAR_CLUSTERED charts with custom series data, legend positioning, gridline toggling, and data labels.

Inputs: series (required), categories (required), chart_type (required), slide_index (required), +12 more. Returns: object

add_slide_from_templateAdd Slide From TemplateB

Build institutional presentation slides from pre-calculated coordinate templates.

Supported Templates:

  • title_slide: Authoritative title slide with decorative accent bar and author/date

  • executive_summary: Two structured cards for key observations and recommendations

  • two_column_comparison: Side-by-side comparison cards (current vs target, options A/B)

  • kpi_metrics_grid: 4 high-impact metric cards with big numbers, labels, and YoY trends

  • table_with_commentary: Institutional data table on the left with commentary on the right

  • chart_with_takeaways: Native editable chart on the left with analyst takeaways on the right

Inputs: title (required), template_name (required), subtitle, auto_save, +5 more. Returns: object

apply_themeApply ThemeB

Apply institutional color palette and typography across slides, tables, and cards.

Inputs: auto_save, file_path, theme_name, slide_index, +2 more. Returns: object

inspect_presentationInspect PresentationA
Read-onlyIdempotent

Inspect and extract all content from a presentation in a single call.

Returns slide count, layout names, speaker notes, all text frames, and table rows formatted as structured JSON or readable Markdown.

Inputs: file_path, output_format, presentation_id. Returns: result

list_templatesList TemplatesA
Read-onlyIdempotent

List all available pre-calculated slide layout templates and color schemes.

Inputs: no named parameters. Returns: object

manage_presentationManage PresentationB

Create, open, save, close, or configure PowerPoint presentations.

Defaults to widescreen 16:9 format (13.333 x 7.5 inches). Supports hybrid in-memory sessions and direct disk auto-saving.

Inputs: action (required), title, author, comments, +5 more. Returns: object

manage_shapesManage ShapesC

Add styled visual cards, callout containers, arrows, or geometric shapes.

Inputs: action (required), slide_index (required), top, bold, +14 more. Returns: object

manage_slidesManage SlidesC

Perform slide structural operations: duplicate, delete, reorder, or populate placeholders.

Inputs: action (required), text, to_index, auto_save, +6 more. Returns: object

manage_textManage TextB

Add, update, or clear text boxes and multi-level bulleted lists.

Features:

  • Multi-level indentation (levels 0-4)

  • Run-level bold, color, and size overrides

  • Automatic shrink-to-fit font scaling preventing box overflow

Inputs: action (required), slide_index (required), top, bold, +15 more. Returns: object

update_table_cellsUpdate Table CellsB

Update specific cells in an existing PowerPoint table.

Allows modifying cell text, font size, bold/italic, text color, background shading, and text alignment.

Inputs: updates (required), shape_index (required), slide_index (required), auto_save, +2 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 14 tools

    Disambiguation4/5

    Most tools target distinct resources and actions (tables vs charts vs images vs themes). There is some overlap between add_slide_from_template (whose templates include table/chart layouts), add_bullet_slide, and manage_slides (populate placeholders), but the descriptions give enough cues to choose correctly.

    Naming Consistency5/5

    All 14 tools follow a consistent snake_case verb_noun pattern (manage_presentation, add_native_chart, update_table_cells, apply_theme). No camelCase mixing or inconsistent styles.

    Tool Count5/5

    14 tools is well within the sweet spot and each maps to a meaningful PowerPoint operation (lifecycle, slides, text, shapes, tables, charts, images, theming). Nothing feels redundant or missing at the count level.

    Completeness4/5

    The surface covers a full authoring lifecycle: create/open/save, slide CRUD, text, shapes, tables, charts, images, themes, and footers. Minor gaps exist, such as no explicit speaker-notes editing tool (notes are only read by inspect_presentation) and no export/animations, but core workflows are covered.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to create and manipulate PowerPoint presentations programmatically, including adding slides, exporting to PDF, and reading metadata.
      18 npm
      5
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables creating, editing, and reading PowerPoint presentations (PPTX) with security features like ZIP bomb protection, macro detection, and path traversal prevention.
      -