Package Exports
- zrald1-powerpoint-mcp-server
- zrald1-powerpoint-mcp-server/dist/index-simple.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (zrald1-powerpoint-mcp-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
PowerPoint MCP Server
A comprehensive Model Context Protocol (MCP) server that provides complete PowerPoint functionality to AI agents. This server exposes ALL PowerPoint features through a standardized MCP interface, enabling AI agents to create, edit, and manipulate PowerPoint presentations with professional-grade capabilities.
๐ Features
Complete PowerPoint Functionality
- ๐ File Operations: Create, open, save, delete presentations with metadata
- ๐ฏ Slide Management: Add, delete, copy, move slides with custom layouts
- โ๏ธ Content Creation: Rich text, shapes, images, tables, charts with advanced formatting
- ๐ฌ Advanced Features: Animations, transitions, media embedding, hyperlinks
- ๐ฌ Collaboration: Comments, speaker notes, presentation settings
- ๐จ Professional Graphics: SmartArt diagrams, custom shapes, advanced styling
AI Agent Optimization
- ๐ค Intuitive API: Clear, descriptive tool names and parameters
- ๐ Comprehensive Validation: Zod schema validation with helpful error messages
- ๐ Structured Responses: JSON responses optimized for AI parsing
- ๐ก๏ธ Error Recovery: Graceful error handling and recovery mechanisms
- โก Performance: Optimized for concurrent AI agent requests
Production-Ready Quality
- โ 90%+ Test Coverage: Comprehensive unit and integration tests
- ๐งฌ Mutation Testing: Robust test validation with Stryker
- ๐ Cross-Platform: Windows, macOS, Linux compatibility
- ๐ Security Features: Input validation and sanitization
- ๐ Documentation: Complete API reference and examples
๐ฆ Installation
npm install powerpoint-mcp-server๐ Quick Start
1. Basic Setup
import { PowerPointMCPServer } from 'powerpoint-mcp-server';
const server = new PowerPointMCPServer();
await server.start();2. MCP Configuration
Add to your MCP client configuration:
{
"mcpServers": {
"powerpoint": {
"command": "npx",
"args": ["powerpoint-mcp-server"],
"env": {}
}
}
}3. AI Agent Usage
The server provides 6 core MCP tools for PowerPoint control:
// Create a new presentation
await mcpClient.callTool("create_presentation", {
filePath: "./my-presentation.pptx",
title: "AI Generated Presentation",
author: "AI Agent",
overwrite: false
});
// Add a slide
await mcpClient.callTool("create_slide", {
filePath: "./my-presentation.pptx",
backgroundColor: "#1E3A8A"
});
// Add formatted text
await mcpClient.callTool("add_formatted_text", {
filePath: "./my-presentation.pptx",
slideIndex: 0,
text: "Welcome to AI-Generated Content",
x: 1, y: 2, w: 8, h: 1.5,
fontSize: 36,
bold: true,
color: "FFFFFF"
});
// Add shapes
await mcpClient.callTool("add_shape", {
filePath: "./my-presentation.pptx",
slideIndex: 0,
shape: "rect",
x: 2, y: 3, w: 4, h: 2,
fill: "FF0000"
});
// Save presentation
await mcpClient.callTool("save_presentation", {
filePath: "./my-presentation.pptx"
});๐ ๏ธ Available Tools
Core File Operations
create_presentation- Create new presentations with metadatasave_presentation- Save presentations to fileget_presentation_info- Get presentation metadata and information
Slide Management
create_slide- Add slides with optional background colors
Content Creation
add_formatted_text- Rich text with comprehensive formatting optionsadd_shape- Geometric shapes with styling
๐ฏ AI Agent Workflows
Business Presentation Creation
const businessWorkflow = [
{
tool: "create_presentation",
args: {
filePath: "./business-review.pptx",
title: "Q4 Business Review",
author: "AI Business Analyst"
}
},
{
tool: "create_slide",
args: {
filePath: "./business-review.pptx",
backgroundColor: "#1E3A8A"
}
},
{
tool: "add_formatted_text",
args: {
filePath: "./business-review.pptx",
slideIndex: 0,
text: "Q4 Business Review 2024",
x: 1, y: 2, w: 8, h: 1.5,
fontSize: 36,
bold: true,
color: "FFFFFF"
}
}
];
// Execute workflow
for (const step of businessWorkflow) {
await mcpClient.callTool(step.tool, step.args);
}Educational Content
// Create interactive educational presentation
await mcpClient.callTool("create_presentation", {
filePath: "./education.pptx",
title: "Introduction to Machine Learning",
author: "AI Education Assistant"
});
await mcpClient.callTool("create_slide", {
filePath: "./education.pptx"
});
await mcpClient.callTool("add_formatted_text", {
filePath: "./education.pptx",
slideIndex: 0,
text: "Introduction to Machine Learning",
x: 1, y: 2, w: 8, h: 2,
fontSize: 40,
bold: true
});๐งช Testing
The server includes comprehensive testing with 90%+ coverage target:
# Run all tests
npm run test:all
# Run comprehensive tests
npm run test:comprehensive
# Check coverage
npm run test:coverage
# Run mutation testing
npm run test:mutation๐ Security
Built-in security features:
- Input Validation: Comprehensive Zod schema validation
- Path Validation: Prevents directory traversal attacks
- Error Handling: Graceful error recovery and reporting
- Type Safety: Full TypeScript support with strict typing
โก Performance
Optimized for AI agent usage patterns:
- Concurrent Operations: Handle multiple simultaneous requests
- Memory Management: Efficient resource cleanup
- Fast Response Times: Optimized for quick AI agent interactions
- Scalable Architecture: Designed for enterprise usage
๐ Cross-Platform Support
Tested and supported on:
- Windows 10/11
- macOS 10.15+
- Linux Ubuntu 18.04+
๐ API Reference
create_presentation
Create a new PowerPoint presentation with metadata.
Parameters:
filePath(string): Path where the presentation will be savedtitle(string, optional): Presentation titleauthor(string, optional): Presentation authoroverwrite(boolean, optional): Whether to overwrite existing file
Response:
{
"success": true,
"message": "Presentation created: My Presentation",
"filePath": "./my-presentation.pptx"
}create_slide
Add a new slide to the presentation.
Parameters:
filePath(string): Path to the presentation filebackgroundColor(string, optional): Background color (hex or name)
Response:
{
"success": true,
"message": "Slide created at index 0",
"slideIndex": 0
}add_formatted_text
Add formatted text to a slide.
Parameters:
filePath(string): Path to the presentation fileslideIndex(number): Zero-based slide indextext(string): Text content to addx(number): X position in inchesy(number): Y position in inchesw(number): Width in inchesh(number): Height in inchesfontSize(number, optional): Font size (default: 18)bold(boolean, optional): Bold text (default: false)color(string, optional): Text color (default: "000000")
Response:
{
"success": true,
"message": "Text added to slide 0",
"textId": "text_1234567890"
}๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
# Clone repository
git clone https://github.com/your-org/powerpoint-mcp-server.git
cd powerpoint-mcp-server
# Install dependencies
npm install
# Build project
npm run build
# Run tests
npm run test:all
# Start development server
npm run dev๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Model Context Protocol - Standardized AI-tool communication
- pptxgenjs - PowerPoint generation library
- TypeScript - Type-safe development
- Jest - Testing framework
- Zod - Schema validation
๐ Support
- ๐ Issues: GitHub Issues
- ๐ Documentation: Full Documentation
Made with โค๏ธ for the AI agent community