Prerequisites
- Node.js 22+ recommended for the local package
- For ordinary
generate_image, configure one of these backends.generate_videoand all five Skills require MeiGen Cloud:- MeiGen Cloud — an API key from the desktop API Keys page
- ComfyUI — a running ComfyUI server (installation guide)
- OpenAI-Compatible API — your own key from any provider (Together AI, Fireworks AI, OpenAI, etc.)
Ask an AI assistant to install it
Copy into a local Codex, Claude Code, Cursor or other assistant that can edit MCP configuration:Installation
Claude Code Plugin
1
Install the plugin
2
Configure a provider
Start a new Claude Code session and run
/meigen:setup. Use the guide to choose a provider; enter credentials yourself in private host settings or local configuration, never in the conversation. The plugin can supply MCP configuration: inspect the existing server and avoid adding a duplicate.Alternatively, set environment variables directly (see Provider Configuration below).3
Start using it
Ask Claude to generate images or videos naturally:
- “Generate a minimalist logo for a coffee shop”
- “Animate this photo into a 5-second clip”
- “Search the gallery for cyberpunk cityscapes”
- “Enhance this prompt: a cat in space”
Also listed on the community wshobson/agents marketplace. Third-party listings can lag behind the main release. Inspect the installed package and add an MCP entry only if it is missing.
Cursor / VS Code / Windsurf / Roo Code
One command writes the right MCP config file for each editor:meigen@2.0.0; running the helper from a pinned package does not itself pin the generated entry. Set credentials in the MCP process environment or private host settings, then restart.
Codex CLI, IDE extension and local Codex desktop host
Remote HTTP is recommended for MeiGen Cloud and Skills. For a local process, merge this into~/.codex/config.toml instead of a remote entry:
MEIGEN_API_TOKEN in the environment that launches Codex. For public-only setup without a key, omit env_vars until the variable exists. Codex does not automatically load a project’s .env.local. You can first register the command with codex mcp add meigen -- npx -y meigen@2.0.0, then add the environment forwarding and timeouts to its existing table. meigen init codex is not supported.
A 240-second tool timeout is suitable for Skills; long generic video generation can require more. Restart/reconnect, inspect codex mcp list and /mcp, then make an actual list_skills call. See the official Codex configuration guide. ChatGPT web does not share this local setup; it supports public queries only with the current MeiGen authentication.
Hermes Agent (NousResearch)
Hermes is a first-class MCP client. Add to~/.hermes/config.yaml:
Standalone CLI (no MCP host required)
For shell scripts, CI pipelines, or anyone who wants AI image generation without an MCP host:~/Pictures/meigen/ by default — see Output Directories to change where files land.
OpenClaw
MeiGen is also distributed as themeigen-ai-design bundle and the creative-toolkit Skill. These are separate distribution artifacts with independent versions. Follow the repository installation guide for the supported install command and current bundle layout. Inspect the installed manifest and configure exactly one MCP connection; a standalone Skill does not prove that its MCP server is connected.
Other MCP-Compatible Hosts
For any host that consumes stdio MCP, add this to its config file:Provider Configuration
These provider choices apply to ordinary image generation. Skills always require MeiGen Key and purchased credits. Configure one or more providers. When multiple are available, the plugin selects in order: MeiGen → ComfyUI → OpenAI-compatible. You can override this per-request.MeiGen Cloud
The easiest way to get started. MeiGen’s hosted API gives you image and video models from OpenAI, Google, ByteDance, Midjourney, xAI, Black Forest Labs, Alibaba, and Agnes — no GPU required. Calllist_models for the current lineup, or see the model comparison for capabilities and pricing.
Create a key using a desktop browser at API Keys. Use the same account to choose Top Up on Profile, or purchase on mobile.
Bring Your Own API (OpenAI-Compatible)
Connect any image generation API that follows the OpenAI format — Together AI, Fireworks AI, DeepInfra, SiliconFlow, OpenAI, or your own endpoint.
Set
OPENAI_BASE_URL to point to your provider’s endpoint. If omitted, defaults to OpenAI’s API.
ComfyUI (Local)
Run image generation on your own GPU with full control over models, samplers, and workflows. Free to use — no API key needed.
Requirements:
- ComfyUI must be running and accessible at the configured URL
- You need at least one imported workflow template — see the ComfyUI Guide
ComfyUI runs serially: one image at a time.
Output Directories
General image/video generation and the standalone CLI can save files locally. Dedicated Skills return image URLs/resource links; download them explicitly when you need local files.
Set these the same way as your provider variables — in the
env block of your MCP config, or exported in your shell for CLI use.
Verify Installation
After setup, ask your AI assistant:“List MeiGen’s available Skills and current prices”Confirm a real
list_skills call succeeds without generation or charges. Use list_models separately to inspect general-generation backends. A saved configuration is not proof of connection.
Usage
Once installed, ask your AI assistant in plain language — for example, “Generate a watercolor landscape, 16:9 aspect ratio”. See the overview for the full list of tools.Upgrade from an earlier version
Your existing MeiGen key,MEIGEN_API_TOKEN and private ~/.config/meigen/config.json can be reused. Change a fixed older npm version to meigen@2.0.0, then restart. Entries tracking the latest release also need a restart and a version/tool check. Local npm exposes 17 tools; the existing nine remain and the new dedicated flows change how the agent routes Skill requests.
Claude/OpenClaw instructions and manifests update through their own distribution; upgrading npm alone does not replace them. Remote users do not upgrade npm: wait for backend deployment, then refresh/reconnect. No mandatory switch from local to remote is required. See source and release notes.
For Skill image limits, interrupted requests, resizing confirmation and price changes, follow the Skills API guide. A Skill upload failure must not trigger paid submission or status polling.
Troubleshooting
'No image generation providers configured'
'No image generation providers configured'
No provider is set up. On Claude Code, run
/meigen:setup (interactive wizard). On other hosts (Cursor, Codex, Windsurf, Hermes Agent, etc.), add the env var to your MCP config file directly:- MeiGen:
MEIGEN_API_TOKEN - OpenAI-compatible:
OPENAI_API_KEY - ComfyUI:
COMFYUI_URL(and import a workflow)
'Insufficient credits' (MeiGen)
'Insufficient credits' (MeiGen)
API keys can only use purchased credits, not daily free credits. Use the same key-owner account and choose Top Up on Profile; mobile checkout.
ComfyUI connection refused
ComfyUI connection refused
- Make sure ComfyUI is running (
python main.pyin the ComfyUI directory) - Check that
COMFYUI_URLmatches the address shown when ComfyUI starts (default:http://127.0.0.1:8188) - If running on a different machine, ensure the port is accessible
ComfyUI generation fails
ComfyUI generation fails
- Open the ComfyUI web UI and check for error messages
- Use
comfyui_workflow viewto inspect the workflow nodes - Ensure the checkpoint model referenced in the workflow is actually downloaded
- Try running the workflow manually in ComfyUI first
Plugin not showing in tool list
Plugin not showing in tool list
- Make sure Node.js 22+ is installed
- Try running
npx -y meigen@2.0.0directly to check for errors - Restart your editor
- Check that the MCP configuration JSON is valid
Generation timeout
Generation timeout
Generation times vary by model — MeiGen Cloud image models typically finish in well under a minute; video generation takes longer, especially with reference-video continuation. Polling isn’t capped by a fixed 5- or 8-minute client timeout — it follows the server’s own progress signal, with only a 45-minute safety valve against a fully hung connection.If your session disconnects or polling is interrupted, recover with
check_generation using the original generationId or persisted UUID requestId. Preserve exact inputs and IDs; do not allocate a new ID on transient failure. See workflow recovery.ComfyUI generation is still capped at 5 minutes (depends on your local GPU).Changes to config not taking effect
Changes to config not taking effect
After modifying
~/.config/meigen/config.json or environment variables, you must restart your editor (or start a new Claude Code session) for changes to take effect.