{
  "markdown": "# 🎨 pruna-mcp-server\n\n[![CI](https://github.com/charlesrapp/pruna-mcp-server/actions/workflows/ci.yml/badge.svg)](https://github.com/charlesrapp/pruna-mcp-server/actions/workflows/ci.yml)\n[![PyPI](https://img.shields.io/pypi/v/pruna-mcp-server)](https://pypi.org/project/pruna-mcp-server/)\n[![Python](https://img.shields.io/pypi/pyversions/pruna-mcp-server)](https://pypi.org/project/pruna-mcp-server/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nMCP server for [Pruna AI](https://pruna.ai) — ultra-fast image generation, editing, upscaling, and video generation directly from your AI assistant.\n\n[Pruna AI](https://pruna.ai) is an inference API specialized in image and video generation. It offers sub-2-second image generation starting at $0.005/image, with models for text-to-image, image editing, upscaling, and video generation. This MCP server wraps their API so any MCP-compatible client (Claude Desktop, Kiro, Cursor) can generate visual content natively.\n\nConforms to [MCP Specification 2025-11-25](https://modelcontextprotocol.io/specification/2025-11-25).\n\n## Features\n\n- **8 MCP Tools**: `generate_image`, `edit_image`, `try_on_image`, `upscale_image`, `generate_video`, `transform_video`, `list_models`, `upload_file`\n- **7 MCP Prompts**: Product photos, virtual staging, social media visuals, game concept art, ad creatives, video ads, image enhancement\n- **2 MCP Resources**: `pruna://models` catalog for model discovery without tool calls\n- **21 models**: 10 text-to-image, 3 editing, 1 virtual try-on, 1 upscale, 4 video, 2 video-to-video\n- **Smart sync/async**: Sync for fast image models, async with polling for video\n- **Transparent file handling**: Pass local paths or URLs — auto-upload handled\n- **Native MCP image return**: `ImageContent` blocks for clients that support inline display\n- **Full MCP compliance**: Tool annotations, structured content, progress notifications\n\n## Quick Start\n\n```bash\n# With uvx (zero install)\nuvx pruna-mcp-server\n\n# Or with pip\npip install pruna-mcp-server\npruna-mcp\n```\n\nSet your API key — get one at [pruna.ai](https://pruna.ai) (go to the [developer portal](https://docs.api.pruna.ai/) or [contact Pruna](https://pruna.ai/contact) to request access):\n\n```bash\n# macOS Keychain (recommended)\nsecurity add-generic-password -a $USER -s PRUNA_API_KEY -w \"your-api-key\"\n\n# Linux (GNOME Keyring)\nsecret-tool store --label=\"Pruna API Key\" service pruna-mcp-server key api_key <<< \"your-api-key\"\n\n# Windows (PowerShell)\n[System.Environment]::SetEnvironmentVariable(\"PRUNA_API_KEY\", \"your-api-key\", \"User\")\n\n# Or environment variable (all platforms)\nexport PRUNA_API_KEY=\"your-api-key\"\n```\n\n## MCP Client Configuration\n\n### Kiro CLI\n\nAdd to your agent config (e.g. `~/.kiro/agents/default.json`):\n\nIn `mcpServers`:\n```json\n\"pruna\": {\n  \"command\": \"sh\",\n  \"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\"],\n  \"autoApprove\": [\"generate_image\", \"edit_image\", \"try_on_image\", \"upscale_image\", \"generate_video\", \"transform_video\", \"list_models\", \"upload_file\"]\n}\n```\n\nIn `tools`, add: `\"@pruna/*\"`\n\nIn `allowedTools`, add: `\"generate_image\", \"edit_image\", \"try_on_image\", \"upscale_image\", \"generate_video\", \"transform_video\", \"list_models\", \"upload_file\"`\n\n> **Note**: Kiro agents use a `tools` whitelist with `@server-name/*` syntax and an `allowedTools` list. Both must include the Pruna tools for them to be available.\n\n### Claude Desktop\n\nAdd to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):\n\n```json\n{\n  \"mcpServers\": {\n    \"pruna\": {\n      \"command\": \"sh\",\n      \"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\"]\n    }\n  }\n}\n```\n\n> **Important**: Use the full path to `uv` (e.g. `/Users/you/.local/bin/uv`) — Claude Desktop launches processes with a minimal PATH that doesn't include `~/.local/bin`.\n\n> **Note**: Claude Desktop does not render `ImageContent` inline in the chat. The image is generated and saved locally — Claude will reference the file path in its response.\n\n### Cursor\n\nAdd to `.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"pruna\": {\n      \"command\": \"uvx\",\n      \"args\": [\"pruna-mcp-server\"],\n      \"env\": { \"PRUNA_API_KEY\": \"your-api-key\" }\n    }\n  }\n}\n```\n\n## Tools\n\n| Tool | Description | Pricing |\n|------|-------------|---------|\n| `generate_image` | Text-to-image with 10 models | From $0.0001/image |\n| `edit_image` | Edit 1-5 images with text instructions | From $0.010/image |\n| `try_on_image` | Virtual try-on: fit up to 11 garments onto a person | $0.015 first + $0.008/extra garment |\n| `upscale_image` | AI upscaling up to 128 megapixels | From $0.005/image |\n| `generate_video` | Text/image/audio to video | From $0.005/s |\n| `transform_video` | Video-to-video: animate a subject or replace characters | $0.03/s (720p), $0.06/s (1080p) |\n| `list_models` | Browse all available models with pricing | Free |\n| `upload_file` | Upload files for editing/video workflows | Free |\n\nImage tools return both a JSON metadata block and a native MCP `ImageContent` block (base64, for images < 5MB).\n\nVideo tools return a JSON metadata block (including a `download_url` to the Pruna delivery URL), the `.mp4` as a native MCP binary resource (`EmbeddedResource` blob, for videos < 25MB) so clients materialize the file the same way they save images, and a `ResourceLink` to the same delivery URL as a fallback for larger files. All tools return an absolute `file_path`.\n\n## Prompts\n\nBuilt-in workflow templates for common use cases:\n\n| Prompt | Use Case | Example |\n|--------|----------|---------|\n| `product-photo` | E-commerce product shots | \"white leather sneakers on clean background\" |\n| `virtual-staging` | Real estate room staging | Stage empty rooms with furniture |\n| `social-media-visual` | Platform-optimized visuals | Auto aspect ratio per platform |\n| `game-concept-art` | Game assets & environments | Characters, weapons, landscapes |\n| `ad-creative` | Digital ads with text overlay | Headlines rendered in the image |\n| `video-ad` | Short video ads | Talking heads, product demos |\n| `image-enhance` | Upscale + enhance workflow | AI-generated image refinement |\n\n## Configuration\n\n| Environment Variable | Required | Default | Description |\n|---------------------|----------|---------|-------------|\n| `PRUNA_API_KEY` | ✅ | — | Your Pruna AI API key |\n| `PRUNA_OUTPUT_DIR` | — | `~/pruna-output` | Directory for downloaded files |\n| `PRUNA_POLL_INTERVAL` | — | `2` | Seconds between async polls |\n| `PRUNA_TIMEOUT` | — | `120` | HTTP timeout in seconds |\n| `PRUNA_MAX_RETRIES` | — | `3` | Max retries on transient errors |\n\n## Client Compatibility\n\n| Client | Transport | Status | Notes |\n|--------|-----------|--------|-------|\n| Kiro CLI | STDIO | ✅ Tested | Requires `tools` + `allowedTools` config |\n| Claude Desktop | STDIO | ✅ Tested | Use full path to `uv`; no inline image display |\n| Cursor | STDIO | 🔲 Planned | — |\n| Claude Code | STDIO | 🔲 Planned | — |\n\n## Development\n\n```bash\ngit clone https://github.com/charlesrapp/pruna-mcp-server.git\ncd pruna-mcp-server\nuv sync --extra dev\n\n# Run tests (147 tests, 97% coverage)\nuv run pytest --cov\n\n# Lint & type check\nuv run ruff check src/ tests/\nuv run mypy src/\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n\n<!-- mcp-name: io.github.charlesrapp/pruna -->\n",
  "bytes": 7572,
  "sha": "3e9a34cb81ed69846d2bea602989ba63f87eca8ec9fa10accbdd459d28e69b0b",
  "repo_slug": "charlesrapp/pruna-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_charlesrapp_pruna_4ba700a0/readme"
}