Sponsored by Deepsite.site

MCP Server Demo - PowerPoint Automation

Created By
buckylee20199 months ago
MCP server for PowerPoint
Content

MCP Server Demo - PowerPoint Automation

This project demonstrates how to use MCP (Model Completion Protocol) to create a server that provides PowerPoint automation capabilities for Amazon Q.

Demo

https://github.com/user-attachments/assets/3daf3bef-4d75-4639-a891-0e64b80b4807

Features

  • Create, open, and save PowerPoint presentations
  • Add and modify slides
  • Add text boxes, images, tables, and charts
  • Update text content and shape properties
  • Retrieve table content

Running the Server

To run the server:

uv run --directory  /path/to/mcp-ppt-server mcp-ppt-server 

Usage

The server exposes various tools for PowerPoint automation that can be called via MCP. The server is designed to work with a single active presentation at a time, which simplifies the API by eliminating the need to track and specify presentation IDs.

Presentation Management

  • initialize_powerpoint(): Initialize PowerPoint automation
  • create_presentation(template=None): Create a new presentation, optionally using a template file
  • open_presentation(file_path): Open an existing presentation from the specified path
  • get_presentation(): Get information about the currently active presentation
  • save_presentation(path=None): Save the active presentation to disk (path is optional if presentation was previously saved)
  • close_presentation(): Close the active presentation

Slide Management

  • get_slides(): Get a list of all slides in the active presentation
  • add_slide(layout_index=1): Add a new slide with specified layout (default is Title and Content)
    • Layout options: 0=Title slide, 1=Title and content, 2=Section header, 3=Two content, etc.
  • set_slide_title(slide_index, title): Set the title text of a slide

Content Management

  • get_slide_text(slide_index): Get all text content in a slide
  • get_slide_shapes(slide_index): Get all shapes in a slide with their IDs and properties
  • update_text(slide_index, shape_index, text): Update the text content of a shape
  • update_shape_by_id(slide_index, shape_id, text=None, left=None, top=None, width=None, height=None): Update a shape by its ID with new properties
  • update_table_cell(slide_index, shape_index, row, col, text): Update the text in a table cell

Adding Content

  • add_textbox(slide_index, text, left=1, top=1, width=4, height=2): Add a text box to a slide
  • add_image(slide_index, image_path, left=1, top=1, width=None, height=None): Add an image to a slide
  • add_table(slide_index, rows, cols, left=1, top=1, width=8, height=4): Add a table to a slide
  • get_table_content(slide_index, shape_index): Retrieve the content of a table in a slide
  • add_chart(slide_index, chart_type, categories, series_names, series_values, left=1, top=1, width=8, height=4, has_legend=True): Add a chart to a slide with multiple data series
    • Chart types: 'COLUMN', 'LINE', 'PIE', 'BAR'
    • categories: List of category names (x-axis labels)
    • series_names: List of series names for the legend
    • series_values: List of lists containing values for each series

Error Handling

Most functions return a dictionary with either success information or error details. Always check for the presence of an "error" key in the returned dictionary to handle errors appropriately.

Example error response:

{
  "error": "No active presentation. Please open or create a presentation first."
}

MCP Config

{
  "mcpServers": {
   "ppt-mcp-server": {
         "command": "uv",
         "args": [
         "run",
         "--directory",
         "/path/to/mcp-ppt-server",
         "mcp-ppt-server"
         ]
   }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
WindsurfThe new purpose-built IDE to harness magic
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Tavily Mcp
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.
ChatWiseThe second fastest AI chatbot™
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Amap Maps高德地图官方 MCP Server
DeepChatYour AI Partner on Desktop
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Serper MCP ServerA Serper MCP Server
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.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Playwright McpPlaywright MCP server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
CursorThe AI Code Editor
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.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
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"