Micu Image MCP
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., "@Micu Image MCPgenerate an image of a sunset over mountains"
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.
米醋画图 MCP
把 米醋 的图像接口包装成 MCP server,让 Claude Code / Codex / Cursor 等 MCP 客户端直接生图、改图、批处理、多图参考。
默认使用 gpt-image-2 / gpt-image-2-pro。可选配置 MICU_GROK_API_KEY 后,也能走米醋 Grok 图像通道,当前实测模型包括:
grok-imagine-image-litegrok-imagine-imagegrok-imagine-image-progrok-imagine-image-edit
功能
Tool | 说明 |
| 文生图。米醋 image2 支持 1K / 2K / 4K;Grok 支持 1K / 2K 路由 |
| 单图参考/编辑。image2 走 edits 或 |
| 多张图逐张同指令处理 |
| 2-10 张参考图融合成 1 张新图;Grok 走 |
| 查看 base URL、模型、size 规则、重试策略、安全约束 |
第一次使用前,让 LLM 调一次 server_info,可以看到当前运行时配置和可用能力。
Grok 与 GPT Image2 功能差异
能力 |
| 米醋 Grok 图像模型 |
默认用途 | 主通道,覆盖文生图、图生图、批量编辑、多图参考 | 可选通道,适合快速文生图、单图参考、多图参考 |
可选模型 |
|
|
| 支持 1K / 2K / 4K;2K/4K 自动切 pro,强制 | 支持 1K / 2K 路由; |
| 1K 走 | 走 |
局部 mask | 仅 1K edits multipart 支持 alpha mask;2K 不支持 | 当前不支持 mask,传入会忽略并写入 |
| 2-10 张参考图;1K 稳定,2K 可能 fallback,4K 入口拒绝 | 2-10 张参考图走 |
| 支持 1K;non-pro 5 并发,pro 串行 | 当前不支持 Grok 批量逐张编辑 |
size 校验 |
| 只校验 |
实际输出尺寸 | ≥4MP 通常严格 1:1;≤2.25MP 会被代理处理到约 1.57MP | 不保证等于请求 |
重试/限流 | 2K/4K 使用跨进程锁,避免多个 MCP 同时打 pro 队列 | 不走高分辨率锁;可恢复错误仍自动重试并记录到 |
配置变量 |
|
|
一键安装
git clone https://github.com/Subaru486desuwa/micu-image-mcp.git
cd micu-image-mcp
python install.py脚本会:
检查 Python >= 3.10
安装依赖
交互配置米醋 API key、输出目录
可选配置米醋 Grok 生图 token
写入
~/.claude.json和~/.codex/config.toml启动 server 做一次 initialize 握手
非交互安装:
MICU_API_KEY=sk-... \
MICU_GROK_API_KEY=sk-... \
MICU_SAVE_DIR=~/Pictures/micu-out \
python install.py --yes常用选项:
python install.py --no-codex
python install.py --no-claude
python install.py --mirror tsinghua
python install.py --baseurl https://www.micuapi.ai安装完成后重启 Claude Code / Codex,让 LLM 调 server_info 验证。
Grok 路径
Grok 走米醋中转,base URL 默认仍是:
https://www.micuapi.ai只需要额外配置:
MICU_GROK_API_KEY=sk-...
XAI_MODEL=grok-imagine-image-lite
MICU_GROK_SIZE_MODE=containGrok 的 size 不套用 image2 的 8 倍数和 4096 边长约束。本地只检查 WxH 格式,然后映射为:
resolution:1k或2kaspect_ratio: 最接近的比例,如1:1、16:9、9:16
注意:Grok 后端返回像素不保证严格等于请求的 WxH。MCP 默认会在保存前用 Pillow 把 Grok 输出归一化到请求尺寸,MICU_GROK_SIZE_MODE 可选:
值 | 行为 |
| 默认。等比缩放,补边到请求尺寸,不裁主体 |
| 等比缩放并居中裁切,铺满请求尺寸 |
| 直接拉伸到请求尺寸,可能变形 |
| 不做本地后处理,保留 Grok 后端原始像素 |
建议仍优先用常见比例和不太小的边长,例如 1024x1024、1536x1024、1024x1536、1501x1001。过小或很奇异的比例可能被米醋 Grok 后端返回 500,MCP 会自动重试并在 notes 里记录。
Size 规则
image2 路径:
W/H 必须是 8 的倍数
W/H 必须在 256 到 4096 范围内
1K 福利档可能被代理处理到约 1.57MP
2K/4K 自动切
gpt-image-2-pro2K/4K 强制
n=1并加跨进程锁,避免多个 MCP 同时打爆 pro 队列
推荐 size:
档位 | 推荐值 |
1K |
|
2K |
|
4K |
|
Grok 路径:
不强制 8 倍数
当前按 1K / 2K 路由
4K 请求会映射到
resolution=2k
环境变量
变量 | 默认值 | 说明 |
| 空 | 米醋 image2 token |
|
| 米醋 base URL |
|
| image2 默认模型 |
| 空 | 米醋 Grok 图像 token |
|
| Grok 默认模型 |
|
| Grok 保存前尺寸归一化策略: |
|
| 默认输出目录 |
| 同输出目录 | 输出安全根目录 |
|
| 设为 |
兼容旧 Grok 变量 XAI_API_KEY / GROK_API_KEY,但推荐新配置统一使用 MICU_GROK_API_KEY。
手动配置
Claude Code:
{
"mcpServers": {
"micu-image": {
"command": "/path/to/python",
"args": ["/absolute/path/to/micu-image-mcp/server.py"],
"env": {
"MICU_API_KEY": "sk-...",
"MICU_GROK_API_KEY": "sk-...",
"MICU_SAVE_DIR": "/Users/you/Pictures/micu-out",
"MICU_SAVE_DIR_ROOT": "/Users/you/Pictures/micu-out",
"XAI_MODEL": "grok-imagine-image-lite"
}
}
}
}Codex:
[mcp_servers.micu-image]
command = "/path/to/python"
args = ["/absolute/path/to/micu-image-mcp/server.py"]
[mcp_servers.micu-image.env]
MICU_API_KEY = "sk-..."
MICU_GROK_API_KEY = "sk-..."
MICU_SAVE_DIR = "/Users/you/Pictures/micu-out"
MICU_SAVE_DIR_ROOT = "/Users/you/Pictures/micu-out"
XAI_MODEL = "grok-imagine-image-lite"This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/Subaru486desuwa/micu-image-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server