PowerPoint MCP Server - A shadcn-inspired design system for presentations
Project description
Chuk MCP PowerPoint Server
A powerful, LLM-friendly PowerPoint design system with MCP server integration. Built with shadcn-inspired component architecture, featuring variants, composition patterns, and comprehensive theming.
โจ Highlights
- ๐จ Design System - shadcn/ui-inspired component architecture
- ๐ญ Theme System - 15+ built-in themes with dark/light modes
- ๐งฉ Variant System - Type-safe, composable variants (cva-inspired)
- ๐ง Composition Patterns - Build complex UIs from subcomponents
- ๐ Component Registry - LLM-friendly schemas and discovery
- ๐ฏ Design Tokens - Consistent colors, typography, spacing
- ๐ค MCP Integration - Full Model Context Protocol support
- โ Fully Tested - 1900+ tests with comprehensive coverage
- โ๏ธ Cloud Ready - Deploy to Fly.io with Tigris S3 and Redis
Project Structure
chuk-mcp-pptx/
โโโ src/chuk_mcp_pptx/
โ โโโ components/ # Component library
โ โ โโโ core/ # Core components (Card, Button, Badge, etc.)
โ โ โโโ charts/ # Chart components (Bar, Line, Pie, etc.)
โ โ โโโ code.py # Code block components
โ โ โโโ base.py # Base component class
โ โโโ tokens/ # Design tokens (colors, typography, spacing)
โ โโโ themes/ # Theme system and manager (15+ themes)
โ โโโ layout/ # Layout system (Grid, Stack, Container, etc.)
โ โโโ tools/ # MCP tool implementations
โ โ โโโ component_tools.py # Component creation tools
โ โ โโโ chart_tools.py # Chart creation tools
โ โ โโโ shape_tools.py # Shape and SmartArt tools
โ โ โโโ text_tools.py # Text manipulation tools
โ โ โโโ image_tools.py # Image handling tools
โ โ โโโ layout_tools.py # Layout management tools
โ โ โโโ table_tools.py # Table creation tools
โ โ โโโ theme_tools.py # Theme application tools
โ โ โโโ ... # And more specialized tools
โ โโโ registry.py # Component registry
โ โโโ async_server.py # Async MCP server
โ โโโ server.py # Server entry point
โโโ docs/ # Comprehensive documentation
โโโ examples/ # Examples and demos
โโโ tests/ # 1900+ comprehensive tests
โโโ outputs/ # Generated presentations
Features
Core Features
- Create and manage multiple PowerPoint presentations
- Add various slide types (title, content, text, images, charts)
- Save/load presentations to/from disk
- Import/export as base64 for easy transfer
- Virtual Filesystem Integration
- Auto-save to VFS
Design System Features โจ
- Variant System - cva-inspired composable variants
- Composition Patterns - shadcn-style component composition
- Component Registry - Discovery and documentation for LLMs
- Design Tokens - Colors, typography, spacing tokens
- Theme System - 15+ themes with export/import
- Type Safety - Pydantic schemas for validation
Installation
# Using uv
uv sync
uv run chuk-mcp-pptx
# Or using pip
pip install -e .
Usage
The server provides comprehensive MCP tools organized by category:
Presentation Management
pptx_create- Create a new presentationpptx_list- List all open presentationspptx_switch- Switch between presentationspptx_get_info- Get detailed info about a presentationpptx_close- Close a presentationpptx_clear_all- Clear all presentations from memorypptx_status- Get server status and VFS configuration
Component Tools (50+ components)
pptx_add_card- Add card component with variantspptx_add_button- Add button componentpptx_add_badge- Add badge componentpptx_add_alert- Add alert componentpptx_add_metric_card- Add metric card with trend indicatorpptx_add_avatar- Add avatar componentpptx_add_progress_bar- Add progress barpptx_add_icon- Add icon component- And 40+ more shadcn-inspired components...
Chart Tools (15+ chart types)
pptx_add_bar_chart- Add bar/column chartspptx_add_line_chart- Add line/area chartspptx_add_pie_chart- Add pie/doughnut chartspptx_add_scatter_chart- Add scatter/bubble chartspptx_add_radar_chart- Add radar chartspptx_add_combo_chart- Add combination chartspptx_add_funnel_chart- Add funnel chartspptx_add_gauge_chart- Add gauge charts- And more specialized visualization types...
Layout Tools
pptx_list_layouts- List available slide layoutspptx_add_slide_with_layout- Add slide with specific layoutpptx_customize_layout- Customize slide layout propertiespptx_apply_master_layout- Apply master layout to slidespptx_duplicate_slide- Duplicate existing slidepptx_reorder_slides- Reorder slides in presentation
Text Tools
pptx_add_text_slide- Add a slide with text contentpptx_add_text_box- Add formatted text boxpptx_add_bullet_list- Add bullet list with formattingpptx_extract_all_text- Extract all text from presentation
Image Tools
pptx_add_image_slide- Add slide with imagepptx_add_image- Add image to existing slidepptx_add_background_image- Set slide background imagepptx_add_image_gallery- Add image grid/gallerypptx_add_image_with_caption- Add image with captionpptx_add_logo- Add logo to slidepptx_replace_image- Replace existing imagepptx_add_image_placeholder- Add placeholder for mockups
Shape & SmartArt Tools
pptx_add_shape- Add shapes with text and stylingpptx_add_arrow- Add connector arrowspptx_add_smart_art- Add SmartArt-style diagramspptx_add_code_block- Add syntax-highlighted code blocks
Table Tools
pptx_add_table- Add formatted tablespptx_update_table- Update table contentpptx_format_table- Apply table formattingpptx_add_comparison_table- Add comparison tablespptx_add_data_table- Add data tables with headers
Theme Tools
pptx_apply_theme- Apply theme to presentationpptx_list_themes- List available themespptx_create_custom_theme- Create custom themepptx_export_theme- Export theme configurationpptx_get_theme_colors- Get theme color palette
Token Tools
pptx_list_color_tokens- List available color tokenspptx_list_typography_tokens- List typography tokenspptx_list_spacing_tokens- List spacing tokenspptx_get_semantic_colors- Get semantic color scheme
Registry Tools
pptx_list_components- List all available componentspptx_search_components- Search components by keywordpptx_get_component_info- Get component documentationpptx_list_component_examples- Get component usage examples
File Operations
pptx_save- Save presentation to diskpptx_load- Load presentation from diskpptx_export_base64- Export as base64 datapptx_import_base64- Import from base64 datapptx_get_download_url- Get presigned download URL (cloud deployments)
Running the Server
The server can run in different transport modes:
# Auto-detect mode (stdio for Claude Desktop, HTTP otherwise)
uv run python -m chuk_mcp_pptx.server
# Force stdio mode
MCP_TRANSPORT=stdio uv run python -m chuk_mcp_pptx.server
# Force HTTP mode on specific port
MCP_TRANSPORT=http MCP_PORT=8080 uv run python -m chuk_mcp_pptx.server
Cloud Deployment (Fly.io)
Deploy the PowerPoint MCP Server to Fly.io with Tigris S3 storage and Redis for production use.
Quick Deploy
# 1. Create the app
fly apps create chuk-mcp-pptx
# 2. Create Tigris S3 bucket for artifact storage
fly storage create
# 3. Create Redis instance
fly redis create --name chuk-mcp-pptx-redis --region lhr --no-replicas --enable-eviction
# 4. Set Redis URL secret (from redis create output)
fly secrets set REDIS_URL="redis://default:password@fly-chuk-mcp-pptx-redis.upstash.io:6379"
# 5. Deploy
fly deploy
Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Fly.io Edge โ
โ (chuk-mcp-pptx.fly.dev) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PowerPoint MCP Server โ
โ (Python + FastMCP) โ
โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Presentation โ โ chuk-artifacts โ โ
โ โ Manager โโโโ (S3 + Redis backend) โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Fly Redis โ โ Tigris S3 โ
โ (Upstash managed) โ โ (Object storage) โ
โ โ โ โ
โ โข Session metadata โ โ โข Presentation files (.pptx) โ
โ โข Distributed lock โ โ โข Exported artifacts โ
โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Environment Variables
| Variable | Description | Set Via |
|---|---|---|
CHUK_ARTIFACTS_PROVIDER |
Storage provider (s3) |
fly.toml |
AWS_ACCESS_KEY_ID |
Tigris access key | secrets |
AWS_SECRET_ACCESS_KEY |
Tigris secret key | secrets |
AWS_ENDPOINT_URL_S3 |
Tigris endpoint | secrets |
BUCKET_NAME |
S3 bucket name | secrets |
REDIS_URL |
Redis connection URL | secrets |
GitHub Actions Auto-Deploy
Add FLY_API_TOKEN to your repository secrets for automatic deployment on push to main:
fly tokens create deploy -x 999999h
The included .github/workflows/fly-deploy.yml handles automatic deployment.
Getting Download URLs
When deployed to Fly.io with S3 storage, use pptx_get_download_url to get presigned URLs:
# Create and save a presentation
pptx_create(name="report")
pptx_add_title_slide(title="Q4 Report")
# Get a download URL (valid for 1 hour by default)
result = pptx_get_download_url()
# Returns: {"url": "https://fly.storage.tigris.dev/...", "expires_in": 3600}
# Custom expiration (2 hours)
result = pptx_get_download_url(expires_in=7200)
For detailed deployment instructions, see FLY_DEPLOYMENT.md.
Storage Configuration
The server uses chuk-artifacts for flexible storage with support for multiple backends:
Storage Providers
- memory (default): In-memory storage (for local development)
- file: Local filesystem storage
- sqlite: SQLite database storage
- s3: AWS S3 or S3-compatible storage (Tigris, MinIO, etc.)
Environment-Based Configuration
Storage is configured via environment variables:
# S3/Tigris storage (production)
export CHUK_ARTIFACTS_PROVIDER=s3
export AWS_ACCESS_KEY_ID=your_key
export AWS_SECRET_ACCESS_KEY=your_secret
export AWS_ENDPOINT_URL_S3=https://fly.storage.tigris.dev
export BUCKET_NAME=your-bucket
# Redis for metadata (optional but recommended for S3)
export REDIS_URL=redis://localhost:6379
Artifact Store Integration
The server automatically persists presentations to the configured artifact store:
- Auto-save: Presentations are automatically saved when created or modified
- Auto-load: Presentations are loaded from the store when accessed
- Multi-server: Multiple server instances can share presentations via S3
- Presigned URLs: Generate download URLs for cloud-stored presentations
Storage Patterns
- Artifact Store: All presentations use chuk-artifacts for persistence
- Base64 transfer: Export/import presentations as base64 for transfer
- Presigned URLs: Get direct download links from S3/Tigris storage
- Image support: Add images via file path or base64 data URLs
Example Usage
When connected via MCP, tools can be called like:
# Create a presentation
pptx_create(name="quarterly_report")
# Add a title slide
pptx_add_title_slide(
title="Q4 2024 Results",
subtitle="Revenue and Growth Analysis"
)
# Add content slide with bullets
pptx_add_slide(
title="Key Achievements",
content=[
"Revenue increased by 25%",
"Launched 3 new products",
"Expanded to 5 new markets"
]
)
# Save the presentation
pptx_save(path="q4_report.pptx")
# Export for transfer
pptx_export_base64() # Returns base64 data
MCP Configuration
For Claude Desktop, add to your MCP settings:
{
"mcpServers": {
"chuk-mcp-pptx": {
"command": "uv",
"args": ["run", "python", "-m", "chuk_mcp_pptx.server"],
"cwd": "/path/to/chuk-mcp-pptx"
}
}
}
Quick Start
Basic Usage
from pptx import Presentation
from chuk_mcp_pptx.components.core import Card, MetricCard
from chuk_mcp_pptx.themes import ThemeManager
# Create presentation
prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[6])
# Apply theme
mgr = ThemeManager()
theme = mgr.get_theme("dark-violet")
theme.apply_to_slide(slide)
# Add card with composition
card = Card(variant="elevated", theme=theme.__dict__)
card.add_child(Card.Title("Dashboard"))
card.add_child(Card.Description("Real-time analytics"))
card.render(slide, left=1, top=1, width=4, height=2.5)
# Add metric cards
metrics = [
MetricCard(label="Revenue", value="$1.2M", change="+12%", trend="up", theme=theme.__dict__),
MetricCard(label="Users", value="45K", change="+8%", trend="up", theme=theme.__dict__),
]
for i, metric in enumerate(metrics):
metric.render(slide, left=1 + i*3, top=4, width=2.5, height=1.5)
prs.save("output.pptx")
Run Examples
# Core components showcase
uv run python examples/core_components_showcase.py
# Layout system demo
uv run python examples/layout_system_showcase.py
# Theme showcase
uv run python examples/themes_showcase.py
# Token showcase
uv run python examples/tokens_showcase.py
Documentation
Testing
Run All Tests
# All 1900+ tests
uv run pytest tests/ -v
# Specific test suites
uv run pytest tests/components/ -v # Component tests (900+ tests)
uv run pytest tests/layout/ -v # Layout tests (100+ tests)
uv run pytest tests/tools/ -v # MCP tools tests (350+ tests)
uv run pytest tests/themes/ -v # Theme tests (30+ tests)
uv run pytest tests/tokens/ -v # Token tests (10+ tests)
Test Coverage
- Component System: 900+ tests - 100% pass โ
- Chart Components: 300+ tests - 100% pass โ
- Layout System: 100+ tests - 100% pass โ
- MCP Tools: 350+ tests - 100% pass โ
- Theme System: 30+ tests - 100% pass โ
- Token System: 10+ tests - 100% pass โ
Total: 1900+ tests, all passing ๐
Dependencies
python-pptx- PowerPoint file creation and manipulationchuk-mcp-server- MCP server frameworkchuk-artifacts- Flexible artifact storage (memory, file, sqlite, s3)mcp- Model Context Protocol implementationpydantic- Schema validationaiobotocore- Async S3 client (for cloud deployments)redis- Redis client (for distributed deployments)pytest- Testing framework
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chuk_mcp_pptx-0.2.2.tar.gz.
File metadata
- Download URL: chuk_mcp_pptx-0.2.2.tar.gz
- Upload date:
- Size: 596.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57f9e76f1ee58abd0d7c5ac201aa1423a154e7665e2d0ae11f617d9f6694a389
|
|
| MD5 |
d60b9bdab24dba1e7c94930c1df950b3
|
|
| BLAKE2b-256 |
fb5ebb2365b0ad1957f0ade0c389f809c36263302e7731729c04db3e76204be5
|
File details
Details for the file chuk_mcp_pptx-0.2.2-py3-none-any.whl.
File metadata
- Download URL: chuk_mcp_pptx-0.2.2-py3-none-any.whl
- Upload date:
- Size: 255.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9fc9e8812a8ceaf23bb975c34d4e188d7e81977a32f84cf2868e141b1f8c20a
|
|
| MD5 |
9cb54c023499ce2a04a3ec2256594261
|
|
| BLAKE2b-256 |
42b2e4859f4058aa3d0b0bc3f5907e35dc40ba9f61984f754a9a8bcb769929ff
|