imaginate-mcp
Generates and edits images with Google Gemini (Nano Banana) models, including semantic inpainting, style transfer, multi-image composition, optional Google Search grounding, and iterative refinement via interaction IDs.
Generates and edits images with OpenAI GPT Image models, supporting image generation, editing, inpainting with masks, and multi-image composition.
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., "@imaginate-mcpgenerate a photorealistic red fox in a snowy forest at sunset"
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.
imaginate-mcp
An MCP server that generates and edits images with OpenAI GPT Image and Google Gemini (Nano Banana). It runs over stdio, saves every image to disk, and hands back the file path so your assistant can keep working with the result.
What you get
Six tools, split by provider:
Tool | What it does |
| Text to image with GPT Image models |
| Edit one image, inpaint with a mask, or compose several references |
| Model IDs, strengths, and limits |
| Text to image with Nano Banana models, with optional Google Search grounding |
| Edit, style transfer, semantic inpainting, or multi-image composition |
| Model IDs, reference image limits, and resolution tiers |
Only the tools for the keys you configure get registered. If you set OPENAI_API_KEY and nothing else, your assistant sees three tools and none of them can fail on a missing Google key. That was the main reason for splitting the tools by provider instead of using one tool with a provider argument.
Related MCP server: MCP OpenAI Image Generation Server
Requirements
Node.js 20 or newer
An OpenAI API key, a Gemini API key, or both
GPT Image models need OpenAI API organization verification. If you have not done that, OpenAI rejects the request and the server tells you so.
Connect
Run the published package with npx. You do not need to clone the repository or install the package globally.
npx -y @pinkpixel/imaginate-mcpAdd the server to your client's config. For Claude Desktop, edit claude_desktop_config.json. For Claude Code, use .mcp.json in your project or your user settings.
{
"mcpServers": {
"imaginate": {
"command": "npx",
"args": ["-y", "@pinkpixel/imaginate-mcp"],
"env": {
"OPENAI_API_KEY": "sk-...",
"GEMINI_API_KEY": "...",
"IMAGINATE_OUTPUT_DIR": "~/Pictures/imaginate"
}
}
}
}Restart the client after you edit the config. If no image tools appear, call imaginate_setup_help. That tool only exists when no provider key was found, and it lists the variables you still need to set.
Run from source
Clone and build the repository if you want to work on the server locally:
git clone https://github.com/pinkpixel-dev/imaginate-mcp.git
cd imaginate-mcp
npm install
npm run build
node dist/index.jsTo connect an MCP client to this build, use "command": "node" and set args to the absolute path of dist/index.js.
Configuration
Every variable is read once at startup, so restart the client after you change one.
Variable | Required | Default | What it does |
| One key required | none | Registers the |
| One key required | none | Registers the |
| no |
| Where images are saved. A leading |
| no |
| Model used when a call does not name one |
| no |
| Model used when a call does not name one |
| no | OpenAI's default | Point at an OpenAI-compatible proxy |
Any tool call can override the output directory with output_dir and the file name with filename.
How the files work
Images go to the output directory. The server never overwrites anything. A file named cat.png that already exists becomes cat-1.png, then cat-2.png.
Default names look like openai-a-red-fox-20260825-134512-071.png. That is the provider prefix, a slug of your prompt, and a timestamp. Pass filename if you want something specific.
Source images for edits must be local files. Pass absolute paths. The tools do not download remote URLs, so fetch the file first if it lives on the web. Source files are read only and never modified.
Using it
Once the server is connected you mostly talk to your assistant normally. A few things worth knowing.
Picking a provider
Both providers are good, at different things.
Gemini is stronger on text inside images, world knowledge, and infographic work, and it can ground on live Google Search results before it draws. It also returns an interaction ID, so you can keep refining an image without uploading it again.
GPT Image follows detailed layout instructions well and gives you fine control over size, quality, and background. It is the one to use when you need a transparent background, though for that you need gpt-image-1.5 or older because gpt-image-2 dropped it.
Iterating on a Gemini image
Every Gemini result includes an interaction ID. Pass it back as previous_interaction_id on the next gemini_edit_image call and skip re-sending the image:
gemini_generate_imagewith your prompt. The result includes an interaction ID.gemini_edit_imagewithprevious_interaction_idand a prompt like "make it landscape."
This is cheaper than re-uploading and keeps the image more consistent between rounds.
Editing and composing
Both *_edit_image tools handle several jobs through the same interface. Pass one image path to edit that image. Pass several to combine them into a new scene.
For masked inpainting the two providers differ. OpenAI wants a real mask PNG with an alpha channel, passed as mask. Gemini does it semantically, so you just say "change only the sky and keep everything else exactly the same" and skip the mask file.
Reference image limits depend on the Gemini model: 14 on Lite, 10 on Nano Banana 2, 6 on Pro. Call gemini_list_image_models if you are not sure.
Development
npm run build # compile to dist/
npm run watch # compile on change
npm run typecheck # types only, no output
npm test # compile tests and run themTests use the built-in Node test runner. They cover the file naming and saving logic, the Gemini response parsing, and the error message mapping. They do not call either API, so you can run them without keys.
The layout:
src/
index.ts entry point, conditional tool registration
config.ts environment parsing
lib/ file handling, errors, result formatting, model catalog
providers/openai/ OpenAI client wrapper and tool definitions
providers/google/ Gemini client wrapper and tool definitions
tests/Limitations
Source images must be local files. No remote URLs.
Streaming and partial images are not wired up. A call returns when the image is done.
Gemini does not reliably honor a requested image count, so ask for one image per call. The OpenAI tools take
nand that works normally.OpenAI can take up to two minutes on a complex prompt. That is the API, not the server.
Every Gemini image carries an invisible SynthID watermark.
Model IDs and pricing move fast on both providers. The list tools describe what this version knows about, which may drift from what your account can actually reach.
License
Apache 2.0. See LICENSE.
Made with π by Pink Pixel
Available Tools
1 toolimaginate_setup_helpImaginate setup helpARead-onlyIdempotent
Explain why this server currently has no image generation tools and how to enable them.
This tool only exists when no image provider API key is configured. Call it if you expected image generation tools and cannot find any.
Args: none.
Returns: The environment variables to set and where to set them.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, and non-destructive behavior. The description adds that the tool returns the environment variables to set and where to set them, plus the precondition for its existence. This gives the agent concrete expectations beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four short sentences each carry necessary information: purpose, existence condition, usage trigger, and return value. The structure is front-loaded with the core purpose and contains no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Even without an output schema, the description fully covers what the tool does, when to invoke it, and what it returns. For a zero-parameter informational tool, an agent has everything needed to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and schema coverage is 100%, so there is nothing meaningful to add. The description redundantly states 'Args: none,' which is harmless but adds no semantic value. The zero-parameter baseline of 4 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific purpose: explaining why the server lacks image generation tools and how to enable them. The conditional existence context makes the tool's role unmistakable even without sibling tools to compare against.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says the tool only exists when no image provider API key is configured, and instructs agents to call it if expected image generation tools cannot be found. This is a clear, actionable when-to-use rule.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v1.0.0- First observed
imaginate_setup_help
TDQS
With only one tool available, there is zero ambiguity in tool selection. The lone tool's purpose is clearly stated and distinct from any hypothetical generation tools it replaces.
The single tool name 'imaginate_setup_help' follows a consistent pattern of server name plus action, and since there is only one tool, there are no naming inconsistencies to evaluate.
A server named 'imaginate' with only a setup help tool is severely under-provisioned for its apparent purpose. Image generation typically requires multiple operational tools, so having only one explanatory tool is an extreme mismatch.
The server provides no actual image generation capabilities at allβthe only tool explains how to configure an API key. This is a severely incomplete surface for the stated domain, leaving agents unable to perform any core task.
Maintenance
Related MCP Connectors
Generate images with any major model β one API key, one prepaid balance, one MCP.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Edit images over MCP with object removal, background removal, and guided generative edits.
Generate AI images and videos from any compatible MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides tools for generating and editing images using OpenAI's gpt-image-1 model via an MCP interface, enabling AI assistants to create and modify images based on text prompts.15Apache 2.0
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to generate and edit images through OpenAI's DALL-E models via MCP tools. Supports text-to-image generation and image-to-image editing with configurable parameters for size, quality, and style.-
- AlicenseAqualityAmaintenanceGenerates and edits images via Gemini, Grok, and GPT-image providers for MCP clients like Claude Code that lack native image generation.319MIT
- AlicenseAqualityCmaintenanceEnables LLMs to generate images via MCP by calling AI models from providers like SiliconFlow, OpenAI, or custom APIs, with tools for image generation and model listing.2MIT
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/pinkpixel-dev/imaginate-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server