
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 助理檢索學術論文、核驗參考文獻、查詢研究資料集與補助,並使用科學圖表工具。