MCP server · 15 tools · Node 18+, no dependencies · WebMCP in the browser

Connect an agent

Give Claude, or your own agent, the same synth as this editor. It can roll sound effects, compose and remix music, look at a preview of each sound, and export a pack of WAVs straight into your game's folder.

1Install on your computer

The MCP server runs locally next to your game. Clone the repo anywhere and run the smoke test. It spawns the server and calls every tool, so a pass means you're ready.

Terminal
git clone https://github.com/x0trad/sfxforge ~/sfxforge
cd ~/sfxforge && npm test

Every route below takes one setting, SFX_DIR: the folder where sounds are saved. Point it at your game's assets, for example ~/galacticsmashbros/assets/sfx, and the WAVs land where the game loads them. Each sound sits next to its .sfx.json recipe, so it can always be edited and re-rendered.

2Pick how your agent connects

Claude Code

Best while you build the game. The setup is saved in the game's repo.

Recommended

Run this inside your game's folder:

Terminal · in your game folder
claude mcp add --transport stdio --scope project \
  --env SFX_DIR=$PWD/assets/sfx \
  sfx -- node ~/sfxforge/src/server.js

This writes a .mcp.json into the game repo, so the setup is committed with it. Claude Code asks you to approve the server the first time it starts.

Claude Desktop

For chatting with Claude in the desktop app while it makes the sounds.

  1. Open Settings → Developer → Edit Config.
  2. Add the sfx entry below. Use full paths: ~ doesn't work in this file, so write out /Users/you/….
  3. Quit and reopen Claude Desktop.
claude_desktop_config.json
{
  "mcpServers": {
    "sfx": {
      "command": "node",
      "args": ["/Users/you/sfxforge/src/server.js"],
      "env": { "SFX_DIR": "/Users/you/galacticsmashbros/assets/sfx" }
    }
  }
}

If the file already has other servers, add "sfx": {…} inside the existing mcpServers block rather than pasting a second one.

Your own agent on the Claude API

Orchestrators such as Hermes, or any script that calls the Messages API.

The Claude API's built-in MCP connection only reaches servers on a public https:// address, so it can't reach this local server. The repo includes a small bridge instead. It starts the server from Python, offers its tools to Claude, and passes results back, including the preview images.

Terminal
pip install anthropic mcp
export ANTHROPIC_API_KEY=…
SFX_DIR=~/galacticsmashbros/assets/sfx \
  python ~/sfxforge/examples/agents/claude_api_bridge.py \
  "Make a light and heavy punch and a 40 second boss track, then export a pack"

To use it inside an orchestrator, import it and give your sound-design agent a task:

Python
# a "sound designer" child agent
import asyncio, os, sys
sys.path.insert(0, os.path.expanduser("~/sfxforge/examples/agents"))
os.environ["SFX_DIR"] = os.path.expanduser("~/galacticsmashbros/assets/sfx")
os.environ["SFX_TOOLS"] = "generate_sound,variations,generate_music,remix_music,render_sound,export_pack"
import claude_api_bridge as sfx

asyncio.run(sfx.run("Give the dash move a whooshier sound and export the pack"))

SFX_TOOLS is an allowlist. Leave out delete_sound or play_sound for agents that shouldn't use them. Other models that support tool calling (MiniMax, DeepSeek and so on) work the same way: only the model call changes. Models that can't read images still get the numbers but won't see the waveform previews.

An agent in your browser (WebMCP)

Nothing to install. The editor page offers its own controls to an AI agent running in the browser.

Experimental

WebMCP is a new browser standard: a web page registers tools that agents in the browser can call directly, instead of clicking around the screen. When the editor is open in a browser that supports it, it registers 12 tools and shows a green WEBMCP · 12 TOOLS badge in its top bar. The agent drives the live editor, so you watch every change happen and each step lands in the history strip.

  1. Use Chrome 149 to 162. This site is registered for Chrome's WebMCP origin trial (until 30 March 2027), so it works with no setup. On other origins, such as a local copy, turn it on at chrome://flags/#enable-webmcp-testing.
  2. Open the editor and check for the badge in the top bar.
  3. Use an agent that speaks WebMCP. Today that mostly means extensions, such as Chrome's Model Context Tool Inspector, which lists the tools and can run them by hand or with Gemini.
  4. Click the page once before asking for sound. Browsers keep audio off until you interact with the page.
