Skip to main content
Glama

earmcp

An MCP server that gives AI coding agents "ears" to understand local audio files — running 100% locally with zero cloud API calls.

Sample waveform and mel spectrogram output

Tools

Tool

What it does

Backend

classify_sounds

Multi-label sound event tagging across 527 AudioSet classes (speech, music, instruments, alarms, vehicles, animals) with 10-second sliding-window timelines

MIT/ast-finetuned-audioset-10-10-0.4593 (PyTorch / Transformers)

transcribe

Automatic speech-to-text across ~100 languages with auto-detection and timestamped segments (handles audio >30 s)

openai/whisper-base (Transformers pipeline)

analyze_audio

DSP signal metrics: duration, sample rate, channels, peak/RMS dBFS, clipping %, silence %, active sound segments, dominant frequency/note, spectral centroid, pitch (pyin), tempo (BPM), and Krumhansl-Schmuckler musical key

librosa + numpy

spectrogram

Renders a combined waveform + Mel spectrogram (dB) PNG returned directly as an MCP image for vision-capable models

librosa + matplotlib

All four tools accept start and duration (seconds) to inspect slices of long recordings, and heavy PyTorch/Transformers imports stay lazy so server startup stays fast.

Related MCP server: beatlyzer-mcp

Quickstart

python -m venv .venv
.venv/Scripts/pip install -r requirements.txt   # Linux/macOS: .venv/bin/pip install -r requirements.txt

Register with Claude Code (or any stdio MCP client)

claude mcp add earmcp --scope user -- /absolute/path/to/.venv/Scripts/python.exe /absolute/path/to/server.py

Swap Hugging Face models (optional)

export EARMCP_WHISPER="openai/whisper-small"
export EARMCP_CLASSIFIER="MIT/ast-finetuned-audioset-10-10-0.4593"

Verify

Run the end-to-end stdio MCP self-test (downloads model weights once on first run, ~500 MB):

.venv/Scripts/python selftest.py

Checks tool discovery, analyze_audio (440 Hz tone + 120 BPM arpeggio), classify_sounds, transcribe (>30 s speech), and spectrogram PNG output.

Supported Formats

wav, flac, ogg, and mp3 work out of the box via librosa/soundfile. m4a, aac, and video containers work when ffmpeg is on PATH.

License

MIT

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to analyze audio files, extracting tempo, key, beat drops, volume surges, high tones, loudness, brightness, and structure, and returning structured JSON and visualizations.
      2
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Audio perception for AI agents. Measure loudness, clipping, noise and pitch; view spectrograms; split audio into events; transcribe speech; compare before/after; and clean up, edit or synthesize sound. Runs locally, no API keys.
      14
      124 PyPI
      1
      MIT