Skip to main content
Glama

🎨 pruna-mcp-server

CI PyPI Python License: MIT

MCP-Server für Pruna AI — ultraschnelle Bildgenerierung, Bearbeitung, Upscaling und Videogenerierung direkt aus Ihrem KI-Assistenten.

Pruna AI ist eine Inference-API, die auf Bild- und Videogenerierung spezialisiert ist. Sie bietet Bildgenerierung in unter 2 Sekunden ab 0,005 $/Bild, mit Modellen für Text-zu-Bild, Bildbearbeitung, Upscaling und Videogenerierung. Dieser MCP-Server kapselt deren API, sodass jeder MCP-kompatible Client (Claude Desktop, Kiro, Cursor) visuelle Inhalte nativ generieren kann.

Entspricht der MCP-Spezifikation 2025-11-25.

Funktionen

  • 6 MCP-Tools: generate_image, edit_image, upscale_image, generate_video, list_models, upload_file

  • 7 MCP-Prompts: Produktfotos, virtuelles Staging, Social-Media-Visuals, Spiel-Konzeptkunst, Werbeanzeigen, Videoanzeigen, Bildverbesserung

  • 2 MCP-Ressourcen: pruna://models-Katalog zur Modellsuche ohne Tool-Aufrufe

  • 18 Modelle: 10 Text-zu-Bild, 3 Bearbeitung, 1 Upscale, 4 Video

  • Smart Sync/Async: Synchron für schnelle Bildmodelle, asynchron mit Polling für Videos

  • Transparente Dateiverarbeitung: Lokale Pfade oder URLs übergeben — automatischer Upload wird gehandhabt

  • Native MCP-Bildrückgabe: ImageContent-Blöcke für Clients, die Inline-Anzeige unterstützen

  • Volle MCP-Konformität: Tool-Annotationen, strukturierte Inhalte, Fortschrittsbenachrichtigungen

Related MCP server: jgkme/kilo-image-gen-mcp

Schnellstart

# With uvx (zero install)
uvx pruna-mcp-server

# Or with pip
pip install pruna-mcp-server
pruna-mcp

Legen Sie Ihren API-Schlüssel fest — erhalten Sie einen unter pruna.ai (besuchen Sie das Entwicklerportal oder kontaktieren Sie Pruna, um Zugriff anzufordern):

# macOS Keychain (recommended)
security add-generic-password -a $USER -s PRUNA_API_KEY -w "your-api-key"

# Or environment variable
export PRUNA_API_KEY="your-api-key"

MCP-Client-Konfiguration

Kiro CLI

Fügen Sie dies zu Ihrer Agenten-Konfiguration hinzu (z. B. ~/.kiro/agents/default.json):

In mcpServers:

"pruna": {
  "command": "sh",
  "args": ["-c", "PRUNA_API_KEY=$(security find-generic-password -a $USER -s PRUNA_API_KEY -w) uv run --directory /path/to/pruna-mcp-server pruna-mcp"],
  "autoApprove": ["generate_image", "edit_image", "upscale_image", "generate_video", "list_models", "upload_file"]
}

Fügen Sie in tools hinzu: "@pruna/*"

Fügen Sie in allowedTools hinzu: "generate_image", "edit_image", "upscale_image", "generate_video", "list_models", "upload_file"

