Skip to main content
Glama
libsonare-mcp

libsonare-mcp

Official
by libraz

libsonare-mcp

CI License Python Platform

libsonare-mcp is an MCP server for analyzing, editing, mastering, mixing and composing audio and MIDI with an AI assistant. Its 34 tools process files locally with libsonare and use libcantus for music theory. It returns measurements, text and images in the client and writes audio or MIDI files for playback and editing.

📖 Documentation  ·  Getting started  ·  Tool reference

Install the alpha from a source checkout with libsonare 2.x and libcantus from PyPI. Tool names, arguments and the project file format may change between releases.

What it does

  • Analysis — BPM with alternatives, beats, meter, key candidates, chords with bar and beat, sections, melody, pitch and intonation. Tools and how to choose

  • Loudness and diagnosis — LUFS, true peak, LRA, streaming-platform previews, and detection of clipping, clicks, hum, noise and band limits. Tools and how to choose

  • Conversion and editing — WAV, FLAC, Ogg, Opus, MP3, AIFF and M4A; trim, cut, fade, normalize, pitch shift, time stretch, split. Audio formats

  • Effects, mastering and repair — processor chains from the catalog, mastering to a LUFS target, platform or reference, denoise, declick and dehum. Tools and how to choose

  • Seeing and hearing — spectrograms, chroma, piano rolls and other PNGs for the agent; playback on the local speakers for the person. Tool reference

  • MIDI and projects — read, write, transpose, quantize, humanize, transcribe from audio, arrange tracks and clips in a project file, mix them with a mixer scene, render with General MIDI, synth presets or a SoundFont. Project files

  • Theory and generation — key and Roman-numeral analysis, cadences, part-writing and playability checks, and seeded generation of progressions, bass, drums and melodies. Tools and how to choose

  • Safe file handling — outputs are new, atomically written files; nothing is overwritten without overwrite: true, and dry_run shows the plan first. Files and the output directory

Related MCP server: daw-mcp-server

Installation

Use Python 3.11 or later on macOS 26 or later (Apple silicon) or Linux (x86-64 or arm64 with glibc 2.27 or later). Install the server from a checkout. pip installs libsonare 2.x and libcantus from PyPI.

git clone https://github.com/libraz/libsonare-mcp && cd libsonare-mcp
python -m venv .venv && .venv/bin/pip install .
.venv/bin/python -m libsonare_mcp init     # register with Claude Code, Claude Desktop and Codex

init writes the absolute path of .venv/bin/python with -m libsonare_mcp into every client configuration it finds; --client claude-code|claude-desktop|codex picks one, and uninstall removes the entry. To run the stdio server without a checkout, use uvx --from git+https://github.com/libraz/libsonare-mcp libsonare-mcp. Optional: ffmpeg on PATH reads M4A, AAC and other formats and writes M4A.

Getting started

Restart the client and ask in plain words:

Ask

Tool

"What tempo and key is ~/Music/song.wav?"

audio_analyze

"Is it ready for Spotify?"

audio_loudness

"Master it to −14 LUFS with a −1 dBTP ceiling."

audio_master

"Convert it to MP3 and fade out the last 3 seconds."

audio_edit

"Show me a spectrogram of the chorus."

audio_visualize

"Make an 8-bar backing in A minor and play it."

midi_compose, project_render, audio_play

Written files land in ./sonare-out/ under the client's working directory, or in $SONARE_MCP_OUTPUT_DIR; SONARE_MCP_MAX_SECONDS and the other limits are in Configuration. → Getting started

Build from source

Development uses uv; uv sync installs the server with libsonare and libcantus from PyPI.

make format         # ruff format and safe lint fixes
make lint           # ruff check and pyright
make test           # pytest
make docs           # regenerate the tool reference from the tool definitions
make ci             # format-check, lint, test and docs-check

The environment variables that change limits and the output directory are listed in Configuration.

Documentation

The guides are available in English and Japanese, with a generated tool reference in English.

Non-goals

The server measures, edits and generates; it does not judge mood or genre, separate vocals or instruments with learned models, align lyrics, synthesize speech or singing, keep real-time sessions open, hold a DAW session between calls, read or write notation (MusicXML, ABC, LilyPond), handle MP3 ID3 tags or cover art, or fetch audio from URLs. audio_device refuses every operation with an explanation until libsonare has a device backend. See the Introduction for the reasons.

License

MIT

Available Tools

34 tools
audio_acousticsMeasure room acousticsA
Read-only

Measures room acoustics: from an impulse response it reports reverberation time (RT60), early decay time, clarity (C50, C80) and definition (D50) per octave band. Unmeasured RT60 and absorption values are omitted and named in warnings. From any recording it estimates the equivalent room (volume, dimensions, per-band absorption, direct-to-reverberant ratio) blindly, which can take tens of seconds on a long file. Use it to judge a room, a reverb or a convolution impulse. Do not use it to add or remove reverb (audio_process, audio_repair) or to make an impulse response (audio_generate kind roomIr). Example: {"path": "hall_ir.wav", "mode": "ir", "n_octave_bands": 6}.

Inputs: path (required), mode, range, detail, +1 more.

audio_analyzeAnalyze tempo, key and chordsA
Read-only

Analyses music: tempo (BPM) with alternatives, beats, onsets, meter (time signature), key with ranked candidates, a chord timeline with bar and beat, sections, melody, tuning, timbre, dynamics, rhythm and percussive hits, with roman numerals and harmonic functions on request. Use it to answer 'what is the BPM / key / chord progression / structure of this song'. Every estimate carries a confidence and the warnings say where it is shaky, for example a wrong meter or a half-time tempo; bar and beat are always attached even when the meter is doubtful. Tempo and key are the derivation project_create and midi_compose use; the first key candidate is the bass-weighted full-analysis key and the rest are ranked by chroma alone, so their confidences are not comparable, and hits are rule-based detections. Do not use it for loudness (audio_loudness), a single pitch track (audio_pitch) or raw spectral features (audio_features); symbolic files go to midi_read and theory_analyze. Example: {"path": "song.wav", "aspects": ["tempo", "key", "chords"], "chords_seventh": true}.

Inputs: path (required), list, limit, range, +13 more.

audio_compareCompare audio filesA
Read-only

Compares 2 to 8 audio files: loudness (LUFS, true peak), band balance, tempo and key per file, then the differences against the first file, the time offset between them and a null residual (what is left after matching loudness and aligning the delay, so a value near silence means the files are the same audio). In reference mode it takes exactly two files and runs the full reference analysis (loudness match, tonal balance, match-EQ curve, delay) of the second against the first, as when checking a mix against a reference track or an original against a mastered copy, and can write a level-matched blend of the two (write_ab) for listening. Mode align gives the anchors that place a take under a reference, and mode similarity shows how well the second file matches each stretch of the first; both read chroma, so pitch content only. Do not use it for one file (audio_info, audio_loudness) or to change anything (audio_master matches a reference). Example: {"paths": ["reference.wav", "mix.wav"], "mode": "reference"}.

Inputs: paths (required), mode, range, detail, +3 more.

audio_deviceList audio devices, record, capture MIDI or run live-throughA

Works with the audio and MIDI hardware of the machine running this server. Every call is bounded: record, captureMidi and liveThrough need duration_sec (at most 600 seconds) and return when it has passed; there is no start or stop. listDevices lists audio inputs, audio outputs and MIDI inputs. record writes an audio input to a new file; captureMidi writes a MIDI input to a new .mid; liveThrough sends an input through a chain or a voice changer to an output, optionally also writing a file. Results name the device used (explicit or default) and give a level summary. Use it when the user asks to record, capture a keyboard or hear live processing. Not for playing a file (audio_play) or offline processing (audio_process). Refused with an explanation while libsonare has no device backend; dry_run shows the planned file without touching a device. Example: {"op": "record", "duration_sec": 10}.

Inputs: op (required), chain, detail, format, +11 more.

audio_diagnoseDiagnose audio problemsA
Read-only

Finds problems in a recording: clipping (including flat-topped plateaus below full scale), clicks and pops, crackle, background noise level, mains hum, reverberation, DC offset, phase problems and mono compatibility, a band limit (low-pass or lossy source), and leading or trailing silence; checks adds a mono-fold analysis and the mastering assistant's profile. Each issue is flagged with its measurements and a fix, and suggested_stages can be passed unchanged to audio_repair. Use it before repairing, or to ask 'what is wrong with this file'. Do not use it for loudness or tempo (audio_loudness, audio_analyze) or to fix the file (audio_repair). Example: {"path": "old_recording.wav"}.

Inputs: path (required), range, checks, detail.

audio_editConvert or edit audioA
Destructive

Converts an audio file to another format (wav, flac, ogg, opus, mp3, aiff, m4a; bit depth, quality, sample rate) and/or edits it with an ordered list of ops: trim, cut, fadeIn, fadeOut, gain, normalize (peak, rms, lufs), resample, channels (mono, stereo, left, right, swap), reverse, pad, repeat, trimSilence (peak or lufsGated), dcRemove, pitchShift (pitch_semitones or to_key), timeStretch (speed_ratio, tempo_bpm or duration_sec), moveRegion and stretchRegion (one note or phrase), rearrange (rebuild from slices of the audio), editHits (move, level or mute percussive hits) and spectralEdit (change a time x frequency rectangle). Text tags are carried over. Use it for 'convert to mp3', 'cut from 30 s to 60 s', 'fade out the last 3 seconds', '-3 dB' or 'make it 90 BPM'; ops: [] is a pure conversion. Do not use it for EQ, compression or effects (use audio_process), loudness mastering with a true-peak ceiling (use audio_master), joining several files (create a project with project_create layout "sequence" and render it with project_render) or cutting into several files (use audio_split). Example: {"path": "song.wav", "ops": [{"op": "trim", "start_sec": 30, "end_sec": 60}, {"op": "fadeOut", "duration_sec": 3}], "format": "mp3"}.

Inputs: path (required), ops, detail, format, +6 more.

audio_featuresExtract audio features (MFCC, chroma, spectral)A
Read-only

Computes music-information-retrieval features at the file's own sample rate: spectral centroid, bandwidth, rolloff, flatness and contrast, zero-crossing rate, RMS, MFCC and its deltas, four chroma variants, tonnetz, onset strength (also per band), spectral flux, polynomial features, PLP, several tempogram forms and an octave-band spectrum over time. Returns statistics (mean, std, p10, p50, p90), a time series at a chosen resolution, or exports the full matrices as npy or csv files in the output directory for further processing. Use it for brightness/timbre comparisons and as input to your own scripts. Do not use it for loudness (audio_loudness), tempo or key (audio_analyze) or to look at a spectrogram (audio_visualize). Example: {"path": "take.wav", "features": ["mfcc", "chroma"], "aggregate": "export", "export_format": "csv"}.

Inputs: path (required), range, detail, features, +4 more.

audio_generateGenerate test signals, clicks or room impulse responsesA
Destructive

Synthesizes audio from scratch: a sine tone, a frequency sweep (chirp), white or pink noise (seeded), a metronome click track with accented downbeats at a BPM and time signature, silence, a synthetic room impulse response from room size, absorption or wall material, source and listener positions (or imitating the room of a recording with 'like'), or audio rebuilt from a feature matrix exported by audio_features (fromFeatures). The default sample rate is 48000 Hz and the file is mono. Use it for test signals, a click to play along to, or an IR for convolution reverb. Do not use it to render MIDI or a project (use project_render) or to process existing audio (use audio_edit or audio_process). Example: {"kind": "click", "tempo_bpm": 100, "time_signature": {"numerator": 3, "denominator": 4}, "bar_count": 8}.

Inputs: kind (required), like, seed, color, +33 more.

audio_infoInspect audio filesA
Read-only

Reports what an audio file is and how loud it is: container and codec, duration, sample rate, channels, bit depth, text tags, plus peak, RMS, integrated LUFS, true peak, DC offset, clipped-sample count, silence ratio and stereo correlation. Use it first on any file, to compare several files, or to check a loudness or clipping problem quickly. Do not use it for tempo, key or chords (use audio_analyze) or for loudness over time and streaming-platform previews (use audio_loudness). Example: {"paths": ["~/Music/mix/*.wav"]} inspects every wav in a folder.

Inputs: path, paths, range, detail.

audio_loudnessMeasure loudness (LUFS, true peak)A
Read-only

Measures loudness the way delivery standards do: integrated, momentary and short-term LUFS, loudness range (LRA), true peak, sample peak, crest factor, stereo correlation and width, a low/mid/high band balance measured at the file's own sample rate, and eight streaming and broadcast previews (Spotify, Apple Music, YouTube, Amazon Music, Tidal, Deezer, EBU R128, podcast) with the gain each would apply and any true-peak ceiling risk. Use it to check a master against a target, to see loudness over time with 'resolution', or after audio_master. Do not use it for general file facts (audio_info) or to change the level (audio_master, audio_edit). Example: {"path": "master.wav", "platforms": ["spotify", "appleMusic"], "resolution": "coarse"}.

Inputs: path (required), range, detail, platforms, +1 more.

audio_masterMaster audio to a loudness targetA
Destructive

Masters a track: EQ, compression, saturation, stereo imaging, true-peak limiting and loudness normalization to a LUFS target and dBTP ceiling, with a preset (pop, edm, podcast, classical, ...), a delivery platform (streaming, youtube, broadcast, club, cd), a reference track to match, or the chain the mastering assistant suggests for the audio, with optional chain settings ('overrides') on top. Use it for 'make it -14 LUFS', 'master this for Spotify' or 'make it sound like this reference'; dry_run: true returns the suggested chain, the reasons and a streaming-platform normalization preview without writing. Do not use it to only measure loudness (use audio_loudness), for single effects (use audio_process) or for noise and click removal (use audio_repair). Example: {"path": "song.wav", "target_lufs": -14, "ceiling_dbtp": -1}.

Inputs: path (required), range, detail, format, +12 more.

audio_pitchTrack pitch (f0) and notesA
Read-only

Tracks the fundamental frequency of a monophonic voice or instrument with pYIN or YIN, segments it into notes, estimates the tuning offset, and reports each note's deviation in cents from equal temperament, from a key's scale or from the notes of a MIDI file; note_pitch_detail splits each note into center, drift and vibrato. Use it for intonation checks, singing accuracy, tuning (A=440?) and extracting a melody line. Do not use it for chords or polyphonic music (audio_analyze, audio_transcribe) or to correct pitch (audio_vocal). pYIN is limited to 15 minutes of audio; pass 'range' for longer files. Example: {"path": "vocal.wav", "reference": {"key": "A minor"}, "resolution": "medium"}.

Inputs: path (required), limit, range, detail, +7 more.

audio_playPlay audio for the human listenerA

Plays an audio file, or one window of it given as range, on the speakers of the machine running this server, so the human user can listen; the agent cannot hear it. Playback starts in the background and the call returns at once with the process id; action 'stop' ends the playbacks this server started and nothing else. Use it when the user asks to play, hear, listen to or audition a file or a section, such as 'play the chorus'. Not for measurements (use audio_analyze, audio_loudness or audio_visualize, which return numbers and images). Players started before a server restart can no longer be stopped by this tool. Example: {"action": "play", "path": "song.wav", "range": {"start_sec": 30, "end_sec": 60}}.

Inputs: action (required), path, range, detail.

audio_processApply audio effects (processor chain)A
Destructive

Applies a chain of audio processors in order: EQ, compressor, limiter, gate, de-esser, reverb, delay, chorus, flanger, saturation, stereo width, room morph and the rest of the 95 catalog processors, and reports loudness (LUFS), true peak and low/mid/high band balance before and after. Parameters can move over time with 'automation', the audio can be rendered for headphones or speakers with 'playback_render', and dry_run with report 'eqResponse' returns the EQ curve of the chain. Use it for a specific effect or a hand-built chain; look up processor ids and parameters with music_catalog first. Do not use it to master to a loudness target (use audio_master), to remove noise, clicks or hum (use audio_repair), to match a reference track (audio_master with reference), to mix or join several files (use project_create and project_render), or for gain, fades, trim and format conversion (use audio_edit). Example: {"path": "vocal.wav", "chain": [{"processor": "eq.parametric", "params": {}}, {"processor": "effects.reverb.plate", "params": {}}]}.

Inputs: path (required), chain, range, detail, +11 more.

audio_repairRepair audio (denoise, declick, dehum)A
Destructive

Repairs recordings: declip, declick, decrackle, dehum (50/60 Hz mains hum), denoise (hiss, background noise) and dereverb, as explicit stages, as a restoration preset (vinyl, tapeHiss, fieldRecording, voiceMemo, shellac78), or automatically from a defect analysis (auto: true); dereverb can be tuned to the measured room (dereverb_from_room). Use it after audio_diagnose, whose suggested_stages it takes unchanged; it is the one tool that accepts any channel count. Do not use it for creative effects (use audio_process), loudness mastering (use audio_master) or to only detect problems (use audio_diagnose). Example: {"path": "interview.wav", "stages": [{"stage": "denoise", "params": {"reductionDb": 12}}, {"stage": "dehum"}]}.

Inputs: path (required), auto, range, detail, +10 more.

audio_separateSeparate audio into HPSS, NMF or repetition componentsA
Destructive

Splits an audio file into component files: method 'hpss' gives a harmonic (sustained tones) and a percussive (hits, transients) part, optionally with a residual; method 'nmf' factorizes the spectrogram into 2-16 components that add back up to the input (linked across channels for stereo, seeded by 'nmf_init'); method 'nnFilter' splits a repeating background from a non-repeating foreground by nearest-neighbor filtering of the spectrogram. Separation is signal-based (HPSS, NMF, nearest-neighbor masks), NOT a learned stem-separation model: the components are not named instruments, and a vocal cannot be cleanly isolated from a mix. Use it to pull drums away from sustained pads, to listen to what an NMF component holds, or as preparation for analysis. Do not use it to cut a file in time (audio_split) or to correct a voice (audio_vocal). Long inputs are limited; pass a 'range'. Example: {"path": "song.wav", "method": "hpss", "with_residual": true}.

Inputs: path (required), range, detail, format, +12 more.

audio_splitSplit audio into several filesA
Destructive

Cuts one audio file into several files at given times, at silences, at detected song sections, or every N bars or beats of the detected beat grid; a trailing remainder joins the last file, and all files are written or none are. Several takes of one part ('paths') are cut together at the stretches where all of them are silent. Use it to chop a recording into tracks, slice a song into 4-bar loops, or separate takes. Do not use it to keep one window (use audio_edit trim), to join files (use project_create with layout sequence) or to separate instruments (use audio_separate). Example: {"path": "session.wav", "by": "silence", "top_db": 45}.

Inputs: by (required), path, paths, detail, +12 more.

audio_transcribeTranscribe audio to MIDIA
Destructive

Converts pitched audio (a melody, a bass line, a piano part) into notes and writes a Standard MIDI File; the response gives the note count and the first rows of the note table with their times in seconds. With 'context' (a project file) the .mid carries that project's tempo map and time signatures, so it drops onto the project's grid with project_edit 'addMidiClip'; otherwise the tempo is tempo_bpm or derived from the audio. quantize_ppq snaps the notes. Use it for 'turn this recording into MIDI' or 'what notes are played here'. Do not use it for drums or full mixes (the result is unreliable), to read an existing MIDI file (midi_read) or to measure pitch frame by frame (audio_pitch). Example: {"path": "melody.wav", "context": "song.sonare.json", "quantize_ppq": 0.25}.

Inputs: path (required), range, detail, output, +6 more.

audio_visualizeDraw audio as an imageA
Read-only

Draws an audio file as a PNG you can look at: waveform, spectrogram, mel spectrogram, constant-Q (cqt), chroma, pitch curve, loudness over time, tempogram, self-similarity (song structure), onset strength, a reassigned spectrogram, or the stereo field as a vectorscope or phase scope. Mel can use PCEN and cqt can be variable-Q (gamma). The reply also carries the axis ranges, dB range and seconds per pixel, and 'save' keeps the PNG as a file. Use it to see what a recording looks like, spot clipping, noise, band limits, repeated sections or rhythm. Do not use it for exact numbers (audio_info, audio_analyze, audio_loudness, audio_pitch, audio_features) or for notes in a MIDI file (midi_visualize). Example: {"path": "song.wav", "kind": "spectrogram", "range": {"start_sec": 0, "end_sec": 30}}.

Inputs: kind (required), path (required), pcen, save, +5 more.

audio_vocalCorrect or change a voiceA
Destructive

Edits the pitch of a vocal or other single melodic line and writes a new file. Mode 'autoTune' corrects pitch, snapping notes to a scale (detected or named key); 'tuneToMidi' moves each sung note onto the matching note of a reference .mid; 'voiceChange' shifts pitch and formants or applies a voice preset; 'editNotes' detects the notes and moves, transposes, re-gains or mutes chosen ones in one call (a dry run lists the notes and their indices). The result reports the measured pitch change in cents. To put an edited take back into a project, pass the output to project_edit 'setClipSource'. Do not use it to measure intonation (audio_pitch), for EQ or effects (audio_process) or to transpose a whole mix (audio_edit). Stereo input is processed as its mono downmix. Example: {"path": "take.wav", "mode": "editNotes", "edit_notes": {"edits": [{"note_index": 3, "target_midi": 64}]}}.

Inputs: mode (required), path (required), range, detail, +11 more.

midi_composeGenerate chords, bass, drums or melodyA
Destructive

Generates music from a key, length and seed: a chord progression, voicings, a bass line, drums, a melody, a motif, a rhythm, a counter-melody to a given melody, chords for a given melody (harmonize), or a ready backing (chords, bass and drums in one file). Writes a .mid; the same arguments and seed always give identical files. Pass 'context' (a song's audio, .mid or project file) to take tempo, meter, key, chords and length from it, so the part fits the song and the file's tempo map equals the song's. Use it for 'make a chord progression', 'add a bass line', 'drum pattern' or a quick accompaniment; Inputs per part: progression {key, style, bars}; bass {chords, style}; drums {style, bars}; counterMelody {melody, chords?}; melody {melody? as the reference}; motif {key, bars, style = contour}; rhythm {time_signature, bars}; harmonize {melody}; voicing {chords, style}; backing {key, style, bars}. Not for changing existing notes (use midi_edit), for analyzing chords (use theory_analyze) or for audio (put the .mid on a project track with project_edit addMidiClip, then project_render). Example: {"part": "bass", "context": "song.sonare.json", "seed": 7}.

Inputs: part (required), key, bars, seed, +10 more.

midi_editEdit MIDI notesA
Destructive

Transforms notes with an ordered list of operations: transpose (semitones, interval, or to a key), quantize with swing, humanize, change velocity, filter notes, fold into an instrument range, invert or reverse, arpeggiate, and apply the groove of another file; on a .mid file or inline tracks also merge tracks, split a track by pitch, retime, set one tempo and set the program. A project file is rewritten in place (or into 'output'); a .mid file or inline tracks give a new .mid. Use it for any change to existing notes; pass 'track' to touch one track, and drums are skipped by transpose, transform, arpeggiate, foldToRange, splitByPitch and setProgram. Track, tempo and program changes on a project belong to project_edit (addTrack, setTempoSegments, setProgram). Not for reading (use midi_read). Example: {"source": "song.mid", "ops": [{"op": "transpose", "shift_semitones": -2}, {"op": "quantize", "grid": "1/16", "strength_ratio": 0.8}]}.

Inputs: ops (required), source (required), track, detail, +3 more.

midi_readRead a MIDI file or projectA
Read-only

Lists what is inside a Standard MIDI File, a project file's MIDI tracks or inline tracks: tracks with channel, General MIDI instrument, note count and pitch range, the tempo (BPM) map, time signatures, length in quarter notes (PPQ), and a paged piano-roll note table. Use it to inspect a .mid file before editing or placing it on a project track, or to check what another tool wrote. Not for audio files (use audio_analyze or audio_transcribe) and not for changing the music (use midi_edit). Example: {"source": "song.mid", "detail": "full", "range": {"start_ppq": 0, "end_ppq": 16}}.

Inputs: source (required), limit, range, track, +2 more.

midi_visualizeDraw MIDI as a piano rollA
Read-only

Draws a MIDI file, a project file's MIDI tracks or inline tracks as a piano-roll PNG: notes as rectangles (pitch up, quarter notes right) colored per track and shaded by velocity, bar lines from the time signatures and an optional chord strip. The reply carries the PPQ and pitch ranges drawn, and 'save' keeps the PNG as a file. Use it to look at an arrangement, a generated part or an edit. Do not use it to list exact notes (midi_read), to analyze harmony (theory_analyze) or to draw audio (audio_visualize). Example: {"source": "song.mid", "range": {"start_ppq": 0, "end_ppq": 32}, "track": "bass"}.

Inputs: source (required), save, range, track, +4 more.

midi_writeWrite notes to a MIDI fileA
Destructive

Writes inline tracks (with an optional tempo map and time signatures), or a project file's tracks and tempo map, as a Standard MIDI File. Use it to turn notes you composed as JSON into a playable .mid file, or to export a project for another program. Not for changing the music (use midi_edit) and not for generating music (use midi_compose); to hear it, put the .mid on a project track with project_edit addMidiClip and call project_render. Example: {"source": [{"name": "lead", "program": 80, "notes": [{"pitch": 60, "start_ppq": 0, "length_ppq": 1}]}], "output": "lead.mid"}.

Inputs: source (required), detail, output, dry_run, +3 more.

music_capabilitiesServer capabilities and limitsA
Read-only

Reports what this server can do right now: the versions of the server, libsonare (its shared library path and ABI) and libcantus, which audio formats can be read and written (and whether ffmpeg is present), the output directory, the size and time limits with the environment variables that change them, canceled jobs still running, and a short guide to which tool family does what. Use it first when a file will not open, an output format is refused, a result looks cut off, or you need to know where files are written. Not for names of processors, presets or scales (use music_catalog). detail 'full' adds the build features, decoders, every ABI version and the host's CPU cores, memory and parallel workers (check it before a heavy job). Example: {}.

Inputs: detail.

music_catalogCatalog of processors, presets, scales and stylesA
Read-only

Lists the names other tools accept: audio processors and their parameters, mastering presets and delivery platforms, amp rigs, mixer scene presets, mix source classes, synth and voice presets, General MIDI programs and drums, GS drum kits, progression, drum and bass styles, instruments, scales, chord qualities and the libcantus functions theory_lookup calls, with paging and a text filter. Use it to find the exact processor id or preset name before audio_process, audio_master, audio_repair or project_edit, or kind 'processor' with an id to get every parameter's range, unit and default for building a chain. detail 'full' lists every entry in its detailed form. Not for looking up one chord or scale's notes (use theory_lookup). Example: {"kind": "processor", "id": "eq.parametric"}.

Inputs: kind (required), id, limit, query, +2 more.

project_createCreate a project from audio and MIDI filesA
Destructive

Creates a project file (.sonare.json): the workspace that carries one song between tools. Each audio input becomes an audio track, each .mid input its tracks; 'overlay' starts all inputs together, 'sequence' plays them in turn with an optional crossfade. 'analyze' derives tempo, meter, key, chords and sections from an audio input into the project's tempo map and annotations, and the response lists the tempo candidates. Without 'analyze' the tempo map and meter come from the first .mid input; every .mid input adds its tracks under the project's maps. Use it as the first step of arranging, mixing or rendering a song. Do not use it to edit an existing project (project_edit). Example: {"inputs": [{"path": "song.wav"}], "analyze": ["tempo", "key", "chords"]}.

Inputs: inputs (required), detail, layout, output, +8 more.

project_editEdit a projectA
Destructive

Applies a batch of ops to a project file: tracks (addTrack, removeTrack, renameTrack, setTrack, setTrackRoute, setInstrument, setPartRig), clips (addAudioClip, addMidiClip, setClipSource, moveClip, trimClip, splitClip, duplicateClip, removeClip, setClip, setProgram, setOverlapPolicy), sources (relinkSource), the mixer scene (setMixerScene, suggestMix, setStrip, addBus, removeBus, addSend, removeSend, addVcaGroup, removeVcaGroup, setSidechain), tempo and meter (setTempoSegments, setTimeSignatures), annotations (annotateKeys, annotateChords, annotateSections, setMarker) and automation (addAutomationLane, editAutomationLane, removeAutomationLane, automationFromMidiCc). All ops succeed or nothing is written; an op can address what an earlier op created as {"op": n}, and the response lists created ids. The file is updated in place; pass 'output' or 'dry_run' to keep it. Notes are written with midi_write or midi_compose and placed with addMidiClip; read results with project_read. Example: {"path": "song.sonare.json", "ops": [{"op": "addTrack", "kind": "midi", "name": "bass"}, {"op": "addMidiClip", "track": {"op": 0}, "path": "bass.mid"}, {"op": "setTrack", "track": "bass", "gain_db": -6}]}.

Inputs: ops (required), path (required), detail, output, +2 more.

project_readRead a projectA
Read-only

Reads a project file: tracks (gain, pan, mute, solo, instrument), clips (positions in PPQ with their seconds), sources (path, resolved, hash match, orphan), tempo map, time signatures, markers and annotations. 'list' returns one list paged by offset and limit. Use it to find track, clip and source ids before project_edit, or to see where a section lies in seconds. Do not use it to read notes (midi_read). Example: {"path": "song.sonare.json", "list": "clips", "limit": 50}.

Inputs: path (required), list, limit, detail, +1 more.

project_renderRender a project or MIDI file to audioA
Destructive

Renders a project file, or a .mid file through the General MIDI bank, to a stereo audio file. 'instruments' plays chosen MIDI tracks through a synth preset or patch, the built-in oscillator synth, a SoundFont program or a sampler built from audio files, for this render only. MIDI tracks without an instrument play the General MIDI bank. A render that plays the General MIDI bank or a SoundFont ends a fixed 3 s after the last clip, so a longer release is cut. 'range' keeps one window in quarter notes. Use it to hear a project, or before audio_master and the audio_ measuring tools. It does not master (audio_master). Example: {"source": "song.sonare.json", "instruments": [{"track": "bass", "instrument": {"kind": "synth", "preset": "subBass"}}], "format": "wav"}.

Inputs: source (required), range, detail, format, +9 more.

theory_analyzeAnalyze the harmony of musicA
Read-only

Analyses a .mid file, a project file, an audio file, inline notes or chord labels: the key (with runner-up readings), key changes, the chord per segment, Roman numerals, cadences, phrases, a reduced progression, the rhythm and recurring motifs, each with the library's rationale; a reading that cannot be made is reported as undetermined. Audio gives the chord-level aspects only (from its key and chord estimates); for its notes, transcribe it with audio_transcribe first. Positions are quarter notes (_ppq). Not for one chord, scale or interval fact (use theory_lookup) or for rule checks (use theory_check). Example: {"chords": [{"symbol": "C", "start_ppq": 0, "end_ppq": 4}, {"symbol": "G7", "start_ppq": 4, "end_ppq": 8}, {"symbol": "C", "start_ppq": 8, "end_ppq": 12}], "aspects": ["key", "roman", "cadences"]}.

Inputs: key, limit, chords, detail, +5 more.

theory_checkCheck part writing, counterpoint and playabilityA
Read-only

Checks music against rules: four-part writing (parallel fifths and octaves, spacing, voice crossing), species counterpoint (species 1-5 against a cantus firmus), whether a bass, guitar or drum part is playable (range, stretch, limb conflicts, difficulty), and the voice-leading cost between two voicings. Violations come back as kind, voices, from_index, to_index and a rationale. Not for naming the harmony (use theory_analyze) or for looking up facts (use theory_lookup). Example: {"check": {"kind": "partWriting", "voicings": [["C3","G3","E4"],["D3","A3","F4"]], "chords": ["C","Dm"], "key": "C major"}}.

Inputs: check (required), detail.

theory_lookupCall a libcantus theory functionA
Read-only

Calls one libcantus music-theory function by its Python name with arguments by parameter name and returns the library's result unchanged under 'result' (libcantus's own camelCase keys). Covers chord and key parsing and spelling, scales, intervals, Roman numerals, chord scales, substitutions, key relations, transposition, note, MIDI and frequency conversion, instrument ranges, tempo and duration math, and generators that take plain data. List the functions and their parameters with music_catalog kind 'theoryOps'. Functions that need handles, callbacks or model instances are refused; use theory_analyze, theory_check or midi_compose for those. Example: {"op": "transpose_chord_symbol", "args": {"text": "Am7", "semitones": 2}}.

Inputs: op (required), args, detail.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 34 tools

    Disambiguation4/5

    Most tools target clearly distinct resources or actions, and descriptions proactively redirect to alternatives such as audio_info vs audio_loudness or audio_process vs audio_master. A few boundaries still blur, especially audio_analyze vs theory_analyze on audio and audio_info vs audio_loudness, so not every tool is perfectly separable.

    Naming Consistency4/5

    All names use snake_case with predictable domain prefixes (audio_, midi_, project_, theory_, music_) and readable action/resource suffixes. Some tools are noun-like (audio_info, audio_features, music_catalog) while others are verb-like (audio_analyze, midi_compose), a minor inconsistency but still easy to follow.

    Tool Count2/5

    34 tools is well above both the 3-15 sweet spot and the 16-25 heavy range, creating substantial selection overhead even for a broad audio/MIDI production suite. Several workflow families could likely be consolidated or exposed as sub-operations rather than top-level tools.

    Completeness5/5

    The surface covers the full lifecycle: inspection and analysis, diagnosis and repair, processing and mastering, editing and splitting, separation, transcription and vocal tuning, playback and device I/O, MIDI read/write/edit/compose, project CRUD/render, and theory lookup/analyze/check. No obvious workflow dead ends are present.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables agents to read, patch, and render DAW projects (REAPER, FL Studio, .rpp/.dawproject) and to measure WAV audio metrics such as peak, RMS, LUFS, and stereo width. It closes the loop by applying patches, rendering before/after audio, and scoring the results against an intent so music-production models can be trained and verified.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI coding agents to generate, layer, process, and analyze audio locally through DSP recipes and WAV file operations, without a hosted service or API key.
      4
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to listen to audio files on the local machine by transcribing speech offline with Whisper, analyzing music and sound (tempo, pitch, melody, key, loudness), and rendering spectrogram images that vision-capable models can inspect.
      1
      MIT