{"id":9151,"library":"office-powerpoint-mcp-server","title":"Office PowerPoint MCP Server","description":"The `office-powerpoint-mcp-server` library provides a Flask-based HTTP API server for programmatic manipulation of PowerPoint presentations using `python-pptx`. It exposes endpoints to open, save, add slides, add text boxes, and perform various other operations on PPTX files. The current version is 2.0.7, with updates occurring infrequently as it wraps `python-pptx`.","status":"active","version":"2.0.7","language":"en","source_language":"en","source_url":"https://github.com/GongRzhe/Office-PowerPoint-MCP-Server","tags":["powerpoint","pptx","mcp","flask","server","automation","office","api"],"install":[{"cmd":"pip install office-powerpoint-mcp-server","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core functionality for PowerPoint manipulation.","package":"python-pptx","optional":false},{"reason":"Web framework for the HTTP API server.","package":"Flask","optional":false}],"imports":[{"note":"This import is primarily for embedding or programmatically running the Flask application within another Python script. Most users will run the server via `python -m office_powerpoint_mcp_server`.","symbol":"app","correct":"from office_powerpoint_mcp_server import app"}],"quickstart":{"code":"import subprocess\nimport time\nimport requests\n\nprint(\"Starting Office PowerPoint MCP Server...\")\n# Use a non-default port to reduce conflict chances for example\nserver_process = subprocess.Popen(['python', '-m', 'office_powerpoint_mcp_server', '--host', '127.0.0.1', '--port', '5001'])\n\nserver_url = \"http://127.0.0.1:5001\"\n\ntry:\n    print(f\"Server started. Waiting 5 seconds to ensure it's up on {server_url}...\")\n    time.sleep(5) # Give the server time to start\n    \n    # Test if the server is reachable\n    try:\n        response = requests.get(server_url)\n        response.raise_for_status() # Raise an HTTPError for bad responses (4xx or 5xx)\n        print(f\"Server is reachable! Response: {response.text}\")\n    except requests.exceptions.ConnectionError:\n        print(\"Error: Could not connect to the server. It might not have started correctly.\")\n    except requests.exceptions.RequestException as e:\n        print(f\"An unexpected error occurred: {e}\")\n        \n    print(f\"You can now send HTTP requests to its API endpoints, e.g., POST to {server_url}/open or {server_url}/save\")\n    print(\"To stop the server, interrupt this script (Ctrl+C).\")\n    # In a real scenario, you'd make various HTTP requests here to manipulate PowerPoint files.\n    input(\"Press Enter to stop the server...\") # Keep process alive until user input\nfinally:\n    print(\"Stopping server...\")\n    server_process.terminate()\n    server_process.wait()\n    print(\"Server stopped.\")","lang":"python","description":"This example demonstrates how to start the `office-powerpoint-mcp-server` programmatically using `subprocess`, verify its reachability, and then stop it. In a typical use case, you would run the server in a separate process or container and then interact with its HTTP API endpoints using a client library (e.g., `requests`) or `curl`."},"warnings":[{"fix":"Implement a reverse proxy with authentication/authorization (e.g., Nginx, Caddy) in front of the server, or ensure it's only accessible on a trusted local network.","message":"The server does not include any built-in authentication or authorization mechanisms. Exposing it on a public network without additional security measures (e.g., reverse proxy with auth) can lead to unauthorized PowerPoint file manipulation.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Review the source code on GitHub for `app.py` (specifically route definitions) or test API endpoints against your client code after upgrading. If available, consult release notes on PyPI or GitHub.","message":"While no explicit changelog exists, upgrading from `1.x` to `2.x` might introduce changes to API endpoint paths or expected JSON payload structures. Always test upgrades thoroughly.","severity":"breaking","affected_versions":"Between major versions 1.x and 2.x"},{"fix":"Specify a different port using `python -m office_powerpoint_mcp_server --port <new_port>` (e.g., 5001) when starting the server, or configure your environment to use an available port.","message":"The default port (5000) might conflict with other applications (e.g., Flask development servers, common services). If the server fails to start, check for port conflicts.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure the package is installed by running `pip install office-powerpoint-mcp-server`. If using a virtual environment, activate it before running the command.","cause":"The `office-powerpoint-mcp-server` package is not installed in the active Python environment, or the environment is not correctly activated.","error":"ModuleNotFoundError: No module named 'office_powerpoint_mcp_server'"},{"fix":"Change the port by running `python -m office_powerpoint_mcp_server --port <ANOTHER_PORT>` (e.g., 5001), or identify and terminate the process currently occupying the port.","cause":"Another process is already using the specified host and port (default: 127.0.0.1:5000) that the server is attempting to bind to.","error":"OSError: [Errno 98] Address already in use"},{"fix":"Consult the `app.py` source code on GitHub (specifically the route definitions) to understand the exact expected JSON structure and required keys for the endpoint you are calling. Ensure your client sends all necessary parameters with correct keys.","cause":"The JSON payload sent to an API endpoint is missing a required key (e.g., 'filename', 'text') or has an incorrect structure, as defined by the server's expected input for that endpoint.","error":"HTTP 400 Bad Request (and server logs showing KeyError: 'filename' or similar)"}]}