# mcp-image — MCP Image Generation & Editing Server > mcp-image is an MCP server for image generation/editing with quality presets; verified 110★ and documents `npx -y mcp-image` configs for Cursor and Claude. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use ```bash # Cursor ~/.cursor/mcp.json (README example uses npx): # {"mcpServers":{"mcp-image":{"command":"npx","args":["-y","mcp-image"],"env":{"GEMINI_API_KEY":"...","IMAGE_OUTPUT_DIR":"/abs/path"}}}} # Or Claude Code: claude mcp add mcp-image --scope user --env GEMINI_API_KEY=your-api-key --env IMAGE_OUTPUT_DIR=/absolute/path/to/images -- npx -y mcp-image ``` ## Intro mcp-image is an MCP server for image generation/editing with quality presets; verified 110★ and documents `npx -y mcp-image` configs for Cursor and Claude. **Best for:** Teams who want a reusable MCP image tool with per-request quality controls and saved outputs **Works with:** Any MCP client (Cursor/Codex/Claude Code) + Gemini API key or OpenAI API key (provider switch) **Setup time:** 6-15 minutes ### Key facts (verified) - GitHub: 110 stars · 19 forks · pushed 2026-05-13. - License: MIT · owner avatar + repo URL verified via GitHub API. - README-backed entrypoint: `npx -y mcp-image`. ## Main - Treat output paths as part of the contract: set `IMAGE_OUTPUT_DIR` to an absolute path so every generated image is saved and reviewable. - Pick a quality preset for your workflow: use fast for iteration, balanced for most work, and quality only for final deliverables (README preset table). - If you use OpenAI mode, keep provider env vars isolated and never commit keys; test with a single prompt first to verify permissions and output formats. ### Source-backed notes - README documents MCP configs for Codex (`~/.codex/config.toml`) and Cursor (`~/.cursor/mcp.json`) using `npx -y mcp-image`. - README lists quality presets with a speed hint for `fast` (~30–40s) and env var control via `IMAGE_QUALITY`. - README includes a Claude Code setup command (`claude mcp add ... -- npx -y mcp-image`) and notes `IMAGE_OUTPUT_DIR` must be an absolute path. ### FAQ - **Do I need OpenAI to use it?**: No — README says Gemini is the default provider; OpenAI is optional via `IMAGE_PROVIDER=openai`. - **Where do images go?**: To `IMAGE_OUTPUT_DIR` (absolute path) per README; the server creates the directory if missing. - **How do I control speed vs quality?**: Use presets via `IMAGE_QUALITY` (fast/balanced/quality) as documented in README. ## Source & Thanks > Source: https://github.com/shinpr/mcp-image > License: MIT > GitHub stars: 110 · forks: 19 --- ## Quick Use ```bash # Cursor ~/.cursor/mcp.json (README example uses npx): # {"mcpServers":{"mcp-image":{"command":"npx","args":["-y","mcp-image"],"env":{"GEMINI_API_KEY":"...","IMAGE_OUTPUT_DIR":"/abs/path"}}}} # Or Claude Code: claude mcp add mcp-image --scope user --env GEMINI_API_KEY=your-api-key --env IMAGE_OUTPUT_DIR=/absolute/path/to/images -- npx -y mcp-image ``` ## Intro mcp-image 是用于图像生成/编辑的 MCP server,提供质量预设并可切换 provider;已验证 110★,并给出 Cursor/Codex/Claude Code 的 `npx -y mcp-image` 配置示例。 **Best for:** 希望把图像能力做成可复用 MCP 工具,并可控质量与落盘输出的团队 **Works with:** 任意 MCP 客户端(Cursor/Codex/Claude Code)+ Gemini 或 OpenAI API key(可切换 provider) **Setup time:** 6-15 minutes ### Key facts (verified) - GitHub:110 stars · 19 forks;最近更新 2026-05-13。 - 许可证:MIT;作者头像与仓库链接均已通过 GitHub API 复核。 - README 中可对照的入口命令:`npx -y mcp-image`。 ## Main - 把输出路径当作契约:设置 `IMAGE_OUTPUT_DIR` 为绝对路径,让每张生成图都能落盘可追溯。 - 按工作流选择质量档位:fast 用于迭代、balanced 用于常规、quality 只在最终交付时启用(README 表格)。 - 使用 OpenAI 模式时,把 provider 环境变量隔离并避免提交 key;先用一个最小 prompt 验证权限与输出格式。 ### Source-backed notes - README 给出 Codex(`~/.codex/config.toml`)与 Cursor(`~/.cursor/mcp.json`)的 MCP 配置示例,命令为 `npx -y mcp-image`。 - README 列出质量预设,并给出 `fast` 的速度提示(约 30–40 秒),且可通过 `IMAGE_QUALITY` 控制。 - README 提供 Claude Code 的安装命令(`claude mcp add ... -- npx -y mcp-image`),并强调 `IMAGE_OUTPUT_DIR` 必须为绝对路径。 ### FAQ - **必须用 OpenAI 吗?**:不必。README 说明默认是 Gemini;OpenAI 仅作为可选 provider(`IMAGE_PROVIDER=openai`)。 - **图片会保存到哪里?**:按 README:保存到 `IMAGE_OUTPUT_DIR`(绝对路径);目录不存在会自动创建。 - **如何控制速度与质量?**:按 README:通过 `IMAGE_QUALITY` 选择 fast/balanced/quality。 ## Source & Thanks > Source: https://github.com/shinpr/mcp-image > License: MIT > GitHub stars: 110 · forks: 19 --- Source: https://tokrepo.com/en/workflows/mcp-image-mcp-image-generation-editing-server Author: MCP Hub