Forge MCP

Official registry Media and design

MCP server + tools for the Forge E-- generative-music authoring loop (compile / run / commit).

What can you do with Forge MCP?

  • forge_read_note_catalog({domain?}) — list Forge library notes; every entry carries the E-- signature the agent needs to Call it.
  • forge_read_notes_in_vault({filter?}) — list vault notes with a has_recipe + recipe_version summary. Backed by a local filesystem walk (CW-MCP-2-E).
  • 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 + a run_id; artifacts (MusicXML / MIDI / PNGs) accessible via the forge-artifact:// resource.
  • forge_get_run_result({run_id}) — fetch full stdout/stderr + artifact manifest of a previous run. 7-day TTL, per-Bearer isolation.
  • forge_commit_recipe({source, note_id, expected_version?}) — persist Recipe to a vault note (facet-scoped — Description + Python + frontmatter survive byte-for-byte). Bumps recipe_version in the note's frontmatter. Optimistic-concurrency via `expected_ve...

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

PYPI package forge-recipe-mcp
Claude Code
claude mcp add forge-mcp -e 'FORGE_TRANSPILE_URL=http://localhost:8000' -e 'FORGE_VAULT_PATH=~/forge-vaults/bluh' -e 'FORGE_MCP_BEARER=<your forge_mcp_bearer>' -- uvx forge-recipe-mcp==0.2.0
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "forge-mcp": {
            "command": "uvx",
            "args": [
                "forge-recipe-mcp==0.2.0"
            ],
            "env": {
                "FORGE_TRANSPILE_URL": "http://localhost:8000",
                "FORGE_VAULT_PATH": "~/forge-vaults/bluh",
                "FORGE_MCP_BEARER": "<your forge_mcp_bearer>"
            }
        }
    }
}

Environment variables

  • FORGE_TRANSPILE_URL Base URL of the forge-transpile service. Provides /catalog, /compile, /run, /resolve-slot endpoints backing the read/author tools.
  • FORGE_VAULT_PATH Local vault directory used by forge_read_notes_in_vault + forge_commit_recipe. Must exist and be writable.
  • FORGE_MCP_BEARER required secret Bearer token forwarded to forge-transpile. Rotate by updating FORGE_TRANSPILE_SECRET on the upstream service and re-setting this. Dev fallback only when clients don't set Authorization on each request.

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. forge-mcp
  2. Install into Claude Code
  3. Install (other clients)
  4. Claude Desktop config
  5. Tools
  6. Resources
  7. Auth
  8. Related repos

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.

[library note catalog] → [compile] → [run] → [commit] → [vault note with recipe_version bump]

Install into Claude Code

Fastest path — Claude Code spawns forge-mcp as a stdio subprocess. Full walkthrough at docs/claude-code-install.md.

# 1. Install from PyPI (https://pypi.org/project/forge-recipe-mcp/)
pip install forge-recipe-mcp

# 2. Fetch your Bearer once and export
export FORGE_MCP_BEARER=$(jq -r '.transpileServiceToken' \
  ~/forge-vaults/bluh/.obsidian/plugins/forge-client-obsidian/data.json)

# 3. Register with Claude Code
claude mcp add forge-mcp \
  -e FORGE_MCP_BEARER=$FORGE_MCP_BEARER \
  -e FORGE_TRANSPILE_URL=https://forge.thecodingarena.com \
  -e FORGE_VAULT_PATH=$HOME/forge-vaults/bluh \
  -e FORGE_MCP_TRANSPORT=stdio \
  -- forge-mcp

# 4. Start Claude Code and ask "list the notes in my forge music library."

Install (other clients)

Full walkthrough (Claude Desktop config, forge-transpile Bearer acquisition, verification smoke, troubleshooting): docs/install.md.

Quick paths:

# From source (pip + editable install for development)
pip install -e ".[dev]"
python -m forge_mcp.server

# Docker
docker build -t forge-mcp:latest .
docker run --rm -p 8765:8765 \
    -e FORGE_TRANSPILE_URL=https://forge.thecodingarena.com \
    -e FORGE_VAULT_PATH=/path/to/your/vault \
    forge-mcp:latest

Environment:

  • FORGE_TRANSPILE_URL — base URL of the forge-transpile service. Default: http://localhost:8000.
  • FORGE_VAULT_PATH — local vault directory for forge_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 no Authorization header. Do NOT set in production.

Claude Desktop config

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "forge-mcp": {
      "url": "http://localhost:8765/mcp",
      "headers": {
        "Authorization": "Bearer <your-forge-transpile-token>"
      }
    }
  }
}

Get your Bearer:

jq -r '.transpileServiceToken' \
    ~/forge-vaults/bluh/.obsidian/plugins/forge-client-obsidian/data.json

Tools

Read (no side effects):

  • forge_read_note_catalog({domain?}) — list Forge library notes; every entry carries the E-- signature the agent needs to Call it.
  • forge_read_notes_in_vault({filter?}) — list vault notes with a has_recipe + recipe_version summary. 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 + a run_id; artifacts (MusicXML / MIDI / PNGs) accessible via the forge-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). Bumps recipe_version in the note's frontmatter. Optimistic-concurrency via expected_version; version-conflict returns isError:true with 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 via text; binaries via base64 blob.
  • forge-recipe:///{note_id}/v{n} — Recipe body at a specific recipe_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.

  • 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 by scripts/check-recipe-drift.sh in the forge-transpile repo.
  • forge-transpile — the FastAPI service exposing /compile / /run / /catalog etc. 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.

Frequently asked questions

What is Forge MCP?

MCP server + tools for the Forge E-- generative-music authoring loop (compile / run / commit).

How do I install Forge MCP?

It runs on your machine. In Claude Code: claude mcp add forge-mcp -e 'FORGE_TRANSPILE_URL=http://localhost:8000' -e 'FORGE_VAULT_PATH=~/forge-vaults/bluh' -e 'FORGE_MCP_BEARER=<your forge_mcp_bearer>' -- uvx forge-recipe-mcp==0.2.0. For other clients, paste the JSON configuration from this page into their MCP settings.

Does Forge MCP need an API key?

Yes. It expects FORGE_MCP_BEARER, which you set in its configuration.

Is Forge MCP open source?

Yes. Its code is on GitHub under the Apache-2.0 license.

Who maintains Forge MCP?

It is published by frmoded. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.