An AI agent using the Model Context Protocol (MCP) to control Microsoft PowerPoint presentations via tool calls. Built with FastMCP and pyautogui.
- Accepts slide content or instructions via MCP tool calls
- Automatically opens a PowerPoint file
- Controls presentation:
- Start presentation (F5)
- Next/Previous slide (→, ←)
- Go to specific slide number
- End presentation (ESC)
- Responds to commands like:
- "Start presentation"
- "Go to slide 3"
- "Next slide"
- "Previous slide"
- "End presentation"
- Safety checks: ensures PowerPoint is open before sending commands
- FastMCP SSE server for LLM/agent integration
- (Recommended) Create a Python 3.13 virtual environment using uv:
uv venv .venv --python=3.13 uv pip install -r requirements.txt
- Adjust
PPT_PATHandPPT_FILEinserver.pyif needed:PPT_PATH: Path to PowerPoint executablePPT_FILE: Path to your.pptxfile
uv run python server.py- The server runs at
http://127.0.0.1:8000/sse(SSE transport)
A test client is provided:
uv run python test_client.pyThis will:
- List available tools
- Start the presentation
- Go to next/previous slides
- Jump to slide 3
- End the presentation
- Add or modify tools in
server.pyas needed - Integrate with LLMs or other MCP clients for automation
- pyautogui simulates keyboard input; ensure PowerPoint is in the foreground
- Timing and transitions are handled with short delays for reliability