Browser toolWhat it does in the editor
sfx_describeCategories, music styles, macros and the sound on screen
sfx_generate_soundA new sound effect from a category, or random
sfx_compose_musicA full track in a style, or random
sfx_remix_musicNew drums, bass, chords or melody; key and tempo
sfx_edit_sound · sfx_apply_macro · sfx_mutateChange layers, bend the whole sound, or nudge it
sfx_get_sound · sfx_load_soundRead the sound (with its JSON), or load one in
sfx_play · sfx_history · sfx_exportPlay or stop, go back in history, download WAV or JSON

Agents that run scripts on the page, such as browser-automation agents, can call the same tools without WebMCP through window.sfxForge:

JavaScript · on the editor page
window.sfxForge.tools                       // names, descriptions, input schemas
await window.sfxForge.call('sfx_compose_music', { style: 'boss', seconds: 40 })
await window.sfxForge.call('sfx_remix_music', { parts: ['drums'] })

Building your own WebMCP client? In Chrome 154 and earlier, executeTool() takes the tool object from getTools() and the arguments as a JSON string, for example executeTool(tool, JSON.stringify(args)). Plain objects are accepted from Chrome 155.

WebMCP is in an early Chrome origin trial and the API is still changing, so treat this route as a preview. The browser tools work on the sound in front of you and return numbers rather than audio or images. For building a whole pack into your game folder, routes A–C are the dependable choice. Inside a Claude artifact the page runs in a sandboxed frame, so WebMCP is only available on this site.

3Check it's connected

You
List the sfx categories and music styles.
Agent, when it works
Answers with 23 categories (coin, punch, explosion… plus random) and 9 music styles (chiptune, fight, city pop, synthwave, lo-fi, house, drum & bass, trap, boss).

If the tools don't appear, check that node --version prints 18 or higher and that the path to server.js is absolute and correct.

What your agent can do

Every render returns duration, peak and RMS loudness, attack and brightness, plus a preview image: one row per layer showing where it fires, with the waveform underneath. That's how the agent hears its work and decides what to change.

ToolWhat it does
Make
generate_soundOne of 22 SFX generators, or random with a wildness from 0 to 1
variationsSeveral candidates at once, or several mutations of a sound to choose from
generate_musicA full 10–60 s track in one of 9 styles, or random, which can mix two
Change
remix_musicNew drums, bass, chords or melody for a track, plus key and tempo changes
edit_soundChange any setting on any layer, or add and remove layers
apply_macroOne-knob changes: pitch, length, punch, grit, space, distance, retro
mutate_soundA random nudge in the same spirit (keeps songs in tune)
Output
render_soundWAV in mono or stereo at 22.05, 44.1 or 48 kHz
export_packA folder of WAVs plus manifest.json for the game engine
play_soundPlays a sound on your speakers so you can hear it
Manage
list_categoriesEvery category, style, macro and the full sound format
list_soundsWhat's saved in SFX_DIR
get_sound · set_soundA sound's full JSON, out and in. It's the same format as this editor's JSON button.
delete_soundRemoves a sound and its WAV

Things to ask

Moving sounds between the agent and this editor

Both use the same sfx-forge/1 format and the same engine, so a sound plays identically in both. To edit something the agent made, ask it to get_sound. Then, in the editor, press JSON, paste, and choose Apply. To go the other way, copy the JSON from the editor and ask the agent to set_sound with it.

Chatting with Claude on claude.ai can't start a server on your computer, so it isn't one of the routes above. Use Claude Desktop or Claude Code instead.