
Muse Image
io.github.kevintsai1202由 GitHub 账号 kevintsai1202 发布v0.1.3更新于 Oct 24, 2026
Generate, edit and iteratively refine images with Meta Muse, returning file paths not base64.
发布方自己的服务:muse.space
概览
本地 MCP 服务器,让助手用 Meta Muse 模型生成、编辑并多轮迭代图片,图片保存到磁盘并返回文件路径。
- 可以做什么
- 根据文字提示生成图片,每次可生成一至十张,可设置宽高比、格式和模型。以本地文件或网址作为参考图来编辑现有图片。通过复用响应 ID 在多轮对话中持续调整同一张图片。把每张结果保存到本地输出目录,返回绝对文件路径而不是图片数据。在每次响应中报告该次调用的预估费用。
- 适用场景
- 适合希望在对话中让助手生成或修改图片、又不想让 base64 数据占满上下文的情况,前提是已有或愿意申请 Meta Model API 密钥。
- 运行要求
- 通过 npm 包以 stdio 在本地运行,需要 Node.js 20.12.0 或更高版本。需要以环境变量 MUSE_API_KEY 提供 Meta Model API 密钥,并能访问 Meta 的 API。可选变量可设置默认模型、输出目录、基础地址、超时和额外参数。
安装
在 SourceWeft 中
- 打开 控制台中的 Muse Image,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
muse-image-mcp
An MCP server that gives any MCP-capable agent — Claude Code, Claude Desktop, Cursor — image generation powered by the Meta Muse image model.
What it does
Three tools, covering the full loop of working with images in a conversation:
Why this server
Your context window survives. Every tool writes images to disk and returns an absolute file path — never the image bytes. Generating a dozen images costs you a dozen lines of context instead of a dozen megabytes of base64. When you actually want to look at an image, open the path with a file-reading tool.
Multi-turn refinement without state. iterate_image returns a response_id; feed it back as previous_response_id and the next turn continues the same conversation. The server itself stores nothing — conversation state lives on Meta's side, so the server stays restartable and stateless.
New models don't require a new release. Switch models with MUSE_MODEL or a per-call model parameter, and pass parameters this server has never heard of through extra_params. Fields that determine request structure are protected from being overwritten; everything else is a deliberate escape hatch.
You always know what it cost. Every response ends with the estimated cost of that call.
Requirements
- Node.js >= 20.12.0
- A Meta Muse API key
Getting an API key
Muse Image runs on the Meta Model API, so you register with Meta — not with this project:
- Go to https://dev.meta.ai and sign in to the Meta Model API dashboard.
- Open API keys.
- Click Create API key and copy the value.
That value is what you pass as MUSE_API_KEY below. Meta's own documentation calls this variable MODEL_API_KEY; this server reads it as MUSE_API_KEY, talks to https://api.meta.ai/v1, and defaults to the model muse-image-1.0.
Reference: Model API docs · Image generation · Muse Image announcement
Keep the key out of source control — use the MCP config's env block or a .env file, both described below.
Install
Option 1: npx (recommended — no clone required)
npx fetches and runs the latest version on demand — nothing to install first.
--scope userapplies it to every project; use--scope localfor the current project only.-yskips npx's install prompt. Without it the server hangs on an interactive question and the handshake fails.- Everything after
--is the launch command;--envbefore it belongs toclaude mcp add.
For other MCP clients (Claude Desktop, Cursor), write the config by hand:
On Windows, if npx can't be found, use "command": "cmd" with "args": ["/c", "npx", "-y", "muse-image-mcp"].
Option 2: Local clone (when you want to change the code)
After installing
Start a new session — MCP servers are loaded at session start, so an existing session won't pick it up. Then confirm with claude mcp list, which should show muse-image: ... - Connected, and check that the three mcp__muse-image__* tools are available.
Configuring the API key
Precedence is the env block in your MCP config > a .env file.
Using the MCP config env block (the only route when installed via npx)
See --env MUSE_API_KEY=your-key above.
Using a .env file
The server searches these locations in order and uses the first one that exists:
<package root>/.env— convenient for a local clone~/.muse-image-mcp/.env— the only location you control when installed via npx
Note that .env is not read from the directory you launched Claude Code in — an MCP server's working directory is decided by the client, which makes it a poor place for configuration. When installed via npx the package itself lives in a hashed npm cache directory that gets cleaned up, so a .env there would be pointless.
Environment variables
All of these work in either .env or your MCP config's env block.
The
cwdinMUSE_OUTPUT_DIR's default is the working directory the MCP client launched the server from. In Claude Code that's the project root of your session, so images land in that project'sgenerated-images/. If your client behaves differently, or you want a fixed location, setMUSE_OUTPUT_DIRto an absolute path.Since v0.1.0 the default output directory changed from
muse-output/togenerated-images/. The old directory is not deleted or migrated automatically.
Switching models and passing new parameters
When a new model ships you don't have to wait for this project to update — switch models with an environment variable, send new parameters through extra_params.
Switching models
Globally, in .env or your MCP config:
Per call, just ask for it in conversation and the agent will pass model:
Passing new parameters
Global defaults as a JSON object string:
Per-call overrides via extra_params, merged with the global setting — the per-call value wins:
Protected core fields
model, prompt, response_format, images, input, store, and previous_response_id determine the structure of the request and cannot be overwritten by extra_params. Setting them there has no effect, and the response will end with a warning listing the ignored keys.
To change models, use the model parameter or MUSE_MODEL — not extra_params.
Outside those core fields, extra_params does override same-named regular parameters, including n, size, output_format, and reasoning_strength. The tool schema's validation for these (for example n being limited to 1–10) does not apply on this path — that's a deliberate escape hatch so a future model that changes parameter semantics isn't blocked by today's limits. When overriding n this way, watch your image count and cost.
Tools
Every tool saves images locally and returns absolute paths, never the image content itself — this keeps base64 out of your conversation context. Open the path with a file-reading tool when you want to see the image.
generate_image — text to image
edit_image — edit from reference images
iterate_image — conversational refinement
This tool has no n parameter — the /v1/responses endpoint returns one image per turn. It does support size and output_format, but they travel inside the request's tools entry rather than at the top level; see the findings below.
The response always includes a response_id. Pass it as previous_response_id on the next call to continue the same conversation. This server stores no conversation state; Meta does.
Findings from /v1/responses
Request body: per-image settings live inside tools
reasoning_strength, size and output_format are not top-level parameters on this endpoint — they belong to the image_generation tool entry. Sending reasoning_strength at the top level is not merely ignored; the API rejects the whole request:
The correct shape:
Versions up to 0.1.0 sent reasoning_strength at the top level, which made iterate_image fail on every call. generate_image and edit_image were never affected — they use /images/generations and /images/edits, where these are legitimate top-level parameters.
This also corrects an earlier claim in this README: size and output_format are supported here. Specifying output_format: "png" returns a genuine PNG (verified by the base64 header) rather than the endpoint's webp default. Only n is genuinely unavailable — one image per turn.
scripts/probe-responses-api.mjs reproduces all of this against the live API, one hypothesis per case.
Response shape
Meta doesn't publish the response schema for /v1/responses. The original implementation was an educated guess modeled on OpenAI's Responses convention; it was later verified against real API calls. The actual structure:
Differences from the guessed shape:
idlocation:raw.idwas correct, confirmed by testing. No change needed.- Image data location: not in any
b64_jsonfield, but in theresultfield of theoutput[]entry wheretype === "image_generation_call", as raw base64 with no data URL prefix.src/muse-client.ts'sextractB64Imagesnow recognizes bothb64_json(kept for other possible shapes) and this verified shape. - No
output_formatfield: the response has none. The original fallback default of"png"was wrong — since the iterate request doesn't send anoutput_formatparameter, Meta applies the same default as/images/generations, which iswebp. The returned base64 decodes to a genuine WebP file (RIFF/WEBP header). The fallback is now"webp".
Multi-turn conversation is verified
Two real API calls were made in sequence: one iterate_image to obtain a response_id, then a second call using that id as previous_response_id. The second turn returned only the one image generated in that turn — it did not re-send the first turn's image. extractB64Images's deep-traversal logic needed no changes for this.
(The test tooling in that run didn't capture the second turn's raw response byte-for-byte, so this conclusion rests on filesystem evidence — exactly one output file, with no -2/-3 suffixes — rather than a byte-level comparison. The pinning test added in tests/muse-client.test.ts uses the real response shape verified earlier.)
Pricing
US$0.01 per generated image, regardless of reasoning_strength. Every tool response discloses the estimated cost of that call.
This server is free and MIT-licensed — you pay Meta for API usage, nothing else.
Development
License
MIT © Kevin Tsai
来源:README.md,提交 efdff86
工具
0版本历史
1- v0.1.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Muse 集成
muse.space
space.muse官方发布者
一个远程 MCP 服务器,让 AI 助手通过操作而非密码来使用 iCloud 邮件、日历和通讯录。

Muse Marketplace
由 GitHub 账号 CloudCorpRecords 发布
Muse Marketplace 注册表的 MCP 服务器:让助手搜索、查看、校验并安装可分享的 Muse 头像、人格、语音和资源包。

AisleNode Local Commerce (Meta Muse & Claude MCP)
由 GitHub 账号 marvo-bd 发布
把 AI 助手接入本地实体零售店的实时库存,可搜索附近有货商品、预留商品并生成结账链接。

MuseCourt
由 GitHub 账号 danbuildss 发布
MuseCourt 是面向自主智能体的远程 MCP 法庭:可立案、提交证据、辩论、和解,并由法官智能体作出裁决。

ScholarMuse
由 GitHub 账号 TopLocalAI 发布
托管型 MCP 端点,让 AI 助手检索学术论文、核验参考文献、查询科研数据集与基金,并使用科学图表工具。