Hinweis: Kiro-Agenten verwenden eine tools-Whitelist mit der Syntax @server-name/* und eine allowedTools-Liste. Beide müssen die Pruna-Tools enthalten, damit diese verfügbar sind.

Claude Desktop

Fügen Sie dies zu ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) hinzu:

{
  "mcpServers": {
    "pruna": {
      "command": "sh",
      "args": ["-c", "PRUNA_API_KEY=$(security find-generic-password -a $USER -s PRUNA_API_KEY -w) /path/to/uv run --directory /path/to/pruna-mcp-server pruna-mcp"]
    }
  }
}

Wichtig: Verwenden Sie den vollständigen Pfad zu uv (z. B. /Users/you/.local/bin/uv) — Claude Desktop startet Prozesse mit einem minimalen PATH, der ~/.local/bin nicht enthält.

Hinweis: Claude Desktop rendert ImageContent nicht inline im Chat. Das Bild wird generiert und lokal gespeichert — Claude wird den Dateipfad in seiner Antwort referenzieren.

Cursor

Fügen Sie dies zu .cursor/mcp.json hinzu:

{
  "mcpServers": {
    "pruna": {
      "command": "uvx",
      "args": ["pruna-mcp-server"],
      "env": { "PRUNA_API_KEY": "your-api-key" }
    }
  }
}

Tools

Tool

Beschreibung

Preisgestaltung

generate_image

Text-zu-Bild mit 10 Modellen

Ab 0,0001 $/Bild

edit_image

Bearbeitung von 1-5 Bildern mit Textanweisungen

Ab 0,010 $/Bild

upscale_image

KI-Upscaling auf 1-8 Megapixel

Ab 0,005 $/Bild

generate_video

Text/Bild/Audio zu Video

Ab 0,005 $/s

list_models

Alle verfügbaren Modelle mit Preisen durchsuchen

Kostenlos

upload_file

Dateien für Bearbeitungs-/Video-Workflows hochladen

Kostenlos

Bild-Tools geben sowohl einen JSON-Metadatenblock als auch einen nativen MCP-ImageContent-Block zurück (base64, für Bilder < 5 MB).

Prompts

Integrierte Workflow-Vorlagen für häufige Anwendungsfälle:

Prompt

Anwendungsfall

Beispiel

product-photo

E-Commerce-Produktfotos

"weiße Ledersneaker auf sauberem Hintergrund"

virtual-staging

Immobilien-Rauminszenierung

Leere Räume mit Möbeln ausstatten

social-media-visual

Plattform-optimierte Visuals

Automatisches Seitenverhältnis pro Plattform

game-concept-art

Spiel-Assets & Umgebungen

Charaktere, Waffen, Landschaften

ad-creative

Digitale Anzeigen mit Text-Overlay

Im Bild gerenderte Schlagzeilen

video-ad

Kurze Videoanzeigen

Talking Heads, Produktdemos

image-enhance

Upscale + Enhance-Workflow

KI-generierte Bildverfeinerung

Konfiguration

Umgebungsvariable

Erforderlich

Standard

Beschreibung

PRUNA_API_KEY

✅

—

Ihr Pruna AI API-Schlüssel

PRUNA_OUTPUT_DIR

—

./pruna-output

Verzeichnis für heruntergeladene Dateien

PRUNA_POLL_INTERVAL

—

2

Sekunden zwischen asynchronen Abfragen

PRUNA_TIMEOUT

—

120

HTTP-Timeout in Sekunden

PRUNA_MAX_RETRIES

—

3

Maximale Wiederholungsversuche bei transienten Fehlern

Client-Kompatibilität

Client

Transport

Status

Hinweise

Kiro CLI

STDIO

✅ Getestet

Erfordert tools + allowedTools-Konfiguration

Claude Desktop

STDIO

✅ Getestet

Vollständigen Pfad zu uv verwenden; keine Inline-Bildanzeige

Cursor

STDIO

🔲 Geplant

—

Claude Code

STDIO

🔲 Geplant

—

Entwicklung

git clone https://github.com/charlesrapp/pruna-mcp-server.git
cd pruna-mcp-server
uv sync --extra dev

# Run tests (100 tests, 94% coverage)
uv run pytest --cov

# Lint & type check
uv run ruff check src/ tests/
uv run mypy src/

Siehe CONTRIBUTING.md für Richtlinien.

Lizenz

MIT — siehe LICENSE.

Available Tools

8 tools
edit_imageA

Edit one or more images with text instructions using Pruna AI.

Args: prompt: Edit instruction describing the desired changes images: 1-5 image URLs or local file paths model: Model to use (default: p-image-edit) aspect_ratio: Output aspect ratio seed: Random seed for reproducible generation

Inputs: images (required), prompt (required), seed, model, +1 more.

generate_imageA

Generate an image from a text prompt using Pruna AI.

Args: prompt: Text description of the image to generate model: Model to use (default: p-image) aspect_ratio: Output aspect ratio (1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, custom) width: Custom width 256-1440, multiple of 16. Only when aspect_ratio=custom height: Custom height 256-1440, multiple of 16. Only when aspect_ratio=custom seed: Random seed for reproducible generation

Inputs: prompt (required), seed, model, width, +2 more.

generate_videoB

Generate a video from text, image, or audio using Pruna AI.

Args: prompt: Text prompt for video generation model: Model to use (p-video, wan-t2v, wan-i2v, vace) image: Input image URL/path for image-to-video audio: Input audio URL/path for audio-conditioned video duration: Duration in seconds (1-20) resolution: Video resolution (720p or 1080p) aspect_ratio: Aspect ratio (ignored when image is provided) fps: Frames per second (24 or 48) seed: Random seed for reproducible generation

Inputs: prompt (required), fps, seed, audio, +5 more. Returns: result

list_modelsA
Read-onlyIdempotent

List available Pruna AI models with capabilities and pricing.

Args: category: Filter by category: image, editing, try-on, upscale, video, video-edit

Inputs: category. Returns: result

transform_videoA

Transform a source video using reference images (video-to-video).

Two models are available:

  • p-video-animate: animate a single subject reference image using the motion from the source video (provide exactly 1 reference).

  • p-video-replace: replace the character(s) in the source video using 1-3 identity reference images.

Motion, timing, camera movement, and scene structure are preserved.

Args: video: Source video URL or local file path (.mp4) references: Reference images (URLs or local file paths). Exactly 1 for p-video-animate, 1-3 for p-video-replace. model: Model to use (p-video-animate or p-video-replace) resolution: Output resolution (720p or 1080p) target_fps: Working FPS (original, 24, or 48) instruction_prompt: Optional guidance on how to apply the transform turbo: Faster generation for slightly lower quality save_audio: Save the output video with audio ignore_audio: Ignore source audio during generation seed: Random seed for reproducible generation

Inputs: video (required), references (required), seed, model, +6 more. Returns: result

try_on_imageA

Virtually fit one or more garments onto a person's photo using Pruna AI.

Args: person_image: Image URL or local file path of the person garment_images: 1-11 garment reference images (URLs or local file paths). Up to 6 recommended for best quality. model: Model to use (default: p-image-try-on) prompt: Experimental guidance for non-flatlay garment images (e.g. which garment from which image to use) turbo: Faster generation. Not recommended for more than 4 garments reference_pose: Experimental. Image URL/path to repose the person before try-on seed: Random seed for reproducible generation output_format: Output format (webp, jpg, png) output_quality: Quality for jpg/webp outputs (0-100) preserve_input_size: Resize the result back to the person image size

Inputs: person_image (required), garment_images (required), seed, model, +6 more.

upload_fileA
Idempotent

Upload a local file to Pruna AI for use in editing/video workflows.

Args: file_path: Local file path to upload (max 20MB)

Inputs: file_path (required). Returns: result

upscale_imageA
Idempotent

Upscale an image using Pruna AI.

Args: image: Image URL or local file path to upscale target: Target resolution in megapixels (1-128, capped at 128 MP) output_format: Output format (webp, jpg, png) enhance_details: Enhance fine textures enhance_realism: Improve realism (recommended for AI-generated images)

Inputs: image (required), target, output_format, enhance_details, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: image generation, image editing, video generation, video transformation, try-on, upscaling, model listing, and file upload. No two tools overlap in function.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (e.g., generate_image, edit_image, list_models) using snake_case, making them predictable and easy to understand.

    Tool Count5/5

    With 8 tools, the server is well-scoped for its purpose—covering core media generation and editing tasks without being overly sparse or cluttered.

    Completeness4/5

    The set covers major operations: generation, editing, transformation, upscaling, try-on, model listing, and file upload. A minor gap is the lack of a text-based video editing tool analogous to edit_image, but overall it's quite complete.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers