Skip to main content
MeiGen is an open-source MCP (Model Context Protocol) server that gives AI coding assistants the ability to generate images and videos. It supports multiple generation backends — use MeiGen’s cloud models, your local ComfyUI server, or any OpenAI-compatible API.

GitHub Repository

View source code, report issues, and contribute.

What is MCP?

Model Context Protocol (MCP) is an open standard that allows AI assistants to use external tools. When you install MeiGen as an MCP server, your AI assistant gains the ability to generate images and videos, run semantic search across the MeiGen community prompt gallery, and enhance prompts — all through natural language. Search, inspiration, and prompt enhancement need no API key, and a prompt library bundled with the plugin keeps search useful even when you’re offline.

Providers

MeiGen supports three image generation backends — configure one or more.

MeiGen Cloud

Hosted multi-model API. Image and video models from OpenAI, Google, ByteDance, Midjourney, xAI, Black Forest Labs, Alibaba, and Agnes. No GPU required — just an API key. Run list_models for the current lineup.

ComfyUI

Local GPU generation. Run any Stable Diffusion, SDXL, or Flux model on your own hardware. Full control over workflows and parameters.

Bring Your Own API

Any OpenAI-compatible API. Connect Together AI, Fireworks AI, DeepInfra, SiliconFlow, OpenAI, or your own endpoint.
Provider priority: When multiple providers are configured, MeiGen selects in this order: MeiGen Cloud → ComfyUI → OpenAI-compatible. You can override this per-request.

Tools

Most MCP tools work without configuring any provider:
Video capabilities differ by model — quality tiers, available durations and resolutions, audio, reference-video continuation, and whether a first frame is required. Some models are image-to-video only. Call list_models for the current lineup, or see the model comparison.

Supported Platforms

Claude Code

Install as a plugin from the marketplace — includes slash commands, smart agents, and automation hooks.

Cursor / VS Code / Windsurf / Roo Code

One-command setup via npx meigen init <host> — writes the right MCP config file for each editor.

OpenAI Codex CLI

Add the MCP server to ~/.codex/config.toml. Standard stdio MCP, no extra plumbing.

Hermes Agent

First-class MCP support — add to ~/.hermes/config.yaml with timeout: 600 for video generation.

OpenClaw

Install as a plugin from ClawHub — includes skills, commands, and MCP server.

Any MCP host

Standard stdio MCP — point any MCP-compatible host at npx -y meigen@latest.

Standalone CLI Mode

No MCP host? MeiGen also ships as a CLI for shell scripts and CI pipelines:
Use --json for machine-readable output, --no-wait to submit without polling, and --reference <path|url> to pass a reference image. Run npx meigen gen --help for the full flag list.

Next Steps

Setup Guide

Install the plugin and configure your preferred provider.

ComfyUI Guide

Set up local ComfyUI generation with custom workflows.

REST API

Prefer HTTP? Integrate via REST without MCP setup.