Audio Analyzer

io.github.JuzzyDee由 GitHub 账号 JuzzyDee 发布v1.0.0更新于 Oct 24, 2026

Gives LLMs ears. Spectral, harmonic, rhythm, stereo, and structural audio analysis.

已验证STDIO仅桌面数据与分析媒体与设计

概览

AI 生成的概览

一个本地 MCP 服务器,让助手分析磁盘上的音频文件,以紧凑文本返回调性、速度、响度、立体声、音色和段落信息。

可以做什么
读取本地音频文件(mp3、wav、flac、ogg、aac)的基本信息,如时长、采样率和采样数。计算频谱与时域特征:亮度、丰富度、MFCC 音色、频段能量、频谱对比度、动态范围、LUFS 响度和立体声场。检测调性、音级分布和 tonnetz,以及速度、节拍位置和速度稳定性。执行完整分析,将上述内容与打击乐特征和结构段落边界合并。并排比较两首曲目,输出紧凑的差异表。可选按低、中、高或自定义分辨率返回时间序列表,展示特征随时间的变化。
适用场景
适合让助手描述、诊断或比较本机已有的音乐和其他音频文件,例如查看调性与速度、判断混音响度与立体声问题,或梳理歌曲段落。适用于音乐制作和音频审阅,而非播放或编辑。
运行要求
作为本地 stdio 进程在用户机器上运行,可通过平台专用安装包用于 Claude Desktop,或以二进制形式用于 Claude Code;从源码构建需要 Rust 和 Cargo。需要 Claude Desktop 或 Claude Code,无法在浏览器或移动应用中使用。未声明账户、API 密钥或环境变量。音频文件须以完整本地路径提供。
安装前请注意
它会按路径直接读取本地磁盘上的音频文件,请只指向你愿意被分析的文件。它只做只读分析,不会修改文件。分析结果以文本形式交给助手,文件内容及派生特征仅作为对话的一部分离开本机。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Audio Analyzer,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

audio_visualizer_rs

An MCP server that gives Claude the ability to hear music.

Point Claude at any audio file and it can tell you the key, tempo, dynamics, timbre, percussive character, stereo field, structural sections, and how the music evolves over time -- all from raw audio analysis, no images, no guessing, under 1% context window usage.

Compare two tracks side-by-side. Detect where the music changes structurally — intro, verse, chorus, bridge — and zoom into the moments that matter.

What is this?

LLMs can see (vision) and read (text), but they can't hear. This project bridges that gap by running real audio analysis -- the same DSP techniques used in music information retrieval research -- and returning structured numerical data that Claude can reason about.

It's an MCP server that exposes audio analysis as tools Claude can call on demand. Ask Claude to analyze a song and it will decode the audio, run spectral/harmonic/rhythm/percussive analysis, and return the results as compact text. No spectrograms, no images, no wasted tokens.

Full analysis of a 60-second track completes in under 2 seconds (including source separation). Pure Rust. No Python, no FFmpeg, no system dependencies.

Features

  • Audio decoding -- mp3, wav, flac, ogg, aac via Symphonia (pure Rust)
  • Spectral analysis -- centroid (brightness), bandwidth (richness), rolloff, flatness (tonality)
  • Frequency band energy -- RMS energy across 7 standard producer bands (sub-bass through brilliance) for mix diagnosis
  • Spectral contrast -- peak vs valley per band in dB, reveals clarity vs muddiness
  • Dynamic range -- crest factor, loudness range (95th-5th percentile), peak dBFS
  • LUFS loudness -- EBU R128 integrated loudness (ITU-R BS.1770-4 stereo channel summing), true peak (dBTP), loudness range (LRA), streaming platform targets. Validated to 0.0 dB of FabFilter Pro-L 2.
  • Stereo field analysis -- phase correlation (mono compatibility), stereo width (mid/side ratio), L/R balance, mono compatibility score. Per-frame time-series to pinpoint where phase issues occur.
  • Temporal features -- RMS energy (loudness), zero crossing rate (texture)
  • Timbre -- 13 MFCCs (Mel-frequency cepstral coefficients)
  • Harmonic analysis -- chromagram, key detection (Krumhansl-Schmuckler algorithm), tonnetz
  • Rhythm analysis -- tempo estimation, beat tracking, onset detection, tempo stability
  • Percussive character -- harmonic/percussive source separation (HPSS), attack sharpness, onset density
  • Section boundary detection -- multi-feature novelty analysis detects structural changes (energy, spectral, harmonic, texture). Enables a summary→zoom workflow: get the map, then dive into interesting moments
  • A/B comparison -- analyse two tracks side-by-side, get a compact diff table highlighting differences in loudness, dynamics, spectral balance, stereo field, key, and tempo
  • Time-series data -- track how every feature evolves over time at selectable resolution
  • Token-efficient -- downsampled output calibrated to fit comfortably in the context window

