Skip to main content
Glama

audio-mcp

Audio perception for AI agents. Language models can't hear. This MCP server turns sound into things they can reason about: measurements, plain-language problem reports, spectrogram images, note lists, event timelines, transcripts and before/after diffs. It can also edit and synthesize audio, so an agent can work in a loop: make or fix a sound → measure it → look at it → verify the change.

Everything runs locally. No GPU, no API keys. Core dependencies: numpy, scipy, soundfile, matplotlib.

Real output (JSON abbreviated) from the bundled demo, scripts/demo.py:

> audio_analyze voice_raw.wav          # speech recorded with mains hum and hiss
  levels: lufs_integrated -32.16, true_peak_dbtp -11.76, clipped_samples 0
  issues: [warning] Mains hum at 60 Hz (peaks at 60, 180 Hz). Fix: notch each with
                    {"op":"eq","hz":60,"db":-30,"q":30}, {"op":"eq","hz":180,"db":-30,"q":30};
                    for voice, highpass at ~80-100 Hz also removes the fundamental.
          [info]    Noise floor around -33.4 dBFS in the quietest parts; hiss or background noise may be audible.

> audio_events sfx.wav                 # a zap, a noise hit, another hit, a rising chirp
  0.09-0.36s | -4dB  | tonal | balanced          | glide G#6->B3 (-33st) | sharp attack
  0.59-0.69s | -16dB | noisy | very bright/harsh | sharp attack
  ...

> audio_melody melody.wav              # "Mary Had a Little Lamb", transcribed blind
  E4(0.23) D4(0.24) C4(0.23) D4(0.24) E4(0.25) E4(0.25) E4(0.5) D4(0.24) D4(0.26) D4(0.49) E4(0.25) G4(0.26) G4(0.47)

Tools

Tool

What it gives the agent

audio_analyze

Peak, true peak, RMS, LUFS loudness, clipping, DC offset, a loudness sparkline, silence and noise floor, stereo correlation/width/balance, band energy, brightness, tonal vs. noisy, strongest frequencies as note names, pitch, onsets, tempo, edge clicks, loop-seam quality, and an issues list in plain language with suggested fixes

audio_events

Splits audio into distinct sounds and describes each one: timing, level, attack, tonal/noisy, brightness, pitch or glide

audio_view

PNG waveform and/or spectrogram, with an optional pitch overlay. Every column covers its full time span, so short clicks aren't skipped on long files

audio_timeline

Level and brightness over time. Streams the file, so it works on recordings of any length

audio_melody

Single-line transcription: notes, timings, cents, compact text

audio_transcribe

Speech to text with local Whisper: timed words, language, speaking rate, long pauses and uncertain words (optional extra)

audio_compare

A/B summary, metric deltas, per-band dB changes, issues fixed or introduced, and a null test (identical? only a gain change? lightly changed?)

audio_process

An ordered chain of edits written to a new file: gain, peak/LUFS normalize, true-peak limiter, compressor, noise reduction, RMS normalize, trim, fades, crop, pad, high/low-pass, peaking EQ, shelves, DC removal, polarity, mono/stereo, resample, reverse, seamless-loop crossfade, mix, append

audio_batch_survey

Audits a folder for consistency (loudness outliers, mixed sample rates/channels/formats, uneven leading silence) and returns ready-to-run fixes

audio_batch_process

Applies one edit chain to many files and writes them to an output folder

audio_synthesize

Declarative synth: band-limited oscillators with phase control, noise colours (pink/brown loop seamlessly), sweeps, ADSR, vibrato, tremolo, filters, pan, note sequences, plus exact test signals (impulse, DC, silence)

audio_info

Metadata for a file, or a listing of the audio files in a folder

audio_check_delivery

Pass/fail against a delivery spec (Apple Podcasts, Spotify, YouTube, EBU R 128, ATSC A/85, ACX audiobooks, game SFX) with cited sources and a fix that has already been tried on your file

audio_check_game_project

Audits a Godot 4 project's audio: loudness consistency per category, loop settings and clicky seams, defects, and broken or unused res:// references

Reads WAV, FLAC, OGG/Vorbis, Opus, MP3, AIFF and CAF natively (via libsndfile). With FFmpeg installed it also reads M4A/AAC (phones, Zoom, voice memos), WMA and the audio of video files (MP4, MOV, WebM, MKV): winget install Gyan.FFmpeg on Windows, brew install ffmpeg on macOS, sudo apt install ffmpeg on Debian/Ubuntu, or set AUDIO_MCP_FFMPEG to the binary. Each file is decoded once per session. Edited files are written as WAV/FLAC/OGG/AIFF/MP3.

Delivery checks

audio_check_delivery tells you whether a file meets a platform's spec and how to fix it if it doesn't. Every criterion shows what's required, what was measured and whether it passes. The suggested fix is an ordered audio_process chain (noise handling before gain, true-peak limiting last) that has already been simulated on your file, and the tool says plainly when something can't be fixed automatically, or when heavy background noise needs a person's judgment. Spec numbers cite their official sources and the date they were checked.

Game projects (Godot 4)

audio_check_game_project(project_dir) audits every .wav/.ogg/.mp3 in a Godot 4 project. It infers categories (UI, SFX, voice, music, ambience) from folder and file names, or takes your own mapping. It reads the .import settings to find music that won't loop, sound effects that loop forever, and loop seams that click. It compares loudness within each category (short sounds by their loudest moment, music by integrated LUFS) and reports outliers with fixes you can run directly. It also scans scenes and scripts for broken, wrongly cased or unused res:// audio references. It never modifies the project.

Related MCP server: audiolla

Install

pip install audio-mcp              # or: uv tool install audio-mcp
pip install "audio-mcp[speech]"    # adds audio_transcribe (faster-whisper; downloads a ~145 MB model on first use)

Connect it to your MCP client

Claude Code

claude mcp add audio -- uvx audio-mcp
# or, if installed with pip:
claude mcp add audio -- audio-mcp

Claude Desktop, Cursor, and other clients (JSON config):

{
  "mcpServers": {
    "audio": { "command": "uvx", "args": ["audio-mcp"] }
  }
}

Then ask things like "check the sound effects in ./sfx for problems", "clean up interview.wav for a podcast" or "design a short UI confirm sound and check it isn't harsh".

Restricting file access

By default the server can read and write any file your user account can. To confine it, set AUDIO_MCP_ALLOWED_DIRS to a list of directories (separated by ; on Windows, : elsewhere):

{ "command": "uvx", "args": ["audio-mcp"], "env": { "AUDIO_MCP_ALLOWED_DIRS": "/home/me/audio" } }

Paths are checked after resolving .. and symlinks. Other settings: AUDIO_MCP_MAX_SECONDS (largest section loaded into memory per call, default 1800), AUDIO_MCP_WHISPER_MODEL (default base), AUDIO_MCP_ROOT (base for relative paths).

How accuracy is checked

The tests mostly use synthetic signals whose correct answer is known by construction, so they check correctness rather than just "no crash":

  • Loudness: our streaming BS.1770 meter matches pyloudnorm's exact-filter mode within 0.01 LU from 8 to 96 kHz, and reads the EBU reference tone (997 Hz, 0 dBFS) at −3.01 LUFS.

  • Limiter: a +15 dBTP input comes out at exactly −1.0 dBTP with no samples touched by the safety clip.

  • Pitch and melody: sines, chirps and synthesized melodies are recovered note for note, including repeated notes; pitch is within 1 cent from 82 Hz to 1760 Hz.

  • Tempo, onsets, events, silence, stereo phase, hum, clipping, alignment offsets: each is checked against a constructed signal.

  • A contract test runs every tool on every content type (silence, DC, noise, full-scale square), length (1 sample to 3 s), format (16/24/float WAV, FLAC, Vorbis), channel count (1, 2, 6) and sample rate (8–96 kHz). Each call must either succeed or fail with an AudioError that explains itself.

  • Memory: analysis is chunked. A 20-minute stereo 48 kHz file analyzes in about 19 s with about 1.2 GB peak memory, 0.7 GB of which is the audio itself.

