{
  "markdown": "# multimodal-mcp\n\nMulti-provider media generation MCP server. Generate images, videos, audio, and transcriptions from text prompts using OpenAI, xAI, Gemini, ElevenLabs, and BFL (FLUX) through a single unified interface.\n\n## Features\n\n- 🎨 **Image Generation** — Generate images via OpenAI (gpt-image-1), xAI (grok-imagine-image), Gemini (imagen-4), or BFL (FLUX Pro 1.1)\n- ✏️ **Image Editing** — Edit images via OpenAI, xAI, Gemini, or BFL (FLUX Kontext)\n- 🎬 **Video Generation** — Generate videos via OpenAI (sora-2), xAI (grok-imagine-video), or Gemini (veo-3.1)\n- 🔊 **Audio Generation** — Text-to-speech via OpenAI (tts-1), Gemini, or ElevenLabs (Flash v2.5). Sound effects via ElevenLabs\n- 🎙️ **Audio Transcription** — Speech-to-text via OpenAI (Whisper) or ElevenLabs (Scribe)\n- 🔄 **Auto-Discovery** — Automatically detects configured providers from environment variables\n- 🎯 **Provider Selection** — Auto-selects or explicitly choose a provider per request\n- 📁 **File Output** — Saves all generated media to disk with descriptive filenames\n\n## Quick Start\n\nSet the API key for at least one provider. Most users only need one — add more to access additional providers.\n\n```bash\n# Using OpenAI\nclaude mcp add multimodal-mcp -e OPENAI_API_KEY=sk-... -- npx -y @r16t/multimodal-mcp@latest\n\n# Or using xAI\n# claude mcp add multimodal-mcp -e XAI_API_KEY=xai-... -- npx -y @r16t/multimodal-mcp@latest\n\n# Or using Gemini\n# claude mcp add multimodal-mcp -e GEMINI_API_KEY=AIza... -- npx -y @r16t/multimodal-mcp@latest\n\n# Or using ElevenLabs (audio + transcription)\n# claude mcp add multimodal-mcp -e ELEVENLABS_API_KEY=xi-... -- npx -y @r16t/multimodal-mcp@latest\n\n# Or using BFL/FLUX (images)\n# claude mcp add multimodal-mcp -e BFL_API_KEY=... -- npx -y @r16t/multimodal-mcp@latest\n```\n\nUsing a different editor? See [setup instructions](#editor-setup) for Claude Desktop, Cursor, VS Code, Windsurf, and Cline.\n\n## Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `OPENAI_API_KEY` | At least one provider key | OpenAI API key — enables image, video, audio generation, and transcription via gpt-image-1, sora-2, tts-1, and whisper-1 |\n| `XAI_API_KEY` | At least one provider key | xAI API key — enables image and video generation via grok-imagine-image and grok-imagine-video |\n| `GEMINI_API_KEY` | At least one provider key | Gemini API key — enables image, video, and audio generation via imagen-4, veo-3.1, and gemini-2.5-flash-preview-tts |\n| `GOOGLE_API_KEY` | — | Alias for `GEMINI_API_KEY`; either name is accepted |\n| `ELEVENLABS_API_KEY` | At least one provider key | ElevenLabs API key — enables audio generation (TTS, sound effects) and transcription via Flash v2.5 and Scribe v1 |\n| `BFL_API_KEY` | At least one provider key | BFL API key — enables image generation and editing via FLUX Pro 1.1 and FLUX Kontext |\n| `MEDIA_OUTPUT_DIR` | No | Directory for saved media files. Defaults to the current working directory |\n\n## Available Tools\n\n### `generate_image`\n\nGenerate an image from a text prompt.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `prompt` | string | Yes | Text description of the image to generate |\n| `provider` | string | No | Provider to use: `openai`, `xai`, `google`, `bfl`. Auto-selects if omitted |\n| `aspectRatio` | string | No | Aspect ratio: `1:1`, `16:9`, `9:16`, `4:3`, `3:4` |\n| `quality` | string | No | Quality level: `low`, `standard`, `high` |\n| `outputDirectory` | string | No | Directory to save the generated file. Absolute or relative path. Defaults to `MEDIA_OUTPUT_DIR` or cwd |\n| `providerOptions` | object | No | Provider-specific parameters passed through directly |\n\n### `generate_video`\n\nGenerate a video from a text prompt. Video generation is asynchronous and may take several minutes.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `prompt` | string | Yes | Text description of the video to generate |\n| `provider` | string | No | Provider to use: `openai`, `xai`, `google`. Auto-selects if omitted |\n| `duration` | number | No | Video duration in seconds (provider limits apply) |\n| `aspectRatio` | string | No | Aspect ratio: `16:9`, `9:16`, `1:1` |\n| `resolution` | string | No | Resolution: `480p`, `720p`, `1080p` |\n| `outputDirectory` | string | No | Directory to save the generated file. Absolute or relative path. Defaults to `MEDIA_OUTPUT_DIR` or cwd |\n| `providerOptions` | object | No | Provider-specific parameters passed through directly |\n\n### `generate_audio`\n\nGenerate audio from text. Supports text-to-speech and sound effects. Audio generation is synchronous.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `text` | string | Yes | Text to convert to speech, or a description of the sound effect to generate |\n| `provider` | string | No | Provider to use: `openai`, `google`, `elevenlabs`. Auto-selects if omitted |\n| `voice` | string | No | Voice name (provider-specific). OpenAI: `alloy`, `ash`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`. Google: `Kore`, `Charon`, `Fenrir`, `Aoede`, `Puck`, etc. ElevenLabs: voice ID |\n| `speed` | number | No | Speech speed multiplier (OpenAI only): `0.25` to `4.0` |\n| `format` | string | No | Output format (OpenAI only): `mp3`, `opus`, `aac`, `flac`, `wav`, `pcm` |\n| `outputDirectory` | string | No | Directory to save the generated file. Absolute or relative path. Defaults to `MEDIA_OUTPUT_DIR` or cwd |\n| `providerOptions` | object | No | Provider-specific parameters passed through directly. ElevenLabs: set `mode: \"sound-effect\"` for sound effects, `model` for TTS model selection |\n\n### `transcribe_audio`\n\nTranscribe audio to text (speech-to-text).\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `audioPath` | string | Yes | Absolute path to the audio file to transcribe |\n| `provider` | string | No | Provider to use: `openai`, `elevenlabs`. Auto-selects if omitted |\n| `language` | string | No | Language code (e.g., `en`, `fr`, `es`) to hint the transcription language |\n| `providerOptions` | object | No | Provider-specific parameters passed through directly |\n\n### `list_providers`\n\nList all configured media generation providers and their capabilities. Takes no parameters.\n\n## Provider Capabilities\n\n| Provider | Image | Image Editing | Video | Audio | Transcription | Key Models |\n|----------|:-----:|:------------:|:-----:|:-----:|:------------:|------------|\n| OpenAI | ✅ | ✅ | ✅ | ✅ | ✅ | gpt-image-1, sora-2, tts-1, whisper-1 |\n| xAI | ✅ | ✅ | ✅ | — | — | grok-imagine-image, grok-imagine-video |\n| Gemini | ✅ | ✅ | ✅ | ✅ | — | imagen-4, veo-3.1, gemini-2.5-flash-preview-tts |\n| ElevenLabs | — | — | — | ✅ | ✅ | eleven_flash_v2_5, scribe_v1 |\n| BFL | ✅ | ✅ | — | — | — | flux-pro-1.1, flux-kontext-pro |\n\n### Image Aspect Ratios\n\n| Provider | 1:1 | 16:9 | 9:16 | 4:3 | 3:4 |\n|----------|:---:|:----:|:----:|:---:|:---:|\n| OpenAI | ✅ | ✅ | ✅ | ✅ | ✅ |\n| xAI | ✅ | ✅ | ✅ | ✅ | ✅ |\n| Gemini | ✅ | ✅ | ✅ | ✅ | ✅ |\n| BFL | ✅ | ✅ | ✅ | ✅ | ✅ |\n\n### Video Aspect Ratios & Resolutions\n\n| Provider | 16:9 | 9:16 | 1:1 | 480p | 720p | 1080p |\n|----------|:----:|:----:|:---:|:----:|:----:|:-----:|\n| OpenAI | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |\n| xAI | ✅ | ✅ | ✅ | — | ✅ | ✅ |\n| Gemini | ✅ | ✅ | — | — | ✅ | ✅ |\n\n### Audio Formats\n\n| Provider | mp3 | opus | aac | flac | wav | pcm |\n|----------|:---:|:----:|:---:|:----:|:---:|:---:|\n| OpenAI | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |\n| Gemini | — | — | — | — | ✅ | — |\n| ElevenLabs | ✅ | ✅ | — | — | — | ✅ |\n\n## Troubleshooting\n\n### No providers configured\n\n```\n[config] No provider API keys detected\n```\n\nSet at least one of `OPENAI_API_KEY`, `XAI_API_KEY`, `GEMINI_API_KEY`, `ELEVENLABS_API_KEY`, or `BFL_API_KEY` in the MCP server's `env` block.\n\n### Provider not available for requested media type\n\nEach provider supports different media types (see [Provider Capabilities](#provider-capabilities)). If you specify a `provider` that isn't configured (no API key) or doesn't support the requested media type, you'll receive an error. Omit the `provider` parameter to auto-select from configured providers.\n\n### Video generation timeout\n\nVideo generation polls for up to 10 minutes. If your video hasn't completed in that window, the request will fail with a timeout error. Try a shorter `duration` or a simpler `prompt`.\n\n### xAI image generation returned no data\n\nThis indicates the xAI API returned an empty response. Check that your `XAI_API_KEY` is valid and that your prompt does not violate xAI content policies.\n\n### Gemini image/video generation failed: 403\n\nVerify your `GEMINI_API_KEY` has the Generative Language API enabled in Google Cloud Console.\n\n## Development\n\n```bash\nnpm run build      # Compile TypeScript to build/\nnpm test           # Run tests with Vitest\nnpm run lint       # Lint and auto-fix with ESLint\nnpm run typecheck  # Type-check without emitting\nnpm run dev        # Watch mode for TypeScript compilation\n```\n\n## Editor Setup\n\nReplace `OPENAI_API_KEY` with your provider of choice (`XAI_API_KEY`, `GEMINI_API_KEY`, `ELEVENLABS_API_KEY`, `BFL_API_KEY`). You can set multiple keys to enable multiple providers.\n\n### Claude Desktop\n\nAdd to `~/Library/Application Support/Claude/claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"multimodal-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"@r16t/multimodal-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"sk-...\"\n      }\n    }\n  }\n}\n```\n\n### Cursor\n\nAdd to `.cursor/mcp.json` in your project root (or `~/.cursor/mcp.json` globally):\n\n```json\n{\n  \"mcpServers\": {\n    \"multimodal-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"@r16t/multimodal-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"sk-...\"\n      }\n    }\n  }\n}\n```\n\n### VS Code (GitHub Copilot)\n\nAdd to `.vscode/mcp.json` in your project root:\n\n```json\n{\n  \"servers\": {\n    \"multimodal-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"@r16t/multimodal-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"sk-...\"\n      }\n    }\n  }\n}\n```\n\n### Windsurf\n\nAdd to `~/.codeium/windsurf/mcp_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"multimodal-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"@r16t/multimodal-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"sk-...\"\n      }\n    }\n  }\n}\n```\n\n### Cline\n\nAdd to `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"multimodal-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"@r16t/multimodal-mcp@latest\"],\n      \"env\": {\n        \"OPENAI_API_KEY\": \"sk-...\"\n      }\n    }\n  }\n}\n```\n\n## License\n\nMIT\n",
  "bytes": 10728,
  "sha": "3ff2c400d2a7cfe0fac4a7277366fe0ab39ef205ea1c21bb26412709666af3d3",
  "repo_slug": "rsmdt/multimodal-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_rsmdt_multimodal_1f0a9bcb/readme"
}