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.

Compose inside another workflow

Keep the upstream script, prompt, model/provider, count and approved budget. Creative helpers are optional. Use persistent UUID requestId, wait: false, structured results and check_generation to submit frames/videos and resume them without re-approving every step. The caller owns bounded scheduling, previews and downloads. See the complete workflow contract and examples.

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 the local npm package includes a prompt library for offline search fallback. Remote connections require network access.

Five dedicated image workflows

Ask for a cutout, product detail images, a marketing poster, a new background or image enhancement. The agent should inspect list_skills, prepare the actual materials, submit the matching tool and use check_skill for results. It generates request UUIDs itself. A specified count/quality is already your instruction; only unresolved scope or an Upscale warning needs a decision. Skills use purchased credits only, with no free attempts or daily credits. BYOK/ComfyUI do not supply these workflows. See the complete Skills API and material guide. For posters, put visible copy in content; use extraNotes or customStyle for design directions. autoCopy: false preserves supplied wording, with selected-language translation still possible. See poster field roles and a complete MCP call.

Choose a connection

Prefer remote MCP for MeiGen Cloud: no local npm process, stateless Streamable HTTP, with server changes available after backend deployment and client tool refresh. Choose local npm for automatic local-file preparation, local preferences, prompt enhancement or ComfyUI. Claude plugin commands/agents/hooks are separate package features; adding a remote URL does not install them.

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

Remote Streamable HTTP exposes 14 tools; local npm exposes 17. The following 14 are shared: Local additionally provides enhance_prompt, manage_preferences and comfyui_workflow; these require no MeiGen key. Local gallery search can fall back to a bundled prompt library; remote access requires the network. Provider setup applies to general generation, while every dedicated Skill requires MeiGen Cloud credentials and purchased credits. check_generation by known generationId is public remotely; requestId lookup needs an active key of the owning account. check_skill requires the original API key.
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.Seedance 2.5 uses model ID seedance-2-5, supports 4–30 second 480p/720p output and reference-video continuation, and has no tier option.generate_video requires an explicit model — there’s no platform default. referenceVideoDuration is a deprecated, validated compatibility hint and never sets the billed duration; omit it and pass referenceVideo, whose duration the server detects automatically.

GPT Image 2.5

Call list_models first to check availability. For the local npm server, use model: "gpt-image-2.5"; supported versions pass quality through to MeiGen (low, medium, high, xhigh, max). The local package currently has no modelVariant parameter, so it uses the backend default, Sunburst. To select Flare explicitly, use the remote MCP server or REST API. GPT Image 2 remains a separate model with its original pricing.

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 -y meigen@2.0.0 init <host> — writes the right MCP config file for each editor.

OpenAI Codex CLI

Use remote HTTP with bearer_token_env_var, or configure a local stdio process. See the setup guide for both.

Hermes Agent

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

OpenClaw

Install as a plugin from ClawHub — check the installed bundle manifest and connect its MCP server once.

Any MCP host

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

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 -y meigen@2.0.0 gen --help for the full flag list.

Next Steps

Setup Guide

Install the plugin and configure your preferred provider.

Remote MCP

Zero-install alternative — connect over HTTP, no Node.js required.

ComfyUI Guide

Set up local ComfyUI generation with custom workflows.

REST API

Prefer HTTP? Integrate via REST without MCP setup.
upload_skill_image requires a positive purchased-credit balance and does not charge for generation. For Upscale attachments set purpose: "upscale". Every upscale_image MCP call, including the first, requires confirmedCredits from the current list_skills quote within the accepted user or upstream workflow budget; reuse explicit acceptance.