Design principles

  • Never destructive by default. Edits write <name>_processed.wav; overwriting needs overwrite=true, and batch output can't target the input folder.

  • Errors say what to do next. An unknown op lists every op with its parameters; an undecodable file names the supported formats and how to install FFmpeg for the others. Unexpected errors are reported as bugs instead of being hidden.

  • Honest about uncertainty. Chords set polyphony_likely instead of reporting a confident wrong pitch, weak tempos carry a low-confidence note, Whisper's uncertain words are listed, and LUFS is null for clips under 0.4 s.

  • Compact output. Rounded numbers, sparklines and one-line event summaries keep responses small enough for an agent's context.

Limitations

  • Pitch, melody and per-event pitch assume one note at a time. Chords and full mixes are flagged, not transcribed.

  • Denoise is a spectral gate for steady noise (hiss, hum, fans, room tone). It doesn't remove clicks, music or other voices. Too much sensitivity dulls quiet consonants, so verify speech edits with audio_transcribe.

  • Tempo is a classic autocorrelation estimate; half- and double-tempo errors happen on complex music.

  • The tools describe sound, but they don't judge taste ("is this satisfying?").

Reference signals

audio-mcp-assets is a public-domain pack of test and calibration audio (tones, sweeps, calibrated noise, loudness, stereo and phase tests, impulses, problem files) that an AI agent built using only these tools. Every file is verified against known ground truth, twice, including independently of this project.

Contributing

Improvements from people and AI agents are welcome. See CONTRIBUTING.md; AI coding agents should also read AGENTS.md. The bar for a feature is that it does one thing well, with a test against known ground truth.

License

MIT

Available Tools

14 tools
audio_analyzeA
Read-only

Measure an audio file (or the start..end section): peak/true-peak/RMS/LUFS loudness, clipping, DC offset, a loudness sparkline over time, silence and noise floor, stereo correlation/width/balance, spectral balance (band energy, brightness, tonal vs noisy, strongest frequencies as notes), pitch, onsets/tempo, start/end clicks and loop-seam quality. Ends with issues: plain-language problems ranked by severity. Set pitch/rhythm to false to run faster.

Inputs: path (required), end, pitch, start, +1 more.

audio_batch_processA

Apply one operations chain (same format as audio_process) to every file in a folder or list, writing results with the same relative names into output_dir. Refuses to write into the input folder unless overwrite=true. Example: normalize a set of sound effects to the same loudness: [{"op":"trim_silence"}, {"op":"normalize_lufs","lufs":-18,"limit":true}]. subtype: sample format for every output, e.g. PCM_16, PCM_24, FLOAT, or PCM_U8 for 8-bit WAV (retro or low-memory targets: combine with to_mono and resample). Checked before any file is written.

Inputs: target (required), operations (required), output_dir (required), pattern, +2 more.

audio_batch_surveyA
Read-only

Analyze a folder (recursive; filter with a glob pattern like ".wav" or "footstep") or a list of files, and report how consistent they are: loudness outliers, mixed sample rates/channels/formats, inconsistent leading silence, files with problems. Includes suggested_fixes with ready-to-use operations for audio_batch_process, and a per-file table.

Inputs: target (required), pattern.

audio_check_deliveryA
Read-only

Check a file against a delivery spec and get a verdict (pass / pass with warnings / fail), one entry per criterion (required, measured, status, note), and fix: an ordered audio_process operations list that was simulated on this file (fix.verified), plus cannot_fix for problems no processing can solve (clipping, a noise floor too high to remove without damaging speech, wrong length). Specs: apple_podcasts, spotify, youtube, ebu_r128, atsc_a85, acx_audiobook, game_sfx (spec="list" describes them). Each result cites its sources and the date they were checked. After a fix that includes denoise, verify the words with audio_transcribe.

Inputs: path (required), spec (required), end, start.

audio_check_game_projectA
Read-only

