
Forge MCP
io.github.frmodedPublished by GitHub account frmodedv0.2.0Updated Oct 24, 2026
MCP server + tools for the Forge E-- generative-music authoring loop (compile / run / commit).
Overview
Lets an assistant author, compile, run, and commit Forge E-- generative-music Recipes, reading a note catalog and vault and writing finished Recipes back.
- What you can do
- Exposes six tools around the Forge E-- generative-music authoring loop. Read tools list library notes with their E-- signatures and list vault notes with has_recipe and recipe_version summaries. Author tools compile Recipe source to Python, run it in a resource-limited sandbox returning a preview and run_id, and fetch full stdout, stderr and an artifact manifest for a previous run. A commit tool persists a Recipe into a vault note and bumps recipe_version, with optimistic concurrency via expected_version. Resources serve library notes, run artifacts, and versioned Recipe bodies.
- When to use it
- Use it when an assistant should draft, verify, execute, and save Forge E-- music Recipes end to end rather than only discussing them. It fits workflows where the assistant works against a local Forge vault and a forge-transpile service, for example picking a chip from the catalog, compiling, previewing the artifact, then committing the Recipe to a note.
- Requirements
- Runs locally as a stdio process, installed from PyPI as forge-recipe-mcp and started with uvx. Needs FORGE_TRANSPILE_URL for the forge-transpile service (default FORGE_VAULT_PATH for a writable local vault directory, and a Bearer token supplied per request via the Authorization header or, as a dev fallback, FORGE_MCP_BEARER. Optional FORGE_MCP_HOST and FORGE_MCP_PORT control binding. Desktop clients only.
Installation
In SourceWeft
- Open Forge MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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.
Source: README.md at commit f9fafa5
Tools
0Version history
1- v0.2.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts