Sponsored by Deepsite.site

MCP PPT Creator

Created By
ltc65398 months ago
Generate powerpoint using a sentence. 用一句话借助大模型生成PPT。
Content

PowerPoint Creator MCP Server

🌐 Chinese Version / 中文版本

This MCP server enables dynamic creation and modification of PowerPoint presentations via a set of API tools. Built on top of MCP and using the python-pptx library, this server provides a flexible interface to add slides, images, tables, and more.

Features

  • Create Presentations
    Initialize a new PowerPoint presentation using a title that generates a unique presentation ID.

  • Slide Operations

    • Title Slide: Add a title slide with an optional subtitle.
    • Content Slide: Create slides with a title and bullet-point content.
    • Section Slide: Insert a section divider slide with a large centered title and an optional background color.
    • Image Slide: Add slides featuring images from local files or URLs with titles and descriptive alt text.
    • Table Slide: Insert slides containing tables with defined headers and row data.
  • Presentation Management

    • Save Presentation: Write the presentation to a specified file path, handling temporary directories if needed.
    • Download Link: Generate a data URI with base64-encoded presentation content for direct download.
    • Presentation Info: Retrieve metadata about the presentation such as the number of slides and available slide layouts.
    • Presentation Outline: Obtain a text-based outline of the presentation structure via a dedicated resource endpoint.
    • Remove Slide: Delete a slide by its 1-based index.
    • Export to Base64: Export the complete presentation as a base64-encoded string for further processing.

Installation

  1. Clone the Repository

    git clone https://github.com/ltc6539/mcp-ppt.git
    cd mcp-ppt
    
  2. Create a Virtual Environment (Optional but Recommended)

    python3 -m venv venv
    source venv/bin/activate  # On Windows use: venv\Scripts\activate
    
  3. Install Dependencies

    pip install -r requirements.txt
    

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "PowerPoint Creator": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with",
        "python-pptx",
        "mcp",
        "run",
        "your_path/mcp-ppt/main.py"
      ]
    }
  }
}

Be sure to modify your_path into the real path You may need to put the full path to the uv executable in the command field. You can get this by running which uv on MacOS/Linux or where uv on Windows. During startup, the server logs Python and python-pptx version information to stderr. Any errors during execution are also printed to stderr for easy debugging.

API Endpoints / Tools

Each MCP tool function is directly accessible via the MCP server. Below are the primary operations available:

1. Create Presentation

  • Function: create_presentation(title: str) -> str
  • Description: Initializes a new presentation and returns a unique presentation ID.

2. Add Title Slide

  • Function: add_title_slide(prs_id: str, title: str, subtitle: Optional[str] = None) -> str
  • Description: Adds a title slide to the specified presentation.

3. Add Content Slide

  • Function: add_content_slide(prs_id: str, title: str, content: List[str]) -> str
  • Description: Inserts a content slide with a title and multiple bullet points.

4. Add Section Slide

  • Function: add_section_slide(prs_id: str, section_title: str, background_color: Optional[str] = None) -> str
  • Description: Creates a section divider slide with a customizable background color and large, centered text.

5. Add Image Slide

  • Function: add_image_slide(prs_id: str, title: str, image_path: str, image_description: str) -> str
  • Description: Adds an image slide. The image can be loaded from a local file or downloaded from a URL.

6. Add Table Slide

  • Function: add_table_slide(prs_id: str, title: str, headers: List[str], rows: List[List[str]]) -> str
  • Description: Inserts a slide containing a table defined by column headers and rows of data.

7. Save Presentation

  • Function: save_presentation(prs_id: str, output_path: str) -> str
  • Description: Saves the presentation to the specified output path, managing temporary directories if necessary.
  • Function: get_presentation_download_link(prs_id: str) -> str
  • Description: Returns a data URI with base64-encoded presentation data for direct browser download.

9. Get Presentation Info

  • Function: get_presentation_info(prs_id: str) -> str
  • Description: Retrieves metadata such as slide count and details on available slide layouts.

10. Get Presentation Outline

  • Resource Endpoint: presentation://{prs_id}/outline
  • Description: Provides a text representation of the presentation structure, including slide titles and content summaries.

11. Remove Slide

  • Function: remove_slide(prs_id: str, slide_index: int) -> str
  • Description: Removes a slide identified by its 1-based index from the presentation.

12. Export to Base64

  • Function: export_to_base64(prs_id: str) -> str
  • Description: Exports the presentation as a base64-encoded string (with the first 100 characters shown as a sample).

Error Handling & Debugging

  • Error Checks:
    Each tool validates input (e.g., verifying presentation IDs or file existence) and returns descriptive error messages.

  • Temporary Directories:
    The server ensures that files are saved in writable directories (typically /tmp) and falls back accordingly if a provided path is read-only.

  • Logging:
    Errors and version information are output to stderr to aid in debugging and monitoring.

Contributing

Contributions are welcome. If you encounter issues or have suggestions for improvements, please open an issue or submit a pull request.

Server Config

{
  "mcpServers": {
    "PowerPoint Creator": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with",
        "python-pptx",
        "mcp",
        "run",
        "your_path/mcp-ppt/main.py"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Playwright McpPlaywright MCP server
Tavily Mcp
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
CursorThe AI Code Editor
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
ChatWiseThe second fastest AI chatbot™
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Serper MCP ServerA Serper MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
DeepChatYour AI Partner on Desktop
WindsurfThe new purpose-built IDE to harness magic
Amap Maps高德地图官方 MCP Server