Audit the audio of a Godot 4 project (the folder with project.godot): inventory of every .wav/.ogg/.mp3 with a category (ui, sfx, voice, music, ambience, inferred from folder/file names; override with categories, e.g. {"audio/stingers": "music", "/click_": "ui"}), import settings from the .import files (music/ambience that doesn't loop, SFX/UI that do, clicky loop seams, never-imported files), loudness consistency per category (one-shots by LUFS momentary max, music/ambience by integrated LUFS; outliers, median, spread), per-file problems (clipping, leading silence, clicky ends, DC offset, mixed sample rates, stereo SFX) and res:// references in .tscn/.tres/.gd/.cs files (broken paths, wrong letter case, unreferenced files). Returns summary, per-category categories stats with suggested_batch for audio_batch_process, and issues sorted problem > warning > info, each with a res:// file and a fix (audio_process operations or an editor step). res://x means <project_dir>/x. Read-only: never modifies the project. Analyzes at most max_files files, each over its first max_seconds (loop seams use the real loop points).

Inputs: project_dir (required), max_files, categories, max_seconds.

audio_compareA
Read-only

A/B two files: plain-language summary, metric deltas (loudness, peak, brightness, tempo, pitch), per-band level changes, spectral-shape similarity, issues fixed or introduced, and a null test (aligns and subtracts) that tells whether B is identical, gain-changed, lightly or heavily changed. Use after audio_process to verify an edit did what you intended and nothing else.

Inputs: path_a (required), path_b (required).

audio_eventsA
Read-only

Split the audio into distinct sound events (hits, notes, words/syllables, SFX layers) and describe each: start/end, level, attack, tonal vs noisy, brightness, pitch and pitch glide. as_text gives one line per event, e.g. "0.52-0.81s | -14dB | tonal | bright | A5 glide -12st | sharp attack". Also reports spacing regularity and the sequence of pitches. The threshold adapts to the background level; set threshold_db (dBFS) to override. split_on_onsets=false keeps continuous sounds (e.g. a sentence) as one event.

Inputs: path (required), end, start, threshold_db, +1 more.

audio_infoA
Read-only

Fast metadata without decoding: format, sample rate, channels, duration. Files read through FFmpeg (M4A/AAC, WMA, MP4/MOV/WebM/MKV video) report decoded_via="ffmpeg", the container as format and the codec as subtype; without FFmpeg they fail with install instructions. If path is a directory, lists the audio files inside it (recursively).

Inputs: path (required).

audio_melodyA
Read-only

Transcribe a monophonic line (voice, whistle, solo instrument, synth lead, SFX pitch) into notes with start times, durations, note names and cents deviation, plus a compact text form. Narrow fmin/fmax to the expected range for better accuracy (e.g. bass 40-400, voice 80-1000).

Inputs: path (required), end, fmax, fmin, +1 more.

audio_processA

Apply operations in order and write a NEW file (default: _processed. next to the input; the input is never modified unless output==path and overwrite=true; M4A/video inputs default to WAV output). Each operation is an object, e.g. [{"op":"highpass","hz":80}, {"op":"normalize_lufs","lufs":-16}, {"op":"fade_out","seconds":0.5}]. Ops: gain(db) normalize_peak(db=-1, true_peak=false) normalize_rms(db=-20) normalize_lufs(lufs=-16, ceiling_db=-1, limit=false, measure=integrated|momentary_max) trim_silence(threshold_db=-60, pad_ms=10) denoise(reduction_db=12, sensitivity=1, noise_start, noise_end) [verify speech afterwards with audio_transcribe] limit(ceiling_db=-1, release_ms=60, lookahead_ms=5) compress(threshold_db=-18, ratio=3, attack_ms=10, release_ms=120, knee_db=6, makeup_db=0) fade_in/fade_out(seconds, curve=cosine|linear|equal_power) crop(start, end) pad(start, end) highpass/lowpass(hz, order=4) eq(hz, db, q=1) low_shelf/high_shelf(hz, db) remove_dc to_mono to_stereo resample(rate) reverse polarity(channel=None) loop_crossfade(seconds=0.05) mix(path, at=0, gain_db=0) append(path, gap=0). subtype: e.g. PCM_16, PCM_24, FLOAT, PCM_U8 (8-bit) for WAV. Returns before/after levels and any warnings.

Inputs: path (required), operations (required), output, subtype, +1 more.

audio_synthesizeA

Generate audio from a declarative spec: tones, sweeps, chords, noise bursts, simple melodies and layered sound effects (band-limited oscillators, ADSR envelopes, vibrato, tremolo, filters, panning). Example laser zap: {"layers":[{"wave":"square","freq":1800,"freq_end":200,"duration":0.25, "envelope":{"attack":0.002,"release":0.1},"lowpass":6000}]}. Example melody: {"layers":[{"wave":"triangle","sequence":[["C4",0.25],["E4",0.25],["G4",0.5]]}]}. Full schema: spec = { "sample_rate": 44100, "duration": <seconds, default: end of last layer>, "normalize_peak_db": -1 (null to skip), "layers": [{ "wave": "sine|square|saw|triangle|noise|pink|brown|impulse|dc|silence", # pink/brown are generated circularly, so they loop seamlessly as-is. # impulse: one full-scale sample at the layer start, or a train with "freq" impulses per second. # dc: a constant offset (level set by gain_db; 0 dB = +1.0). silence: exact zeros. "freq": 440 or "A4", "freq_end": , "sweep": "exp|linear", "phase": <start phase, degrees>, "start": 0, "duration": , "gain_db": 0, "pan": -1..1, "envelope": {"attack": 0.005, "decay": 0, "sustain": 1, "release": 0.01}, "vibrato": {"rate_hz": 5, "depth_cents": 20}, "tremolo": {"rate_hz": 6, "depth": 0.5}, "lowpass": , "highpass": , "sequence": [["C4", 0.25], ["rest", 0.25], ["E4", 0.5]] # optional: one note per item, played back to back }] }

Inputs: spec (required), output (required), overwrite.

audio_timelineA
Read-only

How the sound changes over time: per-segment RMS, peak and brightness, plus a loudness sparkline. Streams the file, so it works on recordings of any length; use it to find where to zoom in.

Inputs: path (required), end, start, segments.

audio_transcribeA
Read-only

Speech to text (Whisper, runs locally). Returns the text, timed segments, per-word timings with confidence, detected language, speaking rate, long pauses and uncertain_words (likely mis-hearings). model: tiny/base/small/medium/large-v3/turbo (bigger = more accurate, slower; first use downloads it). language: ISO code like "en" to skip detection. initial_prompt: names or jargon to help spelling. Use start/end to transcribe part of a long recording.

Inputs: path (required), end, model, start, +3 more.

audio_viewA
Read-only

Render a picture of the sound. kind: 'both' (waveform above spectrogram), 'waveform' or 'spectrogram'. Spectrogram: time left to right, frequency bottom to top, brighter = louder. Horizontal lines are pitched tones/harmonics, vertical stripes are clicks/transients, diffuse haze is noise. Red dashed lines on the waveform mark 0 dBFS (clipping). Zoom with start/end; pitch_overlay draws the detected f0 in cyan. save_to optionally also writes the PNG to disk.

Inputs: path (required), end, kind, start, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 14 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes: metadata, visualization, speech transcription, processing, batch processing, synthesis, comparison, and QA. However, audio_timeline, audio_analyze, and audio_events overlap in time-varying analysis, and audio_batch_survey vs audio_check_game_project both audit folders. Descriptions clarify boundaries well, so only minor ambiguity remains.

    Naming Consistency5/5

    All 14 tools follow a consistent snake_case convention with an audio_ prefix and clear noun/verb descriptors. There is no mixing of camelCase, casing, or prefix styles. The pattern is predictable throughout.

    Tool Count5/5

    14 tools are well-scoped for a broad audio analysis, processing, synthesis, and QA server. The set covers distinct workflows without excessive redundancy. Each tool appears to earn its place.

    Completeness4/5

    The surface covers inspection, analysis, processing, batch operations, synthesis, transcription, comparison, and delivery/game-project QA, forming a strong lifecycle. Minor gaps remain, such as exporting to compressed formats (MP3/OGG/FLAC) and editing metadata tags. Core workflows are still well covered.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to perform comprehensive audio processing—stem separation, analysis, transcription, restoration, speech processing, and generation—through a unified self-hosted API with asynchronous jobs and webhooks.
      6
      Do What The F*ck You Want To Public
    • A
      license
      Not graded
      quality
      A
      maintenance
      Gives coding agents the ability to hear and reason about audio by describing sounds, matching them to text, locating key moments, detecting realness, generating timelines, and critiquing soundtracks. It also lets agents synthesize and iteratively improve their own sounds in code.
      5,541
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to check whether generated audio matches a prompt in any language, rank takes, run technical QC, judge fit against images or video, and search or dedupe a local sound library. Each tool returns the same JSON records as the matching CLI command, with the model loaded once and everything running locally.
      16
      MIT