ImageGen MCP
Provides tools for generating and editing images through OpenAI-compatible /v1/images/generations and /v1/images/edits endpoints, supporting configurable models, sizes, quality levels, and local image saving.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
bigyellow12138 生图 MCP
一个零依赖的 stdio MCP,用来生成图片和编辑图片。
默认内置 BigYellow 中转,也可以指向任意 OpenAI 兼容 的中转地址
两个模型:
gpt-image-2.5-flare(快)、gpt-image-2.5-sunburst(精度高)尺寸:
1K/2K/4K(真实 4096×4096)/auto/ 自定义宽x高注意:
1K/2K/4K是正方形预设(1024²、2048²、4096²)要竖图/横图比例,传
宽x高,比如1536x2048改图时不传
size,会自动沿用原图尺寸
质量:
low/medium/high/xhigh/max/auto支持图生图/编辑:把本地图片路径放进
images[]生成后保存到本地,返回绝对路径
快速开始
默认中转(只填令牌)
{
"mcpServers": {
"imagegen": {
"command": "npx",
"args": ["-y", "@bigyellow12138/imagegen-mcp"],
"env": {
"IMAGE_API_TOKEN": "sk-你的令牌"
},
"timeoutMs": 180000
}
}
}换成其他中转
"env": {
"IMAGE_API_TOKEN": "sk-对方中转的令牌",
"IMAGE_API_BASE_URL": "https://对方中转域名/v1"
}IMAGE_API_BASE_URL 不带 /v1 会自动补;带 /v1 就用原样。只要对方兼容 OpenAI 的 /v1/images/generations 和 /v1/images/edits 就能用。
Related MCP server: mcp-vision-server
配置项
环境变量 | 必填 | 默认值 | 说明 |
| ✅ | — | 中转令牌( |
| 内置 BigYellow 地址 | 任意 OpenAI 兼容中转,例如 | |
| 见下方“保存位置” | 图片保存目录,自动创建 | |
|
| 默认模型 | |
|
| 默认质量 | |
|
| 单次请求超时 | |
|
| 429/5xx/1010 自动重试次数 |
兼容旧变量名:
BIGYELLOW_TOKEN/BIGYELLOW_BASE_URL仍然可用。
图片保存位置
按优先级:
调用时传
outputDir→ 存到该目录配了
IMAGE_OUTPUT_DIR→ 用它客户端在项目目录里启动 MCP(进程 cwd 是项目路径)→ 存到
<项目>/ai-images以上都没有 →
~/ai-images(Windows 为C:\Users\<用户名>\ai-images)
说明:Claude Code / Codex / Cursor 一般会把项目目录作为 MCP 进程的 cwd,所以默认会存进项目; Harness(DSH)的 cwd 固定在
~/.dsh/profiles/desktop,因此会回退到~/ai-images。 在 Harness 里想存进项目,配IMAGE_OUTPUT_DIR或让模型传outputDir即可。
大模型知道自己当前的工作目录,所以最简单的方式是在提示词里说“存到项目里”,然后由模型把项目路径传给 outputDir,例如:
generate_image({ prompt: "...", outputDir: "<当前项目>/assets" })工具参数(generate_image)
参数 | 类型 | 说明 |
| string,必填 | 描述要画什么;有 |
| string |
|
| string |
|
| string |
|
| integer | 生成张数 1–4,默认 1 |
| string[] | 本地图片路径,传了就走图生图编辑 |
| string | 可选,指定保存目录(适合让图片进入当前项目) |
| string | 可选,指定第一张图的输出路径 |
改图的正确写法
编辑是重新生成,不是像素级修改,所以提示词要同时写清楚两件事:
改什么:例如「把背景换成雪山日落」
什么必须不变:例如「人物、姿势、服装、构图保持不变」
建议:
一次只改一个点,改完再继续下一轮
精细改图优先用
gpt-image-2.5-sunburst需要保持原图比例时,直接不传
size(会自动沿用原图尺寸)
使用示例
帮我画一张:雨夜的东京小巷,霓虹灯反射在积水里,电影感,4K把 images/photo.png 里人物的背景换成雪山日落,其他保持不变用 sunburst 模型,把这张图的产品换成磨砂黑材质,保持构图不变常见问题
403 / error 1010:Cloudflare 浏览器完整性检查拦截,需要在站点给
/v1/*放行。超时:把客户端
timeoutMs和REQUEST_TIMEOUT_MS调大;4K 单张可能超过 60 秒。找不到图片:看返回文本里的完整路径;Windows 默认在
%USERPROFILE%\ai-images。4K 文件很大:4096×4096 PNG 约 15–20MB,正常。
换中转后报 404:确认对方支持
/v1/images/generations和/v1/images/edits,以及IMAGE_API_BASE_URL是否包含了正确的路径前缀。
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Generate images from Claude, ChatGPT, Cursor and Codex with 12 top AI image models. Up to 4 images per call, SVG vectorization, background removal, upscaling and image-to-video. Remote MCP with OAuth, no API keys.
Generate images from Claude, ChatGPT, Cursor and Codex with 12 top AI image models and 10 tools: up to 4 images per call, SVG vectorization, editing and more. Remote MCP with OAuth, no API keys. Pay per image, no subscription.
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Generate and edit images (PNG, transparent, GIF, SVG) with GPT Image and Nano Banana models.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables image generation and editing via third-party relay services. Returns local file paths and Markdown display hints.-
- AlicenseAqualityDmaintenanceEnables image analysis, OCR, and text-to-image generation through OpenAI-compatible APIs. Supports local paths, URLs, or base64 images with configurable models and backup endpoints.331 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to generate and edit images through any OpenAI-compatible image API, saving results as local files and returning absolute paths for immediate use.14 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables generating and editing images from any MCP client by expanding short requests into detailed visual prompts, then saving the results to disk and returning them as resources. Supports Gemini, OpenAI GPT Image, and BytePlus Seedream with quality presets, aspect ratios, up to 4K output, and options for character consistency and Google Search grounding.2,138 npmMIT