The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Audio Sonic MCP listing page.
Turn any song into a structured "sonic signature" — extracting tempo, musical key, a 512-dimension CLAP vibe embedding, human-readable vibe tags, and a production profile — from a single local call.
Audio Sonic MCP runs entirely on your local machine (requiring no API keys, external servers, or cloud dependencies) and exposes two premium access points to the same underlying high-fidelity audio analysis engine:
| Tailored For | Core Interface & Mechanics | |
|---|---|---|
| 🤖 MCP Server | LLMs, AI agents, & IDEs (Claude, Cursor, Windsurf, Cline) | Asynchronous, fire-and-forget analysis of YouTube URLs. Avoids blocking client LLMs during heavy audio processing. |
| 🎚️ Local CLI | Musicians, sound producers, & audio engineers | Deep command-line tool targeting local files for full-song multi-window analysis and high-fidelity output. |
--summary mode)key_map tracking section-by-section modulations.[clap]) are omitted.Ensure you have Python 3.10+ and FFmpeg installed and accessible on your system PATH.
brew install ffmpegsudo apt update && sudo apt install -y ffmpegwinget install Gyan.FFmpeg via PowerShell (Administrator), or download manually from ffmpeg.org and add the bin directory to your system environment variables.Clone the Repository
Initialize Virtual Environment
Install Dependencies Choose between the lightweight core engine or the full high-fidelity ML suite:
[!NOTE] The optional
[clap]stack installstorch,torchaudio,transformers, anddemucs. Without these, the server automatically switches to light fallbacks (HPSS instead of Demucs, standard feature matrices instead of CLAP vectors, and leaves outvibe_tags).
Audio Sonic MCP registers itself as a standard package script. This enables you to run it using the global executable name (audio-sonic-mcp) directly from your virtual environment's bin folder, or run the script file manually.
Open your Claude configuration file:
%APPDATA%\Claude\claude_desktop_config.json~/Library/Application Support/Claude/claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonAdd the server to your mcpServers object:
[!IMPORTANT] Windows Users: Always use double backslashes (
\\) in JSON configuration paths. Point the executable directly to the.exeinside your.venv\Scripts\directory.
To integrate Audio Sonic MCP into Cursor's AI pane:
audio-sonic-mcpcommand/path/to/audio-sonic-mcp/.venv/bin/audio-sonic-mcp (use .exe extension on Windows)Open your Windsurf MCP configurations file (typically found at ~/.codeium/windsurf/mcp_config.json) and append the configuration:
Open Cline's MCP setting file (usually located at %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json or equivalent platform storage) and add:
LLMs automatically learn how to use this server by reading its exposed tool definitions. Because audio stem separation and CLAP embeddings are computationally demanding, Audio Sonic MCP uses an Asynchronous Fire-and-Forget Job Pattern.
https://www.youtube.com/watch?v=XXXXXX."sig_a1b2c3d4 and summarize the BPM, production width, and vibe once complete."For musicians, engineers, and producers working directly in the terminal, you can analyze a full-length local file directly without running any background servers:
| Option | Shorthand | Description |
|---|---|---|
path | None | Absolute or relative path to the local audio file (Required). |
--summary | -s | Print a clean, formatted terminal summary instead of standard JSON. |
--no-vector | None | Generate JSON signature but omit the heavy 512-dimension vibe float array. |
--out FILE | -o | Output the final JSON signature directly to the specified file. |
--keep | -k | Do not delete intermediate WAV files or separated stem files in jobs/. |
--job-id ID | -j | Explicitly define the internal identifier (useful for batch scripts). |
Supported File Formats: wav, mp3, flac, ogg, m4a, aac.
Configure environment options by declaring these variables in your active terminal session, container environment, or the env block of your MCP configuration file:
| Variable | Default Value | Description / Practical Use |
|---|---|---|
JOBS_ROOT | ./jobs | Workspace directory where audio files, temporary converted WAVs, and stems are processed. |
KEEP_JOB_FILES | Unset | Set to 1 or true to keep separated stem WAVs on disk (adds ~75MB per job, useful for troubleshooting). |
FILE_MAX_DURATION_SEC | 600 | Safety ceiling for local file processing duration (YouTube downloads are capped at 60 minutes). |
FFMPEG_BIN | Unset | Path to folder containing the ffmpeg binary if it is not present in your system PATH. |
YTDLP_PROXY | Unset | HTTP/SOCKS proxy string passed directly to yt-dlp to bypass rate limits or network blocks. |
TRANSPORT_MODE | stdio | Transport the server listens on: stdio (default, for local MCP clients), sse (remote MCP over HTTP), or hybrid (MCP SSE and the REST API from app_cloud.py). sse/hybrid need pip install ".[cloud]". |
PORT | 8000 | Listening port when TRANSPORT_MODE is sse or hybrid. Ignored for stdio. |
If you prefer to avoid setting up local Python libraries, running via containers encapsulates FFmpeg, yt-dlp, and the core Python dependencies (CPU-based pipeline):
To connect Claude Desktop to your Docker container, configure claude_desktop_config.json:
Audio Sonic MCP pipelines are constructed modularly, using transactional checkpoints to ensure reliability.
mdx_extra) separates the track into isolation stems (vocals, drums, bass, other). If missing, it gracefully drops back to Harmonic-Percussive Source Separation (HPSS).laion/larger_clap_music_and_speech) runs zero-shot inference against high-coverage aesthetic descriptors (moods, textures, genres), choosing top candidates across stylistic poles.Upon the very first analysis job utilizing the full ML pipeline, demucs and transformers will download their pre-trained model weights (approximately 400 MB for Demucs, and 200 MB for CLAP).
stderr so they do not corrupt the JSON-RPC standard stream.get_job_status will remain in running. Allow 1–3 minutes depending on your network speed. Subsequent startups take under 10 seconds.Model inference on multi-staged architectures is highly CPU/VRAM intensive. To protect consumer hardware and virtual environments from crashing (OutOfMemory exceptions), Audio Sonic MCP enforces a strict global serialization lock (CONCURRENCY_LOCK).
get_job_status for subsequent jobs will report queued or running while they wait in the pipeline queue.FastMCP thread dispatching under Windows can cause Numba compilation deadlocks inside background worker threads. To prevent this, Audio Sonic MCP incorporates a Pre-warming Routine (_prewarm_librosa() and _prewarm_demucs()) on launch. It forces JIT compile of resampling, HPSS, and mono-mixing functions in the main thread before starting the RPC listener.
bpm_engine FieldTempo is estimated by madmom's RNN beat tracker. madmom is an optional dependency: it is unmaintained (latest release 0.16.1, classifiers stop at Python 3.7) and requires a Cython build, so it cannot be installed reliably everywhere and is not part of the default install.
When madmom is unavailable the pipeline falls back to librosa. That fallback is good on steady four-on-the-floor material but can lock onto a 2:3 or octave multiple of the true tempo — on one of our regression fixtures it reports 99.4 BPM against a ground truth of 148.
So the tempo is never reported unqualified. Every payload carries a bpm_engine field naming the engine that actually produced the number:
bpm_engine | Meaning |
|---|---|
madmom | RNN beat tracker — full accuracy. |
librosa-fallback | madmom unavailable; treat BPM as approximate and expect occasional octave/triplet errors. |
check_health reports madmom's status explicitly. To enable the accurate path:
If the build fails on a recent Python, use 3.10 for the analysis environment — madmom has no wheels for newer interpreters.
check_healthIf the server reports as degraded or tools are missing, call the check_health tool or check CLI warnings. It queries:
ffmpeg on the execution path.librosa, soundfile, mcp, etc.).madmom beat tracker, and which bpm_engine will be used as a result.JOBS_ROOT directory.Run unit tests inside your virtual environment to verify the mathematical pipelines using synthesized audio waveforms:
Distributed under the MIT License. See LICENSE for details.
© 2026 Ripunjay Kashyap. All rights reserved.