Micu Image MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| XAI_MODEL | No | Grok 默认模型 | grok-imagine-image-lite |
| MICU_MODEL | No | image2 默认模型 | gpt-image-2 |
| MICU_API_KEY | Yes | 米醋 image2 token | |
| MICU_BASEURL | No | 米醋 base URL | https://www.micuapi.ai |
| MICU_SAVE_DIR | No | 默认输出目录 | ~/Pictures/micu-out |
| MICU_GROK_API_KEY | No | 米醋 Grok 图像 token | |
| MICU_SAVE_DIR_ROOT | No | 输出安全根目录 | 同输出目录 |
| MICU_GROK_SIZE_MODE | No | Grok 保存前尺寸归一化策略:contain / cover / stretch / backend | contain |
| MICU_USE_SHELL_PROXY | No | 设为 1 才读取 shell 代理 | 0 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| image_generateA | 文本生成图像(text-to-image)。米醋代理 + gpt-image-2 系列。 [WHAT] 把一段文字 prompt 渲染成 1 张或 N 张图像,落盘到本地。 [WHEN TO USE]
[SIZE 选取建议]
[PROMPT 写法建议]
Args: prompt: 图像描述。1-2000 字符。例:"A minimalist sushi mascot logo, soft pastel palette". size: "WxH" 字符串或 None。留 None 让 MCP 从 prompt 推(弱 LLM 兜底用); 强 LLM 已知偏好时直接显式传更准。W 和 H 都必须是 16 的倍数。常用: "1024x1024" "1280x720" "1024x1536" "1536x1024" "720x1280" ← 1K 档 "2048x2048" "2048x1152" "1152x2048" ← 2K 档(自动 gpt-image-2-openai) "3840x2160" "2160x3840" ← 4K 档(自动 gpt-image-2-openai) 默认 None(推断后兜底 1024x1024)。 n: 张数 1-10。1K 时 N>1 自动 5 并发;≥2K 强制 N=1(代理限流)。默认 1。 model: 显式指定模型。留空时按 size 自动选(max edge ≥1600 用 gpt-image-2-openai,否则 gpt-image-2)。 可选值:"gpt-image-2"(标准线路)/ "gpt-image-2-openai"(高质量线路)。 quality: 可选质量参数:"auto" / "low" / "medium" / "high";留空则使用后端默认值。 save_dir: 输出目录。必须在安全根目录 MICU_SAVE_DIR_ROOT 之下(默认 ~/Pictures/micu-out); 传 root 之外路径会被拒。留空使用默认。 basename: 文件名前缀(不带扩展名),仅允许 [A-Za-z0-9_-.]。 含 / .. 或路径分量会被拒。默认 "gen_"。 api_key: 覆盖 MICU_API_KEY 环境变量。一般留空。 注意:base_url 已锁在启动时 env,运行期不接受 tool 参数(防 key 外泄到攻击者 host)。 Returns: dict 含以下字段: ok (bool): 至少有 1 张成功才为 True。 model (str): 实际用的模型 id。 size (str): 请求的 size。 requested_n (int): 实际生成的张数。 saved (list[dict]): 每张成功的图。每项含 path(绝对路径)/ size_bytes / actual_size(PNG header 读出的真实像素)/ actual_megapixels。 errors (list[str]): 失败请求的错误描述。 notes (list[str]): 路由 / 自动决策 / 实测尺寸偏差的说明。 Examples: # 最简:默认 1024x1024 单张 image_generate(prompt="a red apple on white") Common errors and what to do: "size W/H 必须是 16 的倍数" → 客户端入口拒;例如 1920×1080 应改为 1920×1088 或推荐的 2048×1152。 "HTTP 524: timeout" → 已自动重试 3 次仍失败,建议改小 size 或稍后再试。 "未配置 API key" → 设置 MICU_API_KEY 环境变量或传 api_key 参数。 |
| image_editA | 图像编辑(image-to-image,单张输入)。当前线路支持 1K/2K/4K。 [WHAT] 接受 1 张本地图片 + 修改指令,输出修改后的图。 [WHEN TO USE]
[尺寸能力](2026-08-14 当前线路实测)
[当前线路]
[路由实现](实测确定)
[MASK 工作原理]
Args: prompt: 修改指令,越具体越好。例:"change the background to deep navy with stars, keep the subject pixel-identical". image_path: 输入图的绝对或相对路径。PNG / JPG / WebP 都支持。 mask_path: 可选 alpha mask PNG 路径,透明区即编辑区。所有尺寸均生效。 size: 输出 size。W/H 必须是 16 的倍数;总像素和长宽比规则见 server_info。 "1024x1024" "1280x720" "1024x1536" "1536x1024" "720x1280" ← 1K 档 "2048x2048" "2048x1152" "1152x2048" ← 2K 档(自动高质量线路) "3840x2160" / "2160x3840" ← 4K 档(自动高质量线路) 默认 "1024x1024"。 model: "gpt-image-2"(默认)/ "gpt-image-2-openai"(高质量线路,≥2K 自动切)。 save_dir: 输出目录(必须在安全根目录之下)。默认 ~/Pictures/micu-out 或 MICU_SAVE_DIR。 basename: 文件名前缀(仅 [A-Za-z0-9_-.])。默认 "edit_"。 api_key: 覆盖 MICU_API_KEY;base_url 已锁在启动期 env,运行期不接受。 Returns: dict 含: ok (bool): 是否成功。 model (str): 实际用的模型。 size (str): 请求 size。 used_fallback (bool): 为兼容既有返回结构保留;当前 Image2 模型固定为 False。 saved (dict): { path, size_bytes, actual_size, actual_megapixels }。 notes (list[str]): 决策与提示。 Examples: # 换背景 image_edit(prompt="replace background with a sunset beach", image_path="/p/portrait.jpg") Common errors: "image_path 不存在" → 检查路径,建议用绝对路径。 "HTTP 524" → 当前高质量队列繁忙;自动策略仍失败时请稍后再试。 |
| image_batch_editA | 批量图像编辑:N 张输入图 → N 张输出图,每张独立应用同一指令。 [WHAT] 对 image_paths 里的每一张图分别调用 image_edit,统一 prompt 与 size,结果合并返回。 [WHEN TO USE]
[并发策略]
[LIMITS]
Args: prompt: 应用到每张图的修改指令。例:"add a subtle watermark in bottom-right". image_paths: 输入图路径列表(绝对或相对)。 size: 输出 size,支持 1K/2K/4K;≥2K 自动使用高质量线路。默认 "1024x1024"。 model: "gpt-image-2" / "gpt-image-2-openai"。留空按 size 自动选。 save_dir: 输出目录(必须在安全根目录之下)。文件名 batch__.png。 api_key: 覆盖 MICU_API_KEY;base_url 已锁在启动期 env,运行期不接受。 Returns: dict 含: ok (bool): True 表示至少 1 张成功。 total (int): 输入图总数。 succeeded (int): 成功张数。 failed (int): 失败张数。 concurrency (int): 实际用的并发度(5 或 1)。 results (list[dict]): 每张图的详细结果(含 input 路径、saved.path、可能的 error)。 Examples: image_batch_edit( prompt="convert to pencil sketch style", image_paths=["/p/a.jpg", "/p/b.jpg", "/p/c.jpg"], size="1024x1024", ) |
| image_multi_referenceA | 多图融合参考 → 输出 1 张新图;当前线路支持 1K/2K/4K。 [WHAT] 输入 2-10 张参考图 + prompt,模型综合所有图的视觉信息后画 1 张全新的图。 与 image_batch_edit 的本质区别:batch 是 N 进 N 出(每张独立改),此 tool 是 N 进 1 出(综合参考)。 [WHEN TO USE]
[当前线路]
[路由实现]
[LIMITS](当前真实状态,会变化)
Args: prompt: 综合指令。例:"combine the colors from img1 and the composition from img2 into a sunset cityscape". image_paths: 2-10 张参考图路径(绝对或相对)。 size: 输出 size。支持 1K/2K/4K;≥2K 自动切高质量线路。 成功时以 saved.actual_size 和 size_honored 核对真实像素。默认 "1024x1024"。 model: "gpt-image-2"(默认)/ "gpt-image-2-openai"(高质量线路,≥2K 自动切换)。 save_dir: 输出目录(必须在安全根目录之下)。 basename: 文件名前缀(仅 [A-Za-z0-9_-.],含 / .. 会被拒)。默认 "multiref_"。 api_key: 覆盖 MICU_API_KEY;base_url 已锁在启动期 env,运行期不接受。 Returns: dict 含: ok (bool): 是否成功。 model (str): 实际用的模型。 n_references (int): 实际嵌入的参考图张数。 saved (dict): { path, size_bytes, actual_size, actual_megapixels }。 notes (list[str]): 决策与提示。 Examples: # 1K 综合参考 image_multi_reference( prompt="combine these into a single cinematic poster", image_paths=["/p/sketch.png", "/p/character.png", "/p/background.png"], ) Common errors: "至少需要 2 张参考图" → 1 张请用 image_edit。 "请求体超 X MB" → 减少图片数量或先压缩。 "HTTP 524" → 当前高质量队列繁忙;自动策略仍失败时请稍后再试。 |
| server_infoB | 返回当前 Image2 模型、参数约束、路由和安全边界。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: generate (text-to-image), edit (single image with optional mask), batch edit (N-to-N same operation), multi-reference (N-to-1 style fusion), and server_info (metadata). The WHEN TO USE sections explicitly disambiguate edge cases, making misselection unlikely.
The image tools follow a consistent image_ prefix pattern (image_generate, image_edit, image_batch_edit, image_multi_reference). However, server_info breaks the verb_noun convention, and image_multi_reference uses a noun rather than a verb, creating slight inconsistency. Still, the pattern is predictable and readable.
With 5 tools, the set is well-scoped for an image generation/editing server. Each tool covers a distinct workflow (single generation, single edit, batch edit, multi-reference fusion, and information), and none feel redundant or unnecessary. This is an ideal size for the domain.
The tool surface fully covers the core image workflows: generation from text, editing with masks and prompts, batch processing, multi-image reference fusion, and server configuration/limits. There are no apparent dead ends—any user request for image creation or modification can be routed to an appropriate tool. Missing operations like upscaling or dedicated background removal are achievable through existing tools (e.g., image_edit with mask or size parameters).