media-gen-mcp
Generates images using Google's Nano Banana models (Gemini 3 Pro Image and Gemini 3.1 Flash Image) and videos using Google's Veo 3.1 models, accessed via a LiteLLM/OpenAI-compatible gateway.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@media-gen-mcpGenerate an image of a serene lake surrounded by autumn trees"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
media-gen-mcp
MCP server for AI image & video generation — Google Nano Banana (Gemini image) and Veo 3.1 (video) — routed through a LiteLLM / OpenAI-compatible gateway.
Inspired by hosted media MCPs like Higgsfield's: video generation is asynchronous with polling, and every asset comes back as a public URL (never inline base64), so agents can pass results around cheaply.
Tools
Tool | What it does |
| Text → PNG(s) with |
| Text (± reference image) → async Veo job. |
| Poll a job; on completion downloads the MP4 once, caches it, and returns its URL. |
| Browse recent generations (id, kind, model, prompt, URL), newest first. |
Related MCP server: MCP Veo 3 Video Generation Server
How it works
agent ──MCP──▶ media-gen-mcp ──OpenAI API──▶ LiteLLM ──▶ Gemini (Nano Banana / Veo)
│
└── saves PNG/MP4 to MEDIA_DIR, serves at /files/* → URL back to agentImages:
POST /v1/images/generations(returns base64; decoded and stored here).Videos:
POST /v1/videos→ pollGET /v1/videos/{id}→GET /v1/videos/{id}/content.
The LiteLLM deployment must expose the four model aliases (nano-banana-pro,
nano-banana-2, veo-3.1, veo-3.1-lite) — see LiteLLM image generation
and video passthrough docs for the gemini/ provider mappings.
Quickstart (Docker)
cp .env.example .env # fill in LITELLM_BASE_URL, LITELLM_API_KEY, MCP_BEARER, PUBLIC_URL
docker compose up -d --build
curl -s localhost:8156/healthzEndpoints
Path | Auth | Purpose |
|
| Streamable-HTTP MCP endpoint (stateless — safe for concurrent clients). |
| none (unguessable names) | Generated assets, immutable-cached. |
| none | Liveness probe. |
The bearer is mandatory — each generation spends real money, so /mcp must never be
exposed unauthenticated.
Environment
Var | Required | Description |
| ✅ | LiteLLM / OpenAI-compatible gateway base URL. |
| ✅ | Key for the gateway — prefer a virtual key scoped to the media models with a budget. |
| ✅ | Static bearer required on |
| ✅ | Public base URL used to build the asset links returned by tools. |
| — | Asset storage dir (default |
| — | Listen port (default 8000). |
Connecting a client
Any MCP client that supports Streamable HTTP + bearer headers:
{
"mcpServers": {
"media-gen": {
"url": "https://your-host/mcp",
"headers": { "Authorization": "Bearer <MCP_BEARER>" }
}
}
}For local/stdio use (claude mcp add media-gen -- node build/index.js), set the same env
vars in .env.
Development
npm install
npm run dev # HTTP entrypoint with hot reload
npm run typecheck
npm run smoke # initialize + tools/list against a running server
SMOKE_GENERATE=1 npm run smoke # also runs one real (paid) image generationLicense
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceProvides tools to interact with RunwayML and Luma AI APIs for video and image generation, including text-to-video, image-to-video, prompt enhancement, and management of generations.Last updated17
- Alicense-qualityDmaintenanceEnables video generation from text prompts or images using Google's Veo 3 API. Supports multiple models, audio generation, and various aspect ratios for creating high-quality videos.Last updated2MIT
- AlicenseAqualityFmaintenanceEnables AI assistants to generate images from text prompts and transform existing images using Google Gemini's nano banana model through the Nanana AI service. Supports both text-to-image generation and image-to-image transformation capabilities.Last updated23510MIT
- Alicense-qualityFmaintenanceEnables AI agents to generate, edit, and analyze images using Google's Gemini image generation models including Nano Banana Pro (gemini-3-pro-image-preview).Last updated14617MIT
Related MCP Connectors
Generate images, video, and audio with Glif's media-generation agent
Generate images, video, music and voice from your CLI or AI agent. On-brand AI media toolkit.
AI image, video & music generation. Flux, Veo 3.1, Suno V5. Free tier included.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AriOliv/media-gen-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server