presenton-mcp
v1.0.1
Published
MCP server for Presenton AI presentation generator
Maintainers
Readme
Presenton MCP Server
An MCP (Model Context Protocol) server that provides AI agents with the ability to generate presentations using Presenton.
Features
The MCP server exposes the following tool for AI agents:
generate_presentation
Generate a PPTX or PDF presentation from a prompt.
Parameters:
prompt(string, required): The main topic or content for the presentationoutput_path(string, required): Local file path where the presentation should be savedn_slides(number, optional): Number of slides (5-15, default: 8)language(string, optional): Language for the presentation (default: English)theme(string, optional): Presentation theme - one of:dark,light,royal_blue,cream,light_red,dark_pink,faint_yellowexport_format(string, optional): Export format -pptxorpdf(default: pptx)documents(array, optional): Array of document file paths to include as source material
Returns:
{
"success": true,
"message": "Presentation generated successfully!",
"file_path": "/path/to/presentation.pptx",
"presentation_id": "uuid",
"edit_url": "http://localhost:5000/presentation?id=uuid"
}Setup
Prerequisites
- Presenton server must be running: Start with
docker-compose up development - Node.js 18+ installed
- npm package manager
Installation
cd /Users/jamie/Code/presenton/mcp
# Install dependencies
npm install
# Start the MCP server
npm run devConfiguration
The MCP server connects to Presenton at http://localhost:5000 by default. You can customize this using the PRESENTON_URL environment variable:
# Use a different host/port
PRESENTON_URL=http://localhost:8080 npm run dev
# Use a remote server
PRESENTON_URL=https://my-presenton-server.com npm run devThe URL can also be configured by:
- Setting the
PRESENTON_URLenvironment variable (recommended) - Modifying the default in
PresentonServiceconstructor insrc/core/services/presenton-service.ts
Usage Examples
For AI Agents
When an AI agent connects to this MCP server, it can generate presentations like this:
// Generate a simple presentation
await mcp.call_tool("generate_presentation", {
prompt: "Introduction to Machine Learning",
output_path: "./ml_intro.pptx",
n_slides: 8,
theme: "royal_blue"
});
// Generate with source documents
await mcp.call_tool("generate_presentation", {
prompt: "Quarterly Business Review",
output_path: "./q4_review.pptx",
n_slides: 12,
theme: "light",
documents: ["./q4_data.pdf", "./market_analysis.docx"]
});
Testing the MCP Server
You can test the server using any MCP client or the built-in testing tools:
# Start the development server
npm run dev
# Run the test script
npm run test:presenton
# The server will be available for MCP connections
# Test with Claude Desktop, Cline, or other MCP clientsIntegration with AI Assistants
Claude Desktop
Add this to your Claude Desktop MCP configuration:
{
"mcpServers": {
"presenton": {
"command": "npx",
"args": ["tsx", "/Users/jamie/Code/presenton/mcp/src/index.ts"],
"env": {
"PRESENTON_URL": "http://localhost:5000"
}
}
}
}Cline (VS Code Extension)
Configure Cline to use this MCP server for presentation generation capabilities.
Example Agent Interactions
Agent: "Create a presentation about climate change with 10 slides"
MCP Call:
{
"tool": "generate_presentation",
"parameters": {
"prompt": "Climate Change: Causes, Effects, and Solutions",
"output_path": "./climate_change.pptx",
"n_slides": 10,
"theme": "light_red"
}
}Agent: "Generate a business presentation using the quarterly report data"
MCP Call:
{
"tool": "generate_presentation",
"parameters": {
"prompt": "Q4 2024 Business Review and 2025 Strategy",
"output_path": "./business_review.pptx",
"n_slides": 12,
"theme": "royal_blue",
"documents": ["./q4_report.pdf", "./strategy_doc.docx"]
}
}Error Handling
The MCP server provides comprehensive error handling:
- Server connectivity issues: Returns detailed error messages
- Invalid parameters: Validates input parameters with Zod schemas
- File system errors: Handles file creation and download failures
- API failures: Provides clear error messages from the Presenton API
Architecture
MCP Server
├── Core Tool (tools.ts)
│ └── generate_presentation
├── Presenton Service (presenton-service.ts)
│ ├── API communication
│ ├── File handling
│ ├── Error management
│ └── Server connectivity handling
└── FastMCP Framework
├── Parameter validation (Zod)
├── Tool registration
└── MCP protocol handlingDevelopment
Adding New Features
- Add new methods to
PresentonService - Register new tools in
registerTools()function - Update types and validation schemas
- Test with MCP clients
Debugging
# Run with debug logging
DEBUG=* npm run dev
# Check server health
curl http://localhost:5000/Troubleshooting
Q: "Presenton server not accessible"
A: Make sure Presenton is running: docker-compose up development
Q: "File download failed" A: Check file permissions and ensure the output directory exists
Q: "MCP connection failed" A: Verify the MCP server is running and accessible on the configured port
Q: "Tool not found" A: Make sure the MCP server is properly registered in your AI assistant's configuration
Q: "Server connection failed" A: The generate_presentation tool will automatically detect server connectivity issues and return appropriate error messages
