Skip to content
Back to search

audio-studio-mcp

Local AI BGM and sound effects for Claude Code and any MCP client. Stable Audio 3 on Apple Silicon (MLX) and Windows NVIDIA GPUs (PyTorch). No cloud, no API key.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/kanaworksai-hue/audio-studio-mcp with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/kanaworksai-hue/audio-studio-mcp'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/kanaworksai-hue--audio-studio-mcp/badge.svg)](/listings/kanaworksai-hue--audio-studio-mcp)

HTML

<a href="/listings/kanaworksai-hue--audio-studio-mcp"><img src="/api/listings/kanaworksai-hue--audio-studio-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

macOS (Apple Silicon)

**Requirements:**

- Apple Silicon Mac (M1 or later), 16 GB RAM recommended - About 6 GB of disk for the model - `git` and [`ffmpeg`](https://ffmpeg.org) (`brew install ffmpeg`)

git clone https://github.com/kanaworksai-hue/audio-studio-mcp.git
cd audio-studio-mcp
./install.sh

The installer sets up [`uv`](https://docs.astral.sh/uv/) if needed, clones the official Stable Audio 3 runtime into `vendor/` at a tested commit, creates `.venv/`, and downloads the **medium** model (1.4B, ~5.9 GB) from [Hugging Face](https://huggingface.co/stabilityai/stable-audio-3-optimized). It finishes by printing the exact command to register the server:

claude mcp add --scope user audio-studio -- /path/to/audio-studio-mcp/.venv/bin/audio-studio-mcp

Windows (NVIDIA GPU)

**Requirements:**

- 64-bit Windows 10 or 11 with an NVIDIA GPU (8 GB of VRAM or more) and a current driver. Tested on an RTX 3060 12 GB - About 14 GB of disk for the model and PyTorch - `git` (`winget install Git.Git`) and [`ffmpeg`](https://ffmpeg.org) (`winget install Gyan.FFmpeg`) - A free [Hugging Face](https://huggingface.co) account. The PyTorch weights are gated: open [stabilityai/stable-audio-3-medium](https://huggingface.co/stabilityai/stable-audio-3-medium) and accept the license once

git clone https://github.com/kanaworksai-hue/audio-studio-mcp.git
cd audio-studio-mcp
powershell -ExecutionPolicy Bypass -File install.ps1

The installer does the same steps as on macOS, but installs PyTorch with CUDA and downloads the official PyTorch checkpoint of the **medium** model (~10.4 GB). If you aren't logged in to Hugging Face yet, it asks for an access token with read permission ([create one here](https://huggingface.co/settings/tokens)). When it runs without a console (for example, started by an AI agent), it never asks: it prints the steps to log in and stops, and you re-run it after logging in. It finishes by printing the command to register the server:

claude mcp add --scope user audio-studio -- "C:\path\to\audio-studio-mcp\.venv\Scripts\audio-studio-mcp.exe"

Flash Attention is not needed. Without it, the runtime falls back to PyTorch's built-in attention.

<details> <summary><b>Claude Desktop, Cursor and other clients</b></summary>

Add this to `claude_desktop_config.json`, `.cursor/mcp.json` or your client's MCP config:

{
  "mcpServers": {
    "audio-studio": {
      "command": "/path/to/audio-studio-mcp/.venv/bin/audio-studio-mcp"
    }
  }
}

On Windows the command is `C:\\path\\to\\audio-studio-mcp\\.venv\\Scripts\\audio-studio-mcp.exe` (backslashes doubled in JSON). </details>

<details> <summary><b>Installer options</b></summary>

| macOS | Windows | Effect | |---|---|---| | `--model all` | `-Model all` | Also download the small, fast `sm-music` and `sm-sfx` models (+2.6 GB on macOS, +7 GB on Windows) | | `--skip-weights` | `-SkipWeights` | Don't download now; the first generation downloads them | | `-y` | `-Yes` | Install `uv` without asking |

On macOS, downloads are anonymous; logging in with `hf auth login` raises Hugging Face's rate limit. On Windows, the PyTorch weights are gated: accept the license on each model page you download ([medium](https://huggingface.co/stabilityai/stable-audio-3-medium), [small-music](https://huggingface.co/stabilityai/stable-audio-3-small-music), [small-sfx](https://huggingface.co/stabilityai/stable-audio-3-small-sfx)) and log in. </details>

> [!TIP] > **Let your agent install it.** Paste this into Claude Code: > *"Install https://github.com/kanaworksai-hue/audio-studio-mcp by following its README, including the notes for AI agents, then register it as an MCP server."* > > **Notes for AI agents (Windows only; macOS needs no login):** the weights are gated and need the user's own Hugging Face login.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 520 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <div align="center">
  2. <img src="docs/assets/banner-en.jpg" alt="Audio Studio MCP: local AI music and sound effects for Claude Code and any MCP client" width="820">
  3. <p>
  4. <a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-6b4dff?style=flat-square"></a>
  5. <img alt="macOS Apple Silicon" src="https://img.shields.io/badge/macOS-Apple_Silicon-111?style=flat-square&logo=apple">
  6. <img alt="Windows NVIDIA GPU" src="https://img.shields.io/badge/Windows-NVIDIA_GPU-76b900?style=flat-square&logo=nvidia&logoColor=white">
  7. <a href="https://modelcontextprotocol.io"><img alt="MCP server" src="https://img.shields.io/badge/MCP-server-19b8d6?style=flat-square"></a>
  8. <img alt="Python 3.10 to 3.13" src="https://img.shields.io/badge/python-3.10–3.13-3776ab?style=flat-square&logo=python&logoColor=white">
  9. <a href="https://github.com/kanaworksai-hue/audio-studio-mcp/actions/workflows/tests.yml"><img alt="Tests" src="https://img.shields.io/github/actions/workflow/status/kanaworksai-hue/audio-studio-mcp/tests.yml?style=flat-square&label=tests"></a>
  10. <a href="https://github.com/kanaworksai-hue/audio-studio-mcp/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/kanaworksai-hue/audio-studio-mcp?style=flat-square&logo=github&label=stars&color=f5c518"></a>
  11. </p>
  12. <p><a href="https://github.com/kanaworksai-hue"><img src="docs/brand/kanaworks-mark.png" height="22" alt="" align="absmiddle"></a>&nbsp;<a href="https://github.com/kanaworksai-hue"><b>A KanaWorks_AI project</b></a></p>
  13. **English** | [简体中文](README.zh-CN.md) | [日本語](README.ja.md) | [한국어](README.ko.md) | [Português (Brasil)](README.pt-BR.md) | [Español](README.es.md)
  14. <!-- mcp-name: io.github.kanaworksai-hue/audio-studio-mcp -->
  15. [🎧 Listen to samples](https://kanaworksai-hue.github.io/audio-studio-mcp/) · [Quick start](#-quick-start) · [Tools](#-tools) · [Web UI](#-web-ui) · [FAQ](#-faq) · [⭐ Star](#-like-it-star-it)
  16. </div>
  17. **Audio Studio MCP** gives Claude Code, Claude Desktop, Cursor and any other [MCP](https://modelcontextprotocol.io) client a sound studio that runs on your own Mac or Windows PC. Ask for background music or a sound effect in plain language; the model generates it locally with [Stable Audio 3](https://github.com/Stability-AI/stable-audio-3). Then it can loop it, normalize the loudness and export it for your game engine or video editor. There is no cloud service and no API key, and generating doesn't cost anything.
  18. <p align="center">
  19. <img src="docs/assets/demo-en.png" alt="A real Claude Code session: one request produces two lo-fi BGM candidates and a seamless OGG loop for Godot" width="820">
  20. <br><sub>A real session, shortened. Claude picked a loop length of exactly 11 bars so the beat stays in time when it repeats.</sub>
  21. </p>
  22. ## ✨ Highlights
  23. <table>
  24. <tr>
  25. <td align="center" width="25%"><img src="docs/assets/icon-generate.png" width="72" alt=""><br><b>Generate</b><br><sub>BGM, instrument loops and sound effects from one sentence, 1–4 candidates per call</sub></td>
  26. <td align="center" width="25%"><img src="docs/assets/icon-edit.png" width="72" alt=""><br><b>Edit</b><br><sub>Re-style a whole clip, regenerate a time range, or extend a track</sub></td>
  27. <td align="center" width="25%"><img src="docs/assets/icon-process.png" width="72" alt=""><br><b>Finish</b><br><sub>Seamless loops, fades, loudness (LUFS), 48 kHz WAV / OGG / FLAC</sub></td>
  28. <td align="center" width="25%"><img src="docs/assets/icon-local.png" width="72" alt=""><br><b>Local</b><br><sub>Runs on Apple Silicon (MLX) or an NVIDIA GPU (PyTorch). Nothing is uploaded</sub></td>
  29. </tr>
  30. </table>
  31. - **Listen in the chat:** in Claude Desktop and other clients with MCP Apps, results show up as a player in the conversation. Compare versions, export, or ask for more without opening a file. See [Listen in the chat](#-listen-in-the-chat).
  32. - **Reproducible:** every file gets a `.json` sidecar with its prompt, seed and settings.
  33. - **Prompting built in:** the server teaches the client the official Stable Audio 3 prompt format, so a request like "make it sound like a creaky door" becomes a prompt the model understands.
  34. - **Same output as upstream:** on a Mac, results for the same seed are bit-for-bit identical to the official `sa3` CLI. On Windows it calls the official Stable Audio 3 PyTorch API.
  35. ## 🎧 Hear it
  36. All of these were generated by this server on an M1 Mac and were not edited by hand. **[Open the sample page →](https://kanaworksai-hue.github.io/audio-studio-mcp/)**
  37. | | Sample | Prompt |
  38. |---|---|---|
  39. | <img src="docs/samples/lofi_cafe.svg" width="200" alt=""> | [**Lo-fi cafe**](https://kanaworksai-hue.github.io/audio-studio-mcp/#lofi_cafe)<br><sub>music · 30 s · 85 BPM</sub> | Lo-fi hip-hop chill track with mellow electric piano, soft vinyl crackle, low-pass filtered drums… |
  40. | <img src="docs/samples/epic_orchestral.svg" width="200" alt=""> | [**Epic orchestral**](https://kanaworksai-hue.github.io/audio-studio-mcp/#epic_orchestral)<br><sub>music · 30 s</sub> | Epic cinematic orchestral trailer music with thundering taiko drums, soaring French horns… |
  41. | <img src="docs/samples/chiptune_adventure.svg" width="200" alt=""> | [**Chiptune adventure**](https://kanaworksai-hue.github.io/audio-studio-mcp/#chiptune_adventure)<br><sub>music · 20 s · 150 BPM</sub> | Upbeat 8-bit chiptune adventure theme with a bright square wave lead… |
  42. | <img src="docs/samples/glass_shatter.svg" width="200" alt=""> | [**Glass shatter**](https://kanaworksai-hue.github.io/audio-studio-mcp/#glass_shatter)<br><sub>sfx · 3 s</sub> | source: glass bottle · action: shattering on impact · material: thick green glass · space: concrete floor |
  43. | <img src="docs/samples/rain_thunder.svg" width="200" alt=""> | [**Rain & thunder**](https://kanaworksai-hue.github.io/audio-studio-mcp/#rain_thunder)<br><sub>sfx · 12 s</sub> | source: heavy rain and distant thunder · space: outdoor forest at night, wide stereo |
  44. | <img src="docs/samples/synthwave_drive_extended.svg" width="200" alt=""> | [**Synthwave, extended**](https://kanaworksai-hue.github.io/audio-studio-mcp/#synthwave_drive_extended)<br><sub>edit · 20 s → 40 s</sub> | `edit_audio` continue: a 20-second track extended to 40 seconds |
  45. MP3s are in [`docs/samples/`](docs/samples), with prompts and seeds in [`samples.json`](docs/samples/samples.json).
  46. ## 🧭 How it works
  47. ```mermaid
  48. flowchart LR
  49. U["You<br/>“make a cozy cafe BGM”"] --> C["Claude Code · Desktop<br/>Cursor · any MCP client"]
  50. C -- "MCP" --> S["audio-studio-mcp<br/>generate · edit · process"]
  51. S --> M["Stable Audio 3<br/>MLX on Apple Silicon<br/>PyTorch on NVIDIA GPUs"]
  52. M --> F["WAV / OGG / FLAC + .json<br/>ready for game & video"]
  53. ```
  54. ## 🚀 Quick start
  55. You need [uv](https://docs.astral.sh/uv/) 0.9.20 or newer and [ffmpeg](https://ffmpeg.org). There is nothing to clone: `uvx` downloads and runs the published package.
  56. | | macOS | Windows |
  57. |---|---|---|
  58. | **Hardware** | Apple Silicon (M1 or later), 16 GB RAM recommended | NVIDIA GPU with 8 GB of VRAM or more and a current driver. Tested on an RTX 3060 12 GB |
  59. | **Disk** | About 8 GB (model ~6.9 GB) | About 14 GB (model ~10.4 GB, PyTorch) |
  60. | **uv and ffmpeg** | `brew install uv ffmpeg` | `winget install astral-sh.uv` and `winget install Gyan.FFmpeg` |
  61. | **Model license** | Nothing to do | Needs a free [Hugging Face](https://huggingface.co) account: open [stabilityai/stable-audio-3-medium](https://huggingface.co/stabilityai/stable-audio-3-medium) and accept the license once |
  62. **1. Set it up once, in a terminal.** This checks your computer, fetches the official Stable Audio 3 runtime at a tested commit, tells you how big the model download is and asks before downloading it. Running it again is safe; finished downloads are kept.
  63. ```bash
  64. # macOS
  65. uvx --python 3.11 audio-studio-mcp setup
  66. ```
  67. ```powershell
  68. # Windows
  69. uvx --python 3.11 --torch-backend cu126 audio-studio-mcp setup
  70. ```
  71. `--torch-backend cu126` makes uv install the CUDA build of PyTorch (PyPI only has the CPU build for Windows), and `--python 3.11` keeps uv away from a Python that PyTorch doesn't support yet. If uvx answers `unexpected argument '--torch-backend'`, your uv is too old: update it with `winget upgrade astral-sh.uv` (or `uv self update`). On Windows, if you aren't logged in to Hugging Face yet, setup prints the steps: accept the license on the model page, then log in **in your own terminal** with `uvx --from huggingface_hub hf auth login` and run setup again.
  72. Setup downloads the **medium** model. For the small, fast models add `--model sm-music`, `--model sm-sfx` or `--model all`, and set `AUDIO_STUDIO_SA3_MODEL` in your client config (see [Configuration](#️-configuration)).
  73. **2. Register it with your MCP client.** Use the same command without `setup`:
  74. ```bash
  75. # Claude Code, macOS
  76. claude mcp add --scope user audio-studio -- uvx --python 3.11 audio-studio-mcp
  77. # Claude Code, Windows
  78. claude mcp add --scope user audio-studio -- uvx --python 3.11 --torch-backend cu126 audio-studio-mcp
  79. ```
  80. <details>
  81. <summary><b>Claude Desktop, Codex, VS Code, Cursor and other clients</b></summary>
  82. On Windows, add `"--torch-backend", "cu126"` after `"3.11"` in each example below.
  83. **Claude Desktop** (`claude_desktop_config.json`), **Cursor** (`.cursor/mcp.json`) and most other clients:
  84. ```json
  85. {
  86. "mcpServers": {
  87. "audio-studio": {
  88. "command": "uvx",
  89. "args": ["--python", "3.11", "audio-studio-mcp"]
  90. }
  91. }
  92. }
  93. ```
  94. If the client says it can't find `uvx`, put its full path in `command` (`which uvx` on macOS, `where uvx` on Windows). Restart Claude Desktop after editing.
  95. **Codex** (`~/.codex/config.toml`). Codex waits only 10 seconds for a server to start and 60 seconds for a tool call by default; long tracks need more:
  96. ```toml
  97. [mcp_servers.audio-studio]
  98. command = "uvx"
  99. args = ["--python", "3.11", "audio-studio-mcp"]
  100. startup_timeout_sec = 60
  101. tool_timeout_sec = 900
  102. ```
  103. **VS Code** (`.vscode/mcp.json`, or **MCP: Open User Configuration**):
  104. ```json
  105. {
  106. "servers": {
  107. "audio-studio": {
  108. "type": "stdio",
  109. "command": "uvx",
  110. "args": ["--python", "3.11", "audio-studio-mcp"]
  111. }
  112. }
  113. }
  114. ```
  115. </details>
  116. Generated files go to `~/AudioStudio` (set `AUDIO_STUDIO_OUTPUT_DIR` to change it). uvx keeps the version it installed; to update, run `uv cache clean audio-studio-mcp` and then setup again.
  117. > [!TIP]
  118. > **Let your agent install it.** Paste this into Claude Code:
  119. > *"Install the Audio Studio MCP server (https://github.com/kanaworksai-hue/audio-studio-mcp) by following its README, including the notes for AI agents."*
  120. >
  121. > **Notes for AI agents:**
  122. > - Run the setup command for the user's OS yourself, with `-y` added, and give it a long timeout: it downloads about 7 GB on macOS and about 13 GB on Windows (model and PyTorch). If it is cut off, run it again; finished files are kept. Then register the server as shown above.
  123. > - On Windows the model weights are gated and need the user's own Hugging Face login. If setup stops with the login steps, pass them on to the user and wait until they say they are done, then run setup again. Never ask the user to paste their token into the chat.
  124. > - Before setup has finished, the server starts but every tool call answers with the setup command to run.
  125. ### Alternative: install from source
  126. The install scripts from earlier versions still work. They clone the repository, put the runtime in `vendor/` and the audio in `outputs/` inside it, and run from `.venv/`.
  127. #### macOS (Apple Silicon)
  128. **Requirements:**
  129. - Apple Silicon Mac (M1 or later), 16 GB RAM recommended
  130. - About 8 GB of disk (model ~6.9 GB)
  131. - `git` and [`ffmpeg`](https://ffmpeg.org) (`brew install ffmpeg`)
  132. ```bash
  133. git clone https://github.com/kanaworksai-hue/audio-studio-mcp.git
  134. cd audio-studio-mcp
  135. ./install.sh
  136. ```
  137. The installer sets up [`uv`](https://docs.astral.sh/uv/) if needed, clones the official Stable Audio 3 runtime into `vendor/` at a tested commit, creates `.venv/`, and downloads the **medium** model (1.4B, ~6.9 GB) from [Hugging Face](https://huggingface.co/stabilityai/stable-audio-3-optimized). It finishes by printing the exact command to register the server:
  138. ```bash
  139. claude mcp add --scope user audio-studio -- /path/to/audio-studio-mcp/.venv/bin/audio-studio-mcp
  140. ```
  141. #### Windows (NVIDIA GPU)
  142. **Requirements:**
  143. - 64-bit Windows 10 or 11 with an NVIDIA GPU (8 GB of VRAM or more) and a current driver. Tested on an RTX 3060 12 GB
  144. - About 14 GB of disk for the model and PyTorch
  145. - `git` (`winget install Git.Git`) and [`ffmpeg`](https://ffmpeg.org) (`winget install Gyan.FFmpeg`)
  146. - A free [Hugging Face](https://huggingface.co) account. The PyTorch weights are gated: open [stabilityai/stable-audio-3-medium](https://huggingface.co/stabilityai/stable-audio-3-medium) and accept the license once
  147. ```powershell
  148. git clone https://github.com/kanaworksai-hue/audio-studio-mcp.git
  149. cd audio-studio-mcp
  150. powershell -ExecutionPolicy Bypass -File install.ps1
  151. ```
  152. The installer does the same steps as on macOS, but installs PyTorch with CUDA and downloads the official PyTorch checkpoint of the **medium** model (~10.4 GB). If you aren't logged in to Hugging Face yet, it asks for an access token with read permission ([create one here](https://huggingface.co/settings/tokens)). When it runs without a console (for example, started by an AI agent), it never asks: it prints the steps to log in and stops, and you re-run it after logging in. It finishes by printing the command to register the server:
  153. ```powershell
  154. claude mcp add --scope user audio-studio -- "C:\path\to\audio-studio-mcp\.venv\Scripts\audio-studio-mcp.exe"
  155. ```
  156. Flash Attention is not needed. Without it, the runtime falls back to PyTorch's built-in attention.
  157. <details>
  158. <summary><b>Claude Desktop, Cursor and other clients</b></summary>
  159. Add this to `claude_desktop_config.json`, `.cursor/mcp.json` or your client's MCP config:
  160. ```json
  161. {
  162. "mcpServers": {
  163. "audio-studio": {
  164. "command": "/path/to/audio-studio-mcp/.venv/bin/audio-studio-mcp"
  165. }
  166. }
  167. }
  168. ```
  169. On Windows the command is `C:\\path\\to\\audio-studio-mcp\\.venv\\Scripts\\audio-studio-mcp.exe` (backslashes doubled in JSON).
  170. </details>
  171. <details>
  172. <summary><b>Installer options</b></summary>
  173. | macOS | Windows | Effect |
  174. |---|---|---|
  175. | `--model all` | `-Model all` | Also download the small, fast `sm-music` and `sm-sfx` models (+2.6 GB on macOS, +7 GB on Windows) |
  176. | `--skip-weights` | `-SkipWeights` | Don't download now; the first generation downloads them |
  177. | `-y` | `-Yes` | Install `uv` without asking |
  178. On macOS, downloads are anonymous; logging in with `hf auth login` raises Hugging Face's rate limit. On Windows, the PyTorch weights are gated: accept the license on each model page you download ([medium](https://huggingface.co/stabilityai/stable-audio-3-medium), [small-music](https://huggingface.co/stabilityai/stable-audio-3-small-music), [small-sfx](https://huggingface.co/stabilityai/stable-audio-3-small-sfx)) and log in.
  179. </details>
  180. Then just ask:
  181. - "Make a 60-second lo-fi BGM loop at 85 BPM for a cafe scene, give me 3 candidates."
  182. - "I need a heavy wooden door slamming in a stone hallway. Export it as OGG for Godot."
  183. - "Extend this track to 90 seconds and normalize it to −16 LUFS."
  184. ## 🧰 Tools
  185. | Tool | What it does |
  186. |---|---|
  187. | `generate_audio` | Text to BGM, instrument loop/stem or sound effect. 1–4 candidates per call, `bpm`, structured SFX fields |
  188. | `edit_audio` | `variation` (re-style the whole clip), `inpaint` (regenerate a time range), `continue` (extend). 1–4 candidates |
  189. | `process_audio` | Trim → trim silence → mono → resample / loudness → seamless loop → fades → peak normalize or ceiling → WAV / OGG / FLAC. Never modifies the input |
  190. | `unload_models` | Free the model memory right away |
  191. <details>
  192. <summary><b>Parameter notes</b></summary>
  193. - **`audio_type`**: `music` / `instrument` / `sfx` / `raw`. The server adds the prefix the model was trained with (`TrackType: Music, VocalType: Instrumental,` …). Without the SFX prefix, sound effects often come out as music.
  194. - **`variations`**: 1–4 candidates with seeds `seed, seed+1, …`. Use `seed: -1` or leave it out for a random seed.
  195. - **`sound_source` / `sound_action` / `sound_material` / `sound_space`**: describe a sound effect by what makes it, how it evolves, its texture and the space it is in.
  196. - **`peak_ceiling_db`** (default −1): a safety ceiling. Louder peaks are turned down and quieter audio is never boosted. Use `process_audio` to normalize.
  197. - **`process_audio` normalization**: `peak` is common for SFX. `loudness` normalizes to a target LUFS: −14 for streaming/video, −16 for game BGM, −23 for broadcast.
  198. Generated files are 44.1 kHz 24-bit stereo WAV, written to the output folder (`~/AudioStudio`, or `outputs/` in a source install; see `AUDIO_STUDIO_OUTPUT_DIR`). Each one has a `<name>.json` next to it. Processed files keep the original generation info under `source`.
  199. </details>
  200. ## 🌐 Web UI
  201. Prefer clicking to chatting? The same server comes with a local web page. Generate BGM and sound effects, compare the candidates, edit them (make a variation, replace a part, extend), export them for your game or video, and browse everything you've made in the library.
  202. <p align="center">
  203. <picture>
  204. <source media="(prefers-color-scheme: dark)" srcset="docs/assets/webui-generate-en-dark.png">
  205. <img src="docs/assets/webui-generate-en-light.png" alt="Web UI, Generate page: two versions of a lo-fi track to compare, and a footstep sound effect" width="820">
  206. </picture>
  207. <br><br>
  208. <picture>
  209. <source media="(prefers-color-scheme: dark)" srcset="docs/assets/webui-edit-en-dark.png">
  210. <img src="docs/assets/webui-edit-en-light.png" alt="Web UI, Edit page: a selected part of the waveform will be replaced, with the original and two new versions to compare" width="820">
  211. </picture>
  212. </p>
  213. ```bash
  214. uvx --python 3.11 audio-studio-mcp --web 8765
  215. ```
  216. Your browser opens http://127.0.0.1:8765/. Add `--no-browser` to start without opening it, or `--preload` to load the model at startup. Press Ctrl+C to stop it. On Windows, add `--torch-backend cu126` after `3.11`. From a source install: `.venv/bin/audio-studio-mcp --web 8765` (Windows: `.venv\Scripts\audio-studio-mcp.exe --web 8765`).
  217. The page and your MCP clients can share one process and one loaded model: the same port also serves MCP at `/mcp`. Register it once and use both at the same time. Requests from the page and from agents wait in one queue.
  218. ```bash
  219. claude mcp add --scope user --transport http audio-studio http://127.0.0.1:8765/mcp
  220. ```
  221. - Files are written to the output folder (`~/AudioStudio`, `outputs/` in a source install, or `AUDIO_STUDIO_OUTPUT_DIR`). The library shows that folder, and the editor works on the files in it.
  222. - The page is in English, Japanese and Chinese and follows your browser's language. You can change it in the settings.
  223. > [!WARNING]
  224. > The web UI is for your own computer only. It listens on `127.0.0.1` only and has no login. Don't make it reachable from other machines (port forwarding, a reverse proxy or a tunnel): anyone who can open it can use your GPU and write files to your output folder.
  225. ## 💬 Listen in the chat
  226. In clients that support [MCP Apps](https://modelcontextprotocol.io/extensions/apps/overview), the results of `generate_audio`, `edit_audio` and `process_audio` appear as a player right in the conversation. You don't have to open the files yourself.
  227. <p align="center">
  228. <picture>
  229. <source media="(prefers-color-scheme: dark)" srcset="docs/assets/chat-player-en-dark.png">
  230. <img src="docs/assets/chat-player-en-light.png" alt="In-chat player: three versions of a dungeon loop with waveforms; version 2 is playing, with Use this and Export buttons on each version" width="820">
  231. </picture>
  232. <br><sub>Three versions of a dungeon loop, real model output, shown in the MCP Apps reference host.</sub>
  233. </p>
  234. - **Listen and compare:** waveform, play, pause and seek. Switch versions while one is playing and the next one continues from the same moment. Keys `1`–`9` pick a version, and `0` plays the audio from before an edit.
  235. - **Check loops:** turn on **Loop** and press **Hear the seam** to hear the end run into the start.
  236. - **Pick, export, make more:** **Use this** tells the assistant which version you chose. **Export** saves it for a game or a video with the same presets as the web UI. **2 more versions** runs the same prompt again with the next seeds.
  237. - The player follows the client's language (English, Japanese or Chinese) and its light or dark theme. Nothing leaves your computer: the server sends the player a compressed preview of each file.
  238. | Client | Player |
  239. |---|---|
  240. | Claude Desktop | ✅ |
  241. | VS Code (GitHub Copilot) | ✅ Turn on `chat.mcp.apps.enabled` (experimental) |
  242. | Cursor, Goose and other clients with MCP Apps | ✅ |
  243. | Codex app (desktop) | ✅ |
  244. | Claude Code, Codex CLI and IDE extension, and other clients | Text results, the same as before |
  245. | claude.ai, ChatGPT | ❌ They need a remote server, and this one runs on your computer |
  246. No player, only text? Restart the client after changing its MCP settings. In Claude Desktop, some versions don't show apps from local servers in regular chats ([anthropics/claude-ai-mcp#1069](https://github.com/anthropics/claude-ai-mcp/issues/1069)); an incognito chat shows them. To turn the player off, set `AUDIO_STUDIO_CHAT_PLAYER=off`.
  247. ## ⚙️ Configuration
  248. <details>
  249. <summary><b>Environment variables</b></summary>
  250. | Variable | Default | Meaning |
  251. |---|---|---|
  252. | `AUDIO_STUDIO_OUTPUT_DIR` | `~/AudioStudio` (source install: `<repo>/outputs`) | Where audio files are written |
  253. | `AUDIO_STUDIO_IDLE_UNLOAD_MIN` | `10` | Free the models after this many idle minutes (`0` = never) |
  254. | `AUDIO_STUDIO_SA3_MODEL` | `medium` | `medium` (best quality, up to 380 s), `sm-music` or `sm-sfx` (small and fast, up to 120 s) |
  255. | `AUDIO_STUDIO_MLX_CACHE_GB` | `1` | macOS: cap on MLX's buffer cache. Without it, a long generation can leave ~6 GB cached |
  256. | `AUDIO_STUDIO_DEVICE` | `cuda` if available | Windows/Linux: PyTorch device, e.g. `cuda`, `cuda:1` or `cpu` |
  257. | `AUDIO_STUDIO_SA3_DIR` | downloaded by setup (source install: `<repo>/vendor/stable-audio-3`) | Use another stable-audio-3 checkout |
  258. | `AUDIO_STUDIO_HOME` | macOS `~/Library/Application Support/audio-studio-mcp`, Windows `%LOCALAPPDATA%\audio-studio-mcp` | Where setup keeps the Stable Audio 3 runtime (~1 MB). The weights stay in the Hugging Face cache |
  259. | `AUDIO_STUDIO_BACKEND` | `auto` | `auto`, `sa3-mlx` (Apple Silicon) or `sa3-torch` (PyTorch, NVIDIA) |
  260. | `AUDIO_STUDIO_FFMPEG` | `ffmpeg` on `PATH` | Path to ffmpeg |
  261. | `AUDIO_STUDIO_CHAT_PLAYER` | `auto` | [In-chat player](#-listen-in-the-chat): `auto` for clients that announce MCP Apps support, `off` for text only everywhere, `on` also for clients that show MCP Apps without announcing it (clients without MCP Apps then list its helper tool) |
  262. Pass them with `claude mcp add ... -e NAME=value` or in the `env` block of your client config.
  263. </details>
  264. <details>
  265. <summary><b>Share one server between sessions</b></summary>
  266. Each client session normally starts its own server process. Models load on the first call and are freed after the idle timeout. To keep one warm process for every session, run it as a local HTTP server. It only listens on `127.0.0.1`.
  267. ```bash
  268. uvx --python 3.11 audio-studio-mcp --http 8765 --preload
  269. claude mcp add --scope user --transport http audio-studio http://127.0.0.1:8765/mcp
  270. ```
  271. On Windows, add `--torch-backend cu126` after `3.11`. From a source install, start `.venv/bin/audio-studio-mcp` (Windows: `.venv\Scripts\audio-studio-mcp.exe`) with the same options.
  272. `--web 8765` does the same and adds the [web UI](#-web-ui) on the same port.
  273. </details>
  274. ## ⚡ Performance
  275. Medium model on an M1 Mac with 16 GB:
  276. | Task | Time |
  277. |---|---|
  278. | Two 3 s sound effects, cold start | ~13 s |
  279. | 20 s of music, warm | ~10 s (2× real time) |
  280. | Continue to 35 s, incl. loading the encoder | ~27 s |
  281. | 15 s of music with `sm-music`, warm | ~1 s |
  282. Medium model on Windows with an RTX 3060 12 GB:
  283. | Task | Time |
  284. |---|---|
  285. | Two 3 s sound effects, cold start (incl. ~20 s model load) | ~25 s |
  286. | 20 s of music, warm | ~1.3 s |
  287. | Continue to 30 s, warm | ~2.2 s |
  288. | 380 s of music (the maximum), warm | ~15 s |
  289. | 15 s of music with `sm-music`, warm | ~0.7 s |
  290. On a Mac, loaded models use about 5–7 GB of memory. On the RTX 3060, the medium model peaked at about 5.3 GB of VRAM. Models are freed after the idle timeout or by `unload_models`.
  291. ## 📝 Prompting tips
  292. <details>
  293. <summary><b>From the official Stable Audio 3 prompt guide</b></summary>
  294. 1. **English, 1–2 sentences, up to ~45 words.** Avoid vocal words such as vocals, singer or lyrics.
  295. 2. **Music:** genre + adjectives → lead instruments → supporting layers → drums/rhythm → mood. Put the tempo in `bpm`.
  296. > Lo-fi hip-hop chill track with mellow electric piano, soft vinyl crackle, low-pass filtered drums and soft plucked bass for a relaxed, dreamy vibe.
  297. 3. **Sound effects:** fill in source, action, material and space.
  298. > source: glass bottle / action: shattering on impact, fragments scattering / material: thick green glass, sharp bright transient / space: concrete floor, close-up, dry
  299. 4. **Match the length to the content:** impacts 1–3 s, actions 3–6 s, ambience 6–15 s+, loops 6–20 s, full tracks 120–300 s (max 380 s).
  300. 5. **Timing instructions** like "climax at 15 s" are not followed reliably. Generate first, then use `inpaint` or `continue`.
  301. 6. The defaults `steps=8` and `cfg=1.0` are the official settings. For stricter prompt adherence, or to use `negative_prompt`, try `cfg` 3–7 (about 2× slower).
  302. 7. Results vary a lot by seed. Ask for 2–4 `variations` and pick the best.
  303. The full guide is also sent to the client as the server's instructions.
  304. </details>
  305. ## ❓ FAQ
  306. <details>
  307. <summary><b>Does it run on Windows, Linux or Intel Macs?</b></summary>
  308. **Windows:** yes, with an NVIDIA GPU. See [Quick start](#-quick-start).
  309. **Linux:** with an NVIDIA GPU it uses the same PyTorch backend and should work, but it is untested. Use the `cuda` extra: `uvx --python 3.11 --torch-backend cu126 --from "audio-studio-mcp[cuda]" audio-studio-mcp setup`, and log in to Hugging Face as on Windows.
  310. **Intel Macs and AMD GPUs** are not supported.
  311. </details>
  312. <details>
  313. <summary><b>"Intel Macs are not supported" on an Apple Silicon Mac?</b></summary>
  314. The environment was built with an x86_64 Python (for example an old Intel Homebrew under `/usr/local`) that runs under Rosetta, so MLX was skipped. With uvx, ask for uv's own arm64 Python, in setup and in your client's config: `uvx --python cpython-3.11-macos-aarch64 audio-studio-mcp`. With the install script, re-run `./install.sh`: it asks uv for an arm64 Python and recreates such a `.venv`. If you set `UV_PYTHON` yourself, point it at an arm64 build: `UV_PYTHON=cpython-3.11-macos-aarch64 ./install.sh`.
  315. </details>
  316. <details>
  317. <summary><b>Can it make songs with vocals?</b></summary>
  318. No. Stable Audio 3 generates instrumental music and sound effects. It cannot produce intelligible singing or lyrics.
  319. </details>
  320. <details>
  321. <summary><b>Can I use the generated audio commercially?</b></summary>
  322. The code here is MIT. The model weights are under the [Stability AI Community License](https://huggingface.co/stabilityai/stable-audio-3-optimized), which sets the terms for the model and what it generates. Read it before commercial use. At the time of writing it allows commercial use for individuals and organizations with less than US$1M in total annual revenue.
  323. </details>
  324. <details>
  325. <summary><b>Will an 8 GB Mac work?</b></summary>
  326. It hasn't been tested. The medium model needs about 5–7 GB while loaded, so 16 GB is recommended. The small `sm-music` / `sm-sfx` models are lighter.
  327. </details>
  328. <details>
  329. <summary><b>My loop clicks at the seam.</b></summary>
  330. Use WAV or OGG for loops. MP3 adds padding at the start and end, so it can't loop seamlessly. Also try a longer `loop_crossfade_ms`, or ask the model to cut on a bar line.
  331. </details>
  332. ## 🗺️ Roadmap
  333. - [x] Apple Silicon backend (Stable Audio 3, MLX)
  334. - [x] Windows backend for NVIDIA GPUs (Stable Audio 3, PyTorch)
  335. - [x] Local web UI (`--web`)
  336. - [x] One-command install with `uvx`
  337. - [x] Listen in the chat (MCP Apps player)
  338. - [ ] LoRA support (the upstream runtime already has it)
  339. Issues and pull requests are welcome.
  340. ## ⭐ Like it? Star it
  341. If Audio Studio made a sound you ended up using, please click **⭐ Star** at the top of the [repository page](https://github.com/kanaworksai-hue/audio-studio-mcp). It's free, takes one second, and helps more than it looks:
  342. - **More people find it.** Stars make the project easier to discover on GitHub, so more game developers and video makers get to use it.
  343. - **It keeps updates coming.** Every star tells me someone finds this useful. That's what keeps me working on the next update, like LoRA support.
  344. Other ways to help: [open an issue](https://github.com/kanaworksai-hue/audio-studio-mcp/issues) for a bug or an idea, or share a sound you made on X and tag [@KanaWorks_AI](https://x.com/KanaWorks_AI).
  345. ## 🛠️ Development
  346. ```bash
  347. uv run pytest # offline tests, no model needed
  348. .venv/bin/python scripts/smoke_test.py # end-to-end with the real model (~30 s on an M1)
  349. rm -rf dist && uv build && WHL=$(ls dist/*.whl) # the same against the built wheel, as uvx runs it:
  350. uvx --python 3.11 --from "$WHL" audio-studio-mcp setup -y
  351. .venv/bin/python scripts/smoke_test.py --server "uvx --python 3.11 --from $WHL audio-studio-mcp"
  352. ```
  353. On Windows: `.venv\Scripts\python scripts\smoke_test.py` (~45 s on an RTX 3060, including model loading).
  354. ```
  355. src/audio_studio_mcp/
  356. server.py MCP tools (backend-independent)
  357. runtime.py where the runtime and outputs live; fetches the runtime for uvx installs
  358. firstrun.py `audio-studio-mcp setup`
  359. weights.py model weights: what is downloaded, downloading
  360. prompts.py prompt building and the instructions sent to clients
  361. post.py post-processing and export
  362. backends/base.py backend interface
  363. backends/sa3_mlx.py Stable Audio 3 on Apple Silicon (MLX)
  364. backends/sa3_torch.py Stable Audio 3 on NVIDIA GPUs (PyTorch)
  365. web.py web UI server (--web) and its JSON API
  366. static/ web UI (HTML/JS/CSS, no build step)
  367. ```
  368. A new platform is added as another backend in `backends/`.
  369. ## 📄 License and credits
  370. - **This project:** [MIT](LICENSE).
  371. - **Stable Audio 3 runtime:** downloaded by `setup` (or into `vendor/` by the install scripts) at a pinned commit. It is © Stability AI and MIT-licensed.
  372. - **Model weights:** licensed under the [Stability AI Community License](https://huggingface.co/stabilityai/stable-audio-3-optimized). They are downloaded from Hugging Face (macOS: `stable-audio-3-optimized`; Windows: `stable-audio-3-medium` and the small models), not distributed here.
  373. - **Brand:** the KanaWorks_AI name, logo and the Kana character are © 東京AI映像合同会社 (Tokyo AI Visuals LLC) and are **not** covered by the MIT license. See [docs/brand](docs/brand/README.md).
  374. - **Fonts:** the web UI ships IBM Plex Sans, © IBM Corp., under the SIL Open Font License 1.1 ([`OFL.txt`](src/audio_studio_mcp/static/fonts/OFL.txt)). The Kana images in the web UI ([`static/brand`](src/audio_studio_mcp/static/brand/README.md)) are covered by the Brand note above.
  375. - **Built on:** [Stable Audio 3](https://github.com/Stability-AI/stable-audio-3), [MLX](https://github.com/ml-explore/mlx), [PyTorch](https://pytorch.org) and the [Model Context Protocol](https://modelcontextprotocol.io).
  376. This is an independent project. It is not affiliated with or endorsed by Stability AI, Apple, NVIDIA or Anthropic.
  377. <br>
  378. <div align="center">
  379. <a href="https://x.com/KanaWorks_AI"><img src="docs/brand/kana-wave.png" width="150" alt="Kana, the KanaWorks_AI mascot, waving"></a>
  380. <p><b>Made with ♥ by <a href="https://x.com/KanaWorks_AI">KanaWorks_AI</a></b></p>
  381. <p><sub>If Audio Studio saves you time, a ⭐ keeps the updates coming and helps others find it. More projects: <a href="https://github.com/kanaworksai-hue">github.com/kanaworksai-hue</a></sub></p>
  382. </div>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.