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, search a curated 1,446-prompt gallery, and enhance prompts — all through natural language.

Providers

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

MeiGen Cloud

Hosted multi-model API. 9 image and video models: GPT Image 2, Nanobanana Pro/2, Seedream, Midjourney V8.1, Flux 2 Klein, Seedance 2.0, Happyhorse 1.0, Veo 3.1. No GPU required — just an API key.

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.
ProviderTypeCostBest For
MeiGen CloudHosted APICredits (pricing)Multi-model access, zero setup
ComfyUILocal GPUFree (your hardware)Full control, custom workflows, privacy
Bring Your Own APIOpenAI-compatibleVaries by serviceExisting API keys, any provider
Provider priority: When multiple providers are configured, MeiGen selects in this order: MeiGen Cloud → ComfyUI → OpenAI-compatible. You can override this per-request.

Tools

8 MCP tools, six of which are free without any provider:
ToolDescriptionRequires Provider?
generate_imageGenerate images using any configured providerYes
generate_videoGenerate videos via MeiGen platform (Seedance 2.0 fast/pro, Happyhorse 1.0, Veo 3.1). Text-to-video and first/last-frame image-to-video.Yes (MeiGen)
enhance_promptTransform a brief idea into a detailed, professional promptNo
search_gallerySearch 1,446 curated AI art prompts from the communityNo
get_inspirationGet the full prompt and images for any gallery entryNo
list_modelsList available models across all configured providersNo
manage_preferencesSave default style, aspect ratio, and favorite promptsNo
comfyui_workflowImport, view, modify, and delete ComfyUI workflow templatesNo

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:
export MEIGEN_API_TOKEN=meigen_sk_...
npx meigen gen --prompt "a calico cat in a sunlit kitchen"
npx meigen gen -p "logo design" -m midjourney-v8.1 -r 1:1 --json
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.