
Forge MCP
io.github.frmoded由 GitHub 帳號 frmoded 發布v0.2.0更新於 Oct 24, 2026
MCP server + tools for the Forge E-- generative-music authoring loop (compile / run / commit).
概覽
讓助理撰寫、編譯、執行並提交 Forge E-- 生成式音樂 Recipe,可讀取音符目錄與 vault,並把完成的 Recipe 寫回。
- 可以做什麼
- 圍繞 Forge E-- 生成式音樂創作流程提供六個工具。讀取類工具列出音樂庫音符及其 E-- 簽章,並列出 vault 音符及 has_recipe 與 recipe_version 摘要。創作類工具把 Recipe 原始碼編譯為 Python,在資源受限的沙箱中執行並回傳預覽與 run_id,還可取得先前執行的完整 stdout、stderr 與產物清單。提交工具把 Recipe 寫入 vault 音符並遞增 recipe_version,透過 expected_version 實現樂觀並行控制。資源可提供音樂庫音符、執行產物以及帶版本的 Recipe 內容。
- 適用情境
- 當助理需要端到端地起草、驗證、執行並儲存 Forge E-- 音樂 Recipe,而不只是討論它們時使用。適合助理面對本機 Forge vault 與 forge-transpile 服務工作的情境,例如從目錄中挑選晶片、編譯、預覽產物,再把 Recipe 提交到音符。
- 執行需求
- 以 stdio 本機程序執行,從 PyPI 安裝 forge-recipe-mcp 並以 uvx 啟動。需要 FORGE_TRANSPILE_URL 指向 forge-transpile 服務(預設 指向可寫入的本機 vault 目錄,以及透過 Authorization 標頭逐次提供的 Bearer 權杖,或作為開發備援的 FORGE_MCP_BEARER。選用的 FORGE_MCP_HOST 與 FORGE_MCP_PORT 控制綁定。僅支援桌面用戶端。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Forge MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
forge-mcp
Author, compile, run, and commit generative-music E-- Recipes directly from any MCP-capable agent (Claude Desktop, Cursor, …). forge-mcp exposes the Forge E-- library note catalog + vault as an MCP server and closes the authoring loop end-to-end: the agent picks a chip from the catalog, drafts a Recipe, verifies it parses, runs it in a sandbox, previews the artifact, and commits the finished Recipe to a vault note. All 6 tools ship today.
Install into Claude Code
Fastest path — Claude Code spawns forge-mcp as a stdio subprocess. Full walkthrough at docs/claude-code-install.md.
Install (other clients)
Full walkthrough (Claude Desktop config, forge-transpile Bearer acquisition, verification smoke, troubleshooting): docs/install.md.
Quick paths:
Environment:
FORGE_TRANSPILE_URL— base URL of the forge-transpile service. Default:http://localhost:8000.FORGE_VAULT_PATH— local vault directory forforge_read_notes_in_vault+forge_commit_recipe. Default:~/forge-vaults/bluh.FORGE_MCP_HOST— host to bind. Default:0.0.0.0.FORGE_MCP_PORT— port to bind. Default:8765.FORGE_MCP_BEARER— dev fallback only. Per-request Bearer extraction is the primary path (CW-MCP-1-B); this env var only fires when the incoming request has noAuthorizationheader. Do NOT set in production.
Claude Desktop config
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Get your Bearer:
Tools
Read (no side effects):
forge_read_note_catalog({domain?})— list Forge library notes; every entry carries the E-- signature the agent needs toCallit.forge_read_notes_in_vault({filter?})— list vault notes with ahas_recipe+recipe_versionsummary. Backed by a local filesystem walk (CW-MCP-2-E).
Author (deterministic — no LLM, no vault write):
forge_compile_recipe({source})— Recipe → Python. Returns compiled source + unresolved slot count, OR a structured parse error with line/column (per drain CW-recipe-parser-line-info).forge_run_recipe({source, domains?})— compile + execute in a resource-limited server sandbox. Returns a short preview + arun_id; artifacts (MusicXML / MIDI / PNGs) accessible via theforge-artifact://resource.forge_get_run_result({run_id})— fetch full stdout/stderr + artifact manifest of a previous run. 7-day TTL, per-Bearer isolation.
Commit:
forge_commit_recipe({source, note_id, expected_version?})— persist Recipe to a vault note (facet-scoped — Description + Python + frontmatter survive byte-for-byte). Bumpsrecipe_versionin the note's frontmatter. Optimistic-concurrency viaexpected_version; version-conflict returnsisError:truewith expected + current numbers.
Resources
forge-note:///{domain}/{name}— library note content.forge-artifact:///{run_id}/{artifact_name}— on-demand binary fetch for run artifacts. Text mimes return viatext; binaries via base64blob.forge-recipe:///{note_id}/v{n}— Recipe body at a specificrecipe_version(git-tracked vaults only; returns "history unavailable" text otherwise).
Auth
forge-mcp does NOT validate tokens itself — forge-transpile is the source of truth (guarded by FORGE_TRANSPILE_SECRET). Each request's Authorization: Bearer <token> header is forwarded verbatim; a 401 or 403 from forge-transpile surfaces as isError: true with an actionable message the agent can read (drain CW-MCP-1-B).
Rotation is zero-downtime on the forge-mcp side: change FORGE_TRANSPILE_SECRET on forge-transpile, update your MCP client's header, done. Old tokens fail on the next request with a clean rejection message.
Related repos
- forge — the E-- parser + transpiler + core music library. forge-mcp vendors a snapshot of
forge/recipe/per the CW-MCP-2-A architecture; drift is caught byscripts/check-recipe-drift.shin the forge-transpile repo. - forge-transpile — the FastAPI service exposing
/compile//run//catalogetc. that forge-mcp's tools proxy for the transpile + sandboxed-run paths. Vault reads + commits are LOCAL and don't hit forge-transpile. - forge-client-obsidian — the Obsidian plugin end of the same authoring loop. forge-mcp writes to the SAME vault the plugin reads/renders; both share the note-file format.
來源:README.md,提交 f9fafa5
工具
0版本歷史
1- v0.2.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分