The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
MCP Image
MCP server for AI image generation and editing with automatic prompt optimization and quality presets. Supports Nano Banana (Gemini), OpenAI GPT Image, and BytePlus Seedream.
Install
git clone https://github.com/shinpr/mcp-imageInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →MCP Image Generator 🍌
Generate and edit images from Codex, Cursor, Claude Code, or any MCP client. mcp-image adds visual direction to your request before sending it to Gemini, OpenAI, or BytePlus Seedream.
Tell it what image to create or what to change in an existing image, and what it is for. The result is saved to disk and returned to your assistant.
What It Does
Before generating an image, mcp-image rewrites short requests into more specific prompts. It keeps what you asked for and fills in details such as composition, lighting, and camera angle. The more detail you provide, the less it changes.
You ask:
"A photo of a roast chicken dinner for a recipe site. It should look like it was actually cooked, and it should be partway through being carved so you can tell how juicy it is."
mcp-image sends to the image model:
"... a freshly roasted whole chicken resting on a rustic, seasoned wooden carving board. The chicken features deeply bronzed, blistered, and crispy skin ... It is partway carved, with one breast cleanly sliced open to reveal tender, steaming-hot white meat glistening with natural juices pooling slightly onto the board ... shallow depth of field with a softly blurred background."
Generated with Gemini using the default fast quality preset.
What carried through:
for a recipe site: one clear subject, with everything else kept subordinateactually cooked: blistered, uneven browning, rising steam, and drippings on the knifepartway through being carved: one breast sliced open, with the cut piece still resting against the birdhow juicy it is: juices pooling on the board and shallow depth of field around the cut
Compare the same request with prompt enhancement turned off
Baseline from the same request, with prompt enhancement disabled.
Set SKIP_PROMPT_ENHANCEMENT=true to send the original prompt to the image model unchanged.
Quick Start
You need Node.js 22 or later, an MCP-compatible client, and an API key for one image provider.
1. Get an API key
All three providers generate and edit images. Gemini is the default and requires the least configuration.
| Provider | Image size | Output format | Setup |
|---|---|---|---|
| Gemini (default) | 1K, 2K, 4K | Automatic | Get a key, then set GEMINI_API_KEY |
| OpenAI | 1K, 2K, 4K | PNG or JPEG | Get a key, then set IMAGE_PROVIDER=openai and OPENAI_API_KEY |
| BytePlus Seedream | 1K, 2K | PNG or JPEG | Get an AP region key, then set IMAGE_PROVIDER=seedream and ARK_API_KEY |
Google Search grounding is available with Gemini only. OpenAI may require organization verification before it can generate images.
The examples below use Gemini. Replace the provider settings if you prefer OpenAI or Seedream.
2. Configure your MCP client
Codex
Add this to ~/.codex/config.toml:
[mcp_servers.mcp-image]
command = "npx"
args = ["-y", "mcp-image"]
[mcp_servers.mcp-image.env]
GEMINI_API_KEY = "your_gemini_api_key_here"
IMAGE_OUTPUT_DIR = "/absolute/path/to/images"
Cursor
Add this to ~/.cursor/mcp.json for all projects, or .cursor/mcp.json in a project:
Similar plugs
Reverse engineer anything with agents, from app behavior down to native binaries.
Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io