
Singing Pitch Tracker
io.github.raulkiviPublished by GitHub account raulkiviv0.3.1Updated Nov 10, 2026
Real-time pitch detection and score alignment for a singer, from microphone input
Overview
Local MCP server that listens to a singer through the microphone and reports their position in a MusicXML score and whether they are in tune.
- What you can do
- Load and summarize scores: load a MusicXML score into a session, describe its title, key, tempo and parts, and list open sessions
- Run real-time practice: open the microphone, start monitoring, poll current measure, beat, expected and detected pitch, then stop and get a summary
- Analyse recordings offline: compare a 16-bit PCM WAV file against a reference score for per-note accuracy and highlights
- Restrict work to a bar range with optional start and end measures
- Check server metadata and runtime dependencies such as librosa and sounddevice/portaudio
- When to use it
- Useful for singers and music teachers who want an assistant to follow practice in real time, tell them which measure they are on and whether notes are sharp or flat, or to review a recorded take against a score.
- Requirements
- Runs locally as a Python package via uvx (Python 3.12+). Real-time microphone monitoring needs PortAudio (libportaudio2 on Ubuntu/Debian); offline analysis needs no system libraries. Optional PITCH_BACKEND variable selects librosa (default) or crepe, the latter needing a manual TensorFlow install and model download. Score paths must lie inside the output root, MCP roots or configured input roots.
Installation
In SourceWeft
- Open Singing Pitch Tracker in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
pitch-mcp
MCP server for real-time pitch detection and score alignment. Listens to a singer via microphone and reports their current position in a score and whether they are singing in tune.
What it does
Covers three goals:
- Goal 4 — Show the current measure/beat position while singing
- Goal 5 — Report pitch accuracy (too high / too low / on pitch)
- Goal 6 — Identify where in the score a singer is based on a hummed or sung phrase
Supports both offline analysis of pre-recorded audio and real-time microphone input.
Tools
Scores are given as musicxml_path (a .musicxml, .xml or .mxl file, preferred) or as
inline musicxml text, never both. Paths must lie inside the output root
(SHEET_MUSIC_OUTPUT_ROOT, default the working directory), the client's MCP roots or a folder in
SHEET_MUSIC_INPUT_ROOTS.
analyze_recording, load_score and start_practice take an optional measures: [start, end]
(printed bar numbers, inclusive; a pickup is 0) to practise or analyse only those bars. Reported
measures keep their printed numbers.
Installation
For real-time monitoring (start_monitoring), PortAudio is required:
Quick install: on Ubuntu/Debian/Linux Mint, bash install.sh checks for uv and handles the optional
libportaudio2 install for you — see SETUP.md for the full non-technical walkthrough.
Ready-made client configs (Claude Desktop, Cursor, Windsurf, Continue, Zed) are in
examples/. If something goes wrong, check TROUBLESHOOTING.md.
Running
Configuration
crepe requires a manual TensorFlow install (~500 MB) and downloads ~50 MB of model weights on first use. The default librosa backend (pYIN algorithm) works well for singing voice with no extra setup.
Usage examples
Audio must be 16-bit PCM WAV. MP3 and FLAC are not supported.
Testing
294 of the 300 total tests are unit tests (292 run, 2 skipped), run against mocks and synthetic (in-memory) WAV data —
none require real audio hardware or pre-recorded fixtures. The other 6 are marked integration
(4 — offline analysis against the committed tests/fixtures/ pair) or manual (2 — full
real-microphone session lifecycle) and are excluded from a plain pytest tests/ run by
tests/conftest.py; select them explicitly with -m integration / -m manual.
Dependencies
- librosa — pYIN pitch detection (primary backend, pure Python)
- music21 — score parsing and pitch calculations
- sounddevice — real-time microphone input
- numpy, scipy — numerics
- mcp — MCP protocol
System requirements
- Python 3.12+
libportaudio2— required for real-time microphone input (start_monitoring)- No system libraries required for offline analysis
Phase status
Source: pitch-mcp/README.md at commit 58a2baf
Tools
0Version history
1- v0.3.1LatestSep 26, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts