realtime-bpm-analyzer-mcp

v0.1.5
realtime-bpm-analyzer-mcp Checked 16 hours ago Published 4 days ago

A local MCP server that gives an assistant (Claude Desktop, Claude Code, any MCP client) the BPM of audio files on your disk.

A local MCP server that lets an assistant (Claude Desktop, Claude Code, any MCP client) detect the tempo (BPM) of audio files on your disk, with the realtime-bpm-analyzer engine. Claude Desktop: add it to claude_desktop_config.json (Settings, Developer, Edit Config), then restart the app. Any other MCP client: run npx -y realtime-bpm-analyzer-mcp as a stdio server. It needs Node.js 22.12 or later.

Summary extracted from the README.

realtime-bpm-analyzer-mcp

A local MCP server that lets an assistant (Claude Desktop, Claude Code, any MCP client) detect the tempo (BPM) of audio files on your disk, with the realtime-bpm-analyzer engine.

Privacy: the server runs on your computer and talks to the client over stdio. It makes no network calls and sends no telemetry: your audio never leaves the machine. The client gets the results (paths, tempos, confidences) and handles them like any other tool result, so they can reach its AI provider. npx itself contacts npm to fetch the package.

Install

Claude Desktop: add it to claude_desktop_config.json (Settings, Developer, Edit Config), then restart the app.

{
  "mcpServers": {
    "bpm": {
      "command": "npx",
      "args": ["-y", "realtime-bpm-analyzer-mcp"]
    }
  }
}

Claude Code:

claude mcp add bpm -- npx -y realtime-bpm-analyzer-mcp

Any other MCP client: run npx -y realtime-bpm-analyzer-mcp as a stdio server. It needs Node.js 22.12 or later.

Tools

Tool Arguments Returns
analyze_file path, optional min_bpm, max_bpm, engine bpm, bpm_exact, confidence (0 to 1, the estimated chance the reading is right, or null: unmeasured), the ranked candidates and the engine that ran
analyze_folder directory, optional recursive, offset, min_bpm, max_bpm, engine one result per file, in path order; a file that fails carries its error and the others go on

Then ask, for example: "What's the BPM of ~/Music/set/track.mp3?" or "Sort the tracks in ~/Music/house by tempo."

  • Formats: MP3, WAV, FLAC, OGG Vorbis and Opus decode in pure JavaScript/WebAssembly. M4A/AAC, AIFF and WMA go through ffmpeg when it is installed (set FFMPEG_PATH in the server's env to point at a binary that is not on the PATH).
  • The default engine, the tempogram, searches min_bpm..max_bpm (default 90 to 180): a tempo under it reads at the octave inside, and from about twice min_bpm a tempo can read half, as over about 179 BPM does by default. With engine: "peaks" tempos are folded into the range instead.
  • confidence is the estimated chance the reading is right, calibrated on licence-clean dev data from 90 to 180 BPM, so inside that range it means the same whichever engine measured it. Null: unmeasured, when bpm is outside 90 to 180 or when min_bpm or max_bpm set any other range than 90 to 180, since the calibration ran only on that range. Also null for a peaks reading of a quiet or bass-light file whose beats the engine found only relative to the file's own level: the calibration never saw such a reading, and the file may hold no beat at all.
  • Paths are absolute, start with ~, or are relative to the server's working directory.
  • Limits: files over 100 MB are refused, and so is audio that decodes to more than 2048 MB in its first channel: 202 minutes at 44.1 kHz, however small the file (a file that fits peaks at about 4.2 GB of memory). Audio under 8 kHz is refused, and one file may take at most 120 seconds. The server analyses one file at a time; calls made at once wait their turn. A cancelled call stops the file in progress. analyze_folder analyses 50 files per call and returns a next_offset for the next 50; a recursive walk goes 16 levels deep and reads at most 10,000 folder entries.
  • Only files with an audio extension are read. In a folder, a symbolic link to another folder is not followed, and a link to a file outside the folder is refused. These checks prevent surprises; they are not a sandbox: the server reads what your account can read.

Documentation: realtime-bpm-analyzer.com/guide/mcp. The command-line tool with the same engine is realtime-bpm-analyzer-cli.