See it in action

Watch a fresh Claude analyse four tracks in one session — an original piano/brass composition, Bohemian Rhapsody's full structure mapped with section boundaries, an A/B mix comparison with production advice, and a thunderstorm field recording where it triages music metrics as "meaningless" vs "physically real." All four analyses fit in a single context window.

Installation

Claude Desktop — one-click install

Download the .mcpb bundle for your platform from GitHub Releases and open it. Claude Desktop will handle the rest — no config files, no terminal, no setup.

PlatformFile
macOS (Apple Silicon)audio-analyzer-darwin-arm64.mcpb
macOS (Intel)audio-analyzer-darwin-x64.mcpb
Windowsaudio-analyzer-win32-x64.mcpb
Linuxaudio-analyzer-linux-x64.mcpb

Claude Code — Homebrew (macOS)

bash
brew tap JuzzyDee/tapbrew install audio-analyzerclaude mcp add --scope user audio-analyzer -- $(which audio-analyzer-mcp)

Claude Code — manual (all platforms)

Download the mcp-server binary for your platform from GitHub Releases, then:

bash
claude mcp add --scope user audio-analyzer -- /path/to/mcp-server

Build from source

bash
git clone https://github.com/JuzzyDee/audio-analyzer-rs.gitcd audio-analyzer-rscargo build --releaseclaude mcp add --scope user audio-analyzer -- target/release/mcp-server

Restart Claude Desktop. The audio analysis tools will be available in your conversations.

Note: This is a local MCP server using stdio transport, so it requires Claude Code or Claude Desktop. It does not work with claude.ai in the browser or mobile apps.

Usage

Important: This tool analyses files on your local machine. Give Claude the full file path (e.g., /Users/you/Music/song.mp3) -- don't try to upload or attach files to the chat. Claude will read the file directly from disk.

CLI (standalone)

bash
cargo run --bin cli -- /path/to/song.mp3cargo run --bin cli -- compare /path/to/mix_v1.mp3 /path/to/mix_v2.mp3

MCP tools

Once configured, Claude can call these tools directly:

ToolWhat it does
audio_infoBasic file info: duration, sample rate, sample count
spectral_featuresBrightness, richness, loudness, texture, timbre (MFCCs), frequency band energy, spectral contrast, dynamic range, LUFS loudness, stereo field
harmonic_analysisKey detection, pitch class distribution, tonnetz
rhythm_analysisTempo (BPM), beat positions, tempo stability
full_analysisEverything above in one call, plus percussive character (HPSS), stereo field, and section boundaries. Recommended workflow: call without resolution first to get summary + section map, then zoom into interesting sections with start_time/end_time at high resolution
compareA/B two tracks -- analyses both and returns a compact diff table

Example: full_analysis output

Here's what full_analysis returns for a 60-second jazz trio track:

═══ Full Audio Analysis ═══File: /music/jazz_trio.mp3Duration: 60.62 sec | Sample rate: 48000 Hz | Samples: 2909952Analysis completed in: 2.02s
── Spectral/Temporal Features ──Centroid (brightness):  2812 Hz — moderateBandwidth (richness):   3933 Hz — complexRolloff (energy focus): 6489 HzFlatness (tonality):    0.0824 — strongly tonalRMS Energy (loudness):  0.1160Zero Crossing Rate:     0.0402 — mixedMFCCs (timbre):         [-141.3, 13.7, 0.9, 7.7, -2.5, 3.1, -1.7, 2.3, -0.9, 1.0, -0.5, 0.9, 0.6]
── Frequency Band Energy ──Sub bass  (20–60 Hz):     0.007803Bass      (60–250 Hz):    0.013043Low-mid   (250–500 Hz):   0.004906Mid       (500–2k Hz):    0.002165Upper-mid (2k–4k Hz):     0.000203Presence  (4k–6k Hz):     0.000166Brilliance(6k–20k Hz):    0.000089
── Spectral Contrast (peak–valley dB) ──Sub bass  (20–60 Hz):     10.4Bass      (60–250 Hz):    20.4Low-mid   (250–500 Hz):   26.0Mid       (500–2k Hz):    30.9Upper-mid (2k–4k Hz):     19.4Presence  (4k–6k Hz):     16.6Brilliance(6k–20k Hz):    55.2
── Harmonic Content ──Estimated key: E minor (confidence: 0.538)Top pitch classes:   1. G  0.627 ███████████████   2. E  0.561 ██████████████   3. C  0.512 ████████████   4. D# 0.495 ████████████   5. F# 0.487 ████████████   6. C# 0.459 ███████████
── Rhythm ──Tempo: 84.0 BPM (confidence: 0.316)Beats detected: 69Mean tempo: 84.3 BPM | Median: 84.0 BPMStability: 0.951 (0=free, 1=locked)
── Percussive Character ──Percussive ratio:    0.277 — harmony-dominatedOnset density:       7.0/sec — very densePeak attack sharp:   1.000
── Dynamic Range ──Peak:            -0.44 dBFSCrest factor:    16.2 dB — very dynamicLoudness range:  76.4 dB — very dynamicQuiet sections:  -87.5 dBFS | Loud sections: -11.1 dBFS
── Loudness (EBU R128) ──Integrated:      -12.1 LUFSTrue peak:       0.0 dBTPLoudness range:  3.7 LUSpotify (-14):   turned DOWN 1.9 dB | Apple (-16): turned DOWN 3.9 dB | YouTube (-14): turned DOWN 1.9 dB
── Stereo Field ──Phase correlation:   0.257 avg, -0.822 min — some phase issuesPhase warnings:      20.6% of frames have negative correlationStereo width:        0.812 avg, 2.747 max — wideBalance:             -0.095 — slightly leftMono compatibility:  0.620 avg, 0.117 min — significant mono loss
── Section Boundaries ──  Working BPM:     84 (confidence: 0.32)  Boundaries:      2     0:18.3s  energy+spectral+texture (confidence: 0.85)     0:42.1s  energy+harmonic (confidence: 0.67)

When you add resolution: "medium", the output also includes a time-series table showing how every feature changes over the track's duration -- letting Claude see the intro build, the dynamic solo section, and the quiet outro.

Time-series resolution

All analysis tools accept an optional resolution parameter that controls time-series output:

PresetData points/secUse case
"low"~0.5/secBroad overview, equivalent to what you'd eyeball from a spectrogram image
"medium"~1/secGood default for most analysis tasks
"high"~4/secDetailed view for short passages or zooming in on transitions

You can also pass a numeric string (e.g., "20") for custom rates.

Without resolution, tools return summary statistics only (averages across the whole track). With it, you get a compact TSV table showing how features evolve over time -- centroid, RMS, dynamic range, chroma, onset strength, percussive ratio, band energy, spectral contrast, and more, all aligned to the same time axis.

The presets are calibrated for token efficiency. A 3-minute track at "medium" resolution produces roughly 180 rows of data -- enough to track musical structure without blowing up the context window.

Architecture

audio file    |    +---> load_audio()          -- Symphonia decodes to mono f32 samples    |         |    |         v    |     compute_spectrogram() -- STFT via rustfft, time-frequency matrix    |         |    |         +---> spectral.rs    -- centroid, bandwidth, rolloff, flatness, MFCCs, band energy, contrast    |         +---> temporal.rs    -- RMS energy, zero crossing rate, dynamic range    |         +---> harmonic.rs    -- chromagram, key detection, tonnetz    |         +---> rhythm.rs      -- onset detection, tempo, beat tracking    |         +---> percussive.rs  -- HPSS (source separation), attack sharpness, onset density    |         +---> sections.rs    -- section boundary detection (multi-feature novelty)    |    +---> load_audio_stereo()   -- preserves L/R channels              |              +---> stereo.rs      -- phase correlation, width, balance, mono compatibility              +---> temporal.rs    -- LUFS loudness (ITU-R BS.1770-4 stereo channel summing)    |    vdownsample.rs                   -- bin-average to target resolution, format as TSV

Two binaries share the same analysis library:

  • cli (src/main.rs) -- runs all analyses and prints results
  • mcp-server (src/mcp_server.rs) -- exposes tools over stdio JSON-RPC via rmcp

Key dependencies: symphonia (audio decoding), rustfft (FFT), rmcp (MCP SDK).

Changelog

See CHANGELOG.md for version history.

License

MIT License. See LICENSE for details.

来源:README.md,提交 0387fe1

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分