No project description provided
Project description
audio-analysis-mcp
A Python MCP server providing audio analysis tools for AI-driven sound recreation. It imports, separates, analyzes, and compares audio so an AI agent can configure hardware synthesizers to match a target sound.
Tools
| Tool | Description |
|---|---|
import_audio |
Import a local audio file, normalize to 44.1kHz 16-bit mono WAV |
stem_separate |
Separate audio into stems (vocals, drums, bass, other, guitar, piano) using Demucs |
audio_list_devices |
List available audio input devices |
audio_render |
Capture audio from a system device (BlackHole, USB audio) |
spectrum_analyze |
Extract mel spectrogram, spectral features, ADSR, and modulation |
audio_compare |
Compare target vs. synthesized audio (mel spectrogram distance, per-band energy) |
note_transcribe |
Polyphonic transcription via Basic Pitch — outputs MIDI + note events JSON |
note_triage |
Analyze transcription, select best candidate notes for isolation |
note_isolate |
Isolate a note from audio within a time-frequency box via STFT masking |
amplitude_analyze |
Per-cluster ADSR analysis with cross-candidate consistency check (not ready for production — see docs/TODO.md) |
Install & run
Requires uv (which provisions Python 3.11 for you — the pin matters: Basic Pitch needs CoreML/TensorFlow, which break on 3.12+).
-
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh -
Add this to your MCP client config:
{ "mcpServers": { "audio-analysis-mcp": { "command": "uvx", "args": ["audio-analysis-mcp"] } } }
-
Restart the client. Most tools work out of the box; three need optional deps (below):
audio_renderandaudio_list_devicesneed PortAudio, andstructure_analyzeneeds SongFormer.
Optional: audio_render (system-audio capture)
audio_render / audio_list_devices need PortAudio (brew install portaudio on macOS), plus BlackHole for system audio. Without them the server still runs; only those two tools error.
Optional: structure_analyze (song-structure detection)
Needs SongFormer. Enable it by adding it to the run:
{
"mcpServers": {
"audio-analysis-mcp": {
"command": "uvx",
"args": ["--with", "songformer @ git+https://github.com/uribrecher/SongFormer.git@v0.2.0", "audio-analysis-mcp"]
}
}
}
License note: this pulls MuQ model weights licensed CC-BY-NC-4.0 (non-commercial use only). SongFormer's own code/weights are CC-BY-4.0 (ASLP-lab/NPU).
FastAPI service mode
The HTTP /jobs/* service is an optional extra: uvx --from 'audio-analysis-mcp[service]' python -m audio_analysis_mcp.service.
Development
uv sync --dev --group research --extra service # dev tools + signalflow (tone_generation tests)
uv run pytest -m "not slow" # fast suite (CI default)
uv run mypy src/ # type check
uv run python -m audio_analysis_mcp # run the stdio server from source
Scratch tools
The scratch/ directory holds ad-hoc Python scripts used during research and
debugging — not part of the MCP server. They explore algorithms (clustering,
ADSR fitting, envelope shapes, overlap detection), inspect intermediate
outputs from real songs (e.g. Van Halen "Jump" triage clusters), and generate
the plots referenced from docs/TODO.md and docs/research/.
These scripts are intentionally untested and may bit-rot as the underlying
analysis modules evolve. Treat them as a notebook: useful starting points for
reproducing past experiments or scaffolding new ones, not as a stable API.
Run them directly with uv run python scratch/<script>.py.
License
Licensed under the GNU General Public License v3.0 (GPL-3.0-or-later). See LICENSE.
This project depends on GPL-licensed components (notably vmo and cvxopt, both
GPLv3), so the combined work is distributed under the GPL.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file audio_analysis_mcp-0.1.0.tar.gz.
File metadata
- Download URL: audio_analysis_mcp-0.1.0.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8da80494e51cda01bc2884e02c60589e07a6c4f44b22f9bb4679908d5fe65b9d
|
|
| MD5 |
6d35cc262ca9a7c84a1808c26d99a6c6
|
|
| BLAKE2b-256 |
7fbf778e79004d1f56ce84821ca9b0009f6ddf379889925687550462c10348b9
|
Provenance
The following attestation bundles were made for audio_analysis_mcp-0.1.0.tar.gz:
Publisher:
publish.yml on uribrecher/audio-analysis-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
audio_analysis_mcp-0.1.0.tar.gz -
Subject digest:
8da80494e51cda01bc2884e02c60589e07a6c4f44b22f9bb4679908d5fe65b9d - Sigstore transparency entry: 1854364886
- Sigstore integration time:
-
Permalink:
uribrecher/audio-analysis-mcp@9f8f3c00d19aeb08f7b561f3d78b46cc89d3dd82 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/uribrecher
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9f8f3c00d19aeb08f7b561f3d78b46cc89d3dd82 -
Trigger Event:
push
-
Statement type:
File details
Details for the file audio_analysis_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: audio_analysis_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 75.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ee8136518266cc2ce20cdf4a6e4cb97fe9035548c4ad0979111a7643bb9a989
|
|
| MD5 |
3960ad704c395a2fce244fbc78853ff5
|
|
| BLAKE2b-256 |
199a1416198688888e85cc4d59c07ce3c37e8132534f1da2141a4c906999d7d4
|
Provenance
The following attestation bundles were made for audio_analysis_mcp-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on uribrecher/audio-analysis-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
audio_analysis_mcp-0.1.0-py3-none-any.whl -
Subject digest:
3ee8136518266cc2ce20cdf4a6e4cb97fe9035548c4ad0979111a7643bb9a989 - Sigstore transparency entry: 1854364928
- Sigstore integration time:
-
Permalink:
uribrecher/audio-analysis-mcp@9f8f3c00d19aeb08f7b561f3d78b46cc89d3dd82 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/uribrecher
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9f8f3c00d19aeb08f7b561f3d78b46cc89d3dd82 -
Trigger Event:
push
-
Statement type: