A Model Context Protocol (MCP) server that converts structured JSON slideshows to PowerPoint presentations (PPTX) via LibreOffice.
This MCP server enables LLMs to generate PowerPoint presentations by:
- Converting markdown outlines to structured JSON (done by LLM)
- Building OpenDocument Presentation (ODP) files from JSON
- Converting ODP to PPTX using LibreOffice headless mode
- Returning the presentation file or base64-encoded data
- Node.js 18 or higher
- LibreOffice (for ODP to PPTX conversion)
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install libreoffice-impressmacOS:
brew install --cask libreofficeWindows: Download and install from LibreOffice website
npm install
npm run buildnpm start:stdioOr directly:
node dist/server/stdioServer.jsnpm start:httpThe server will start on http://localhost:3000 (or the port specified by the PORT environment variable).
To use with an MCP client like Claude Desktop, add to your MCP configuration:
{
"mcpServers": {
"slides-mcp": {
"command": "node",
"args": ["/path/to/slides-mcp/dist/server/stdioServer.js"]
}
}
}See mcp-config-example.json for a complete example.
{
"slideshow": {
"meta": {
"title": "Presentation Title",
"author": "Author Name (optional)"
},
"masters": [
{
"name": "Master Name",
"backgroundColor": "#ffffff (optional)"
}
],
"images": [
{
"id": "img1",
"dataBase64": "base64-encoded-image-data",
"mimeType": "image/png"
}
],
"slides": [
{
"id": "slide1 (optional)",
"title": "Slide Title (optional)",
"elements": [
{
"type": "text",
"placeholder": "title or content (optional)",
"text": "Text content",
"bullet": false,
"level": 0
},
{
"type": "image",
"imageRef": "img1",
"x": 2,
"y": 3,
"width": 10,
"height": 8
}
],
"notes": {
"plainText": "Speaker notes",
"paragraphs": ["Para 1", "Para 2"]
}
}
]
},
"options": {
"returnBase64": false
}
}- File mode (default): Returns path to generated PPTX file
- Base64 mode: Returns base64-encoded PPTX data
See example-slideshow.json for a complete example of a slideshow JSON structure.
npm run buildnpm run watchnpm testnpm run lintdocker build -f docker/Dockerfile -t slides-mcp .docker run -p 3000:3000 slides-mcpdocker run -i slides-mcp node dist/server/stdioServer.jsUser markdown
→ LLM parsing prompt
→ slideshow JSON
→ MCP tool json_to_pptx(slideshow JSON)
→ ODP package
→ LibreOffice headless
→ PPTX file
src/
schema/
slideshowSchema.ts # Zod schema and types
odp/
index.ts # ODP orchestrator
contentXml.ts # Slide content generation
stylesXml.ts # Master styles and formatting
metaXml.ts # Document metadata
manifestXml.ts # ODP package manifest
images.ts # Image embedding
zip.ts # ODP ZIP packaging
libreoffice/
convert.ts # ODP to PPTX converter
tools/
jsonToPptx.ts # MCP tool implementation
server/
serverCore.ts # Core MCP server logic
stdioServer.ts # Stdio transport
httpServer.ts # HTTP transport
MIT