Skip to main content
Glama
README.md
# Egile MCP Slide Deck Generator

MCP server for generating professional PowerPoint presentations with AI-powered content and images.

## Features

- **AI-Powered Content**: Generate slide content using XAI (Grok), Anthropic (Claude), or OpenAI (GPT)
- **Audience-Specific**: Optimize content for CEOs, CTOs, Engineers, or general audiences
- **Image Generation**: Include AI-generated images via Stable Diffusion (Replicate or Stability AI)
- **Image Sources**: Support for static files, URLs, and AI generation
- **PowerPoint Export**: Export to standard .pptx format
- **Multiple Slide Types**: Title, content, image-focused, and summary slides
- **MCP Protocol**: Compatible with Claude Desktop and other MCP clients

## Installation

### Quick Install

```bash
# Install from source
pip install -e .
```

### Development Install

```bash
# Install with dev dependencies
pip install -e ".[dev]"
```

## Configuration

Create a `.env` file based on `.env.example`:

```bash
# At least one LLM API key required (priority: XAI -> Anthropic -> OpenAI)
XAI_API_KEY=your_xai_key_here
ANTHROPIC_API_KEY=your_anthropic_key_here
OPENAI_API_KEY=your_openai_key_here

# Optional: Image generation
REPLICATE_API_TOKEN=your_replicate_token_here
STABILITY_API_KEY=your_stability_key_here

# Configuration
DEFAULT_AUDIENCE=general
OUTPUT_DIR=./presentations
```

## Usage

### As MCP Server (for Claude Desktop, etc.)

Add to your Claude Desktop config (`claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "slidedeck": {
      "command": "python",
      "args": ["-m", "egile_mcp_slidedeck.server"]
    }
  }
}
```

### Programmatic Usage

```python
from egile_mcp_slidedeck.server import mcp

# Run via FastMCP
mcp.run(transport="stdio")
```

### Direct Service Usage

```python
from egile_mcp_slidedeck.deck_service import DeckService

service = DeckService()

# Start a deck
result = service.start_new_deck("AI Platform Overview", audience="ceo")
deck_id = result["deck_id"]

# Add slides
service.add_slide_to_deck(
    deck_id=deck_id,
    content="Our platform processes 1M transactions daily",
    slide_type="content",
    include_image=True,
    image_prompt="modern cloud infrastructure dashboard"
)

# Export
service.export_deck(deck_id, "presentation.pptx")
```

## Available Tools

### `start_deck`

Start a new presentation deck.

**Parameters:**
- `title` (str, required): Presentation title
- `audience` (str, optional): Target audience - "ceo", "cto", "engineer", or "general"
- `template` (str, optional): Template style - "corporate", "minimal", or "creative"

**Returns:** Deck ID for subsequent operations

### `add_slide`

Add a slide to the deck with AI-generated content.

**Parameters:**
- `deck_id` (str, required): Target deck ID
- `content` (str, required): Slide topic or content
- `slide_type` (str, optional): "title", "content", "image", or "summary"
- `audience` (str, optional): Override deck's default audience
- `include_image` (bool, optional): Whether to include an image
- `image_prompt` (str, optional): Image generation prompt or URL
- `temperature` (float, optional): LLM creativity (0.3-0.7)

**Returns:** Generated slide content

### `export_deck`

Export deck to PowerPoint format.

**Parameters:**
- `deck_id` (str, required): Deck to export
- `filename` (str, optional): Output filename

**Returns:** File path and export details

### `get_deck_info`

Get information about a deck.

**Parameters:**
- `deck_id` (str, required): Deck ID

**Returns:** Deck metadata and statistics

### `list_decks`

List all active decks in the current session.

**Returns:** List of all decks with metadata

## Audience-Specific Content

### CEO
- Focus on business impact, ROI, competitive advantage
- High-level strategic content
- Minimal technical jargon
- Emphasizes value proposition and results

### CTO
- Balance technical depth with strategic vision
- Architecture and scalability focus
- Technology stack details
- Security and technical trade-offs

### Engineer
- Deeply technical implementation details
- Code examples and specifications
- Precise technical terminology
- Architecture diagrams and patterns

### General
- Balanced professional content
- Accessible to mixed audiences
- Clear explanations without oversimplification

## Image Generation

Images can be sourced from:

1. **AI Generation**: Provide a text prompt (requires Replicate or Stability AI API)
2. **URL**: Provide a direct image URL
3. **Local File**: Provide a file path

Image prompts are automatically enhanced for presentation quality.

## Temperature Guide

- **0.3**: Technical, precise, factual (best for engineer/CTO slides with data)
- **0.5**: Balanced, professional (good for CTO slides)
- **0.7**: Creative, engaging (best for CEO/general slides)

## Example Workflow

```python
# Start a CEO-focused deck
start_deck(
    title="Q1 2026 AI Platform Results",
    audience="ceo",
    template="corporate"
)

# Add title slide
add_slide(
    deck_id="...",
    content="Transforming Business with AI-Powered Analytics",
    slide_type="title"
)

# Add content slide with image
add_slide(
    deck_id="...",
    content="99.9% uptime, 1M daily transactions, 40% cost reduction",
    slide_type="content",
    include_image=True,
    image_prompt="enterprise dashboard showing growth metrics"
)

# Export
export_deck(deck_id="...", filename="q1_results.pptx")
```

## Environment Variables

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `XAI_API_KEY` | One of three | - | xAI (Grok) API key |
| `ANTHROPIC_API_KEY` | One of three | - | Anthropic (Claude) API key |
| `OPENAI_API_KEY` | One of three | - | OpenAI (GPT) API key |
| `REPLICATE_API_TOKEN` | Optional | - | Replicate API token for image generation |
| `STABILITY_API_KEY` | Optional | - | Stability AI API key for image generation |
| `DEFAULT_AUDIENCE` | No | general | Default target audience |
| `OUTPUT_DIR` | No | ./presentations | Output directory for .pptx files |
| `IMAGE_GENERATION_TIMEOUT` | No | 60 | Image generation timeout (seconds) |
| `LOG_LEVEL` | No | INFO | Logging level |
| `DRY_RUN_MODE` | No | false | Dry run mode (skip actual generation) |

## Output

Presentations are saved to the configured `OUTPUT_DIR` (default: `./presentations/`) with auto-generated filenames based on the deck title and timestamp.

## License

MIT

## Related Projects

- **egile-agent-slidedeck**: Agent plugin for conversational deck creation
- **egile-agent-core**: Core agent framework
- **egile-agent-hub**: Multi-agent orchestration