mixxx-mcp-bridge
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mixxx-mcp-bridge
An MCP server that lets Claude (or any MCP client) DJ in Mixxx 2.5 on Linux: load tracks, match tempos, crossfade over N bars, work loops, hotcues and effects, and read the state back so that every change is confirmed (old -> new). A long-lived bridge owns the MIDI ports, so MCP clients can come and go while Mixxx keeps its controller.
Why
The upstream cloudygetty-ai/mixxx-mcp has the
right idea but does not work on Mixxx 2.5:
The write path is broken. The controller mapping binds bare
<key>names, the script declaresconst MixxxMCP(invisible to Mixxx's script engine) and callssetTimeout, which does not exist there, so commands never reach the controls.State read-back is impossible. The script posts state with
XMLHttpRequestto a local HTTP server, but Mixxx's controller engine (a plainQJSEngine) has noXMLHttpRequest.Control change numbers collide. The hotcue CC formula overlaps the deck 3 and 4 and the master/crossfader CCs;
exit_loop, nudge and beatjump act on the wrong deck or do nothing, and fractional loop sizes are sent as 0.
This project keeps the idea and replaces the plumbing. State flows back over MIDI SysEx, commands go out as a collision-free CC map, and a small bridge process keeps the MIDI ports alive.
Features
State read-back via SysEx. The controller script subscribes to 122 Mixxx controls and reports every change at full double precision; every write tool answers with
old->newandconfirmed, taken from Mixxx's own feedback.Load a track by path. Mixxx has no control that loads a file by path, so
load_trackwalks the library view, identifies the selected row through the preview deck and the Mixxx process' open files in/proc, and verifies the load (see Limits).Beat-matched crossfade over N bars.
crossfadesyncs or matches the tempo, starts the incoming deck and ramps the crossfader overbars x 4beats at the playing deck's BPM.Long-lived bridge. Mixxx 2.5 opens MIDI controllers only at start-up, but MCP servers start and stop with every client session. The bridge owns the virtual ports for the whole desktop session; several MCP clients can talk to it at once.
No hanging. Tools answer "bridge not running" or "Mixxx controller not connected" instead of waiting.
Related MCP server: mixxx-mcp
Architecture
MCP client --stdio--> main.py / src/server.py (thin client, one per client session)
| JSON lines over $XDG_RUNTIME_DIR/mixxx-mcp-bridge.sock (0600)
v
src/bridge.py (long-lived user service)
| OUT "mixxx-mcp" -- CC commands (src/controls.py) --> Mixxx controller
| IN "mixxx-mcp" <-- SysEx state (src/protocol.py) -- script
v
state cache (value + timestamp per group/key)Commands (Python -> Mixxx): MIDI Control Change only, from the single map in
src/controls.py. Continuous values are 14-bit MSB/LSB pairs.State (Mixxx -> Python): SysEx text frames
F0 7D <ascii> F7withS|group|key|valuerecords, a hello on controller init, heartbeats every 2 s and a bye on shutdown.Pairing: Mixxx joins an input and an output with the same port name into one controller, so both bridge ports are named exactly
mixxx-mcp.
The design and the evidence behind it are in
documentation/arc42/.
Tool catalog
Tool | Notes |
| connected (or why not), age of the last feedback and heartbeat |
| from the bridge cache |
| asks the controller script to re-send everything |
| writes report |
| trigger: reports that it was sent, no |
| set, or toggle when omitted |
| fader 0..1, smooth ramp (at most 5 % of the range per 25 ms step) |
| -1..1, smooth ramp |
| linear gain 0..3.98 (Mixxx's -12..+12 dB range) |
| linear gain 0..5.01 (Mixxx's -14..+14 dB range) |
| 0..4, 1 = neutral |
| never writes |
| per deck; up = faster |
| 1/32 ... 64, e.g. |
| sets |
| |
| per deck, signed; leaves the GUI beatjump size alone |
| slots 1-8 |
| units 1-4 |
| only controls in the CC map |
| a file in the music folder ( |
| see below |
No volume caps by design: values are validated only against Mixxx's own control ranges; fader and crossfader moves ramp because that is musical.
load_track. The tool walks the library GUI: sidebar to Tracks, clear the search, sort by
location, load the selected row into the preview deck and see which file Mixxx opened
(/proc/<pid>/fd and maps) to learn where the selection is, move with SelectTrackKnob, probe
again until the preview shows the target, then [ChannelN] LoadSelectedTrack and confirm
(track_loaded, library duration within 0.05 s, a new handle on the file). It usually takes about
1 s, a few seconds when corrections are needed, and up to about 10 s when the track is also loaded
in another deck. verified_by in the result is
new_handle or the weaker selection_probe.
crossfade. Refuses unless from_deck plays, to_deck has a track, both BPMs are known and
within 10 % (force=true overrides) and the decks sit on opposite crossfader sides
(fade_volumes=true works without the crossfader). Then: tempo (sync=true/"lock" enables sync
on to_deck, "tempo" sets its rate_ratio, false leaves it alone), start to_deck, and ramp
the crossfader over bars x 4 x 60 / bpm seconds. The call blocks for the fade (at most 120 s);
cancelling it stops the fader where it is. It returns old -> new for every control it touched
and the timing used (computed and measured). from_deck keeps playing.
Other groups worth knowing for send_control are listed in the
Mixxx controls reference:
[Channel1]-[Channel4] (decks), [Master] (crossfader, gain), [EffectRack1_EffectUnit1]-4
(effect units), [Playlist] and [Library] (navigation).
Configuration
Variable | Read by | Default | Meaning |
| MCP server ( |
| the music folder |
| MCP server |
| the Mixxx profile ( |
| bridge and MCP server |
| the bridge's Unix socket; the |
The bridge also takes --socket, --port-name (default mixxx-mcp) and --log-level
(python -m src.bridge --help). The bridge never reads the music folder, so it does not need
MIXXX_MCP_MUSIC_ROOT.
Running
Requirements: Linux with the ALSA sequencer (/dev/snd/seq), Mixxx 2.5.x (tested on 2.5.6),
Python 3.12 or newer, systemd (for the user unit; you can also run the bridge by hand). Your user
must be able to open /dev/snd/seq: a desktop login gets that through the seat ACL, on a headless
or SSH-only machine add yourself to the audio group. Without it the bridge cannot create its
ports.
Install
git clone https://github.com/visterion/mixxx-mcp-bridge ~/mixxx-mcp-bridge
cd ~/mixxx-mcp-bridge
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
# controller script and mapping
mkdir -p ~/.mixxx/controllers
install -m 0644 mixxx-mcp.js mixxx-mcp.midi.xml ~/.mixxx/controllers/
# the bridge as a systemd user unit
mkdir -p ~/.config/systemd/user
cp systemd/mixxx-mcp-bridge.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now mixxx-mcp-bridgeOn Debian and Ubuntu, python3 -m venv needs the python3-venv package. If pip has to compile
python-rtmidi, it needs a C++ compiler and the ALSA development headers (libasound2-dev).
The unit assumes the clone lives in ~/mixxx-mcp-bridge; edit WorkingDirectory and ExecStart
in the unit if it lives elsewhere.
Enable the controller in Mixxx once, either in the GUI (Preferences -> Controllers -> mixxx-mcp
-> mapping mixxx-mcp, tick Enabled, Apply) or, while Mixxx is stopped, in
~/.mixxx/mixxx.cfg:
[Controller]
mixxx-mcp 1
[ControllerPreset]
mixxx-mcp /home/you/.mixxx/controllers/mixxx-mcp.midi.xmlThe mapping path must be absolute: replace /home/you with your home directory.
The device only appears when the bridge's ports exist at Mixxx start-up. Add your music folder to the Mixxx library (Preferences -> Library); only tracks in the library can be loaded, and new files need Library -> Rescan.
Start order
Bridge -
systemctl --user start mixxx-mcp-bridge(or.venv/bin/python -m src.bridge).Mixxx - start it, or restart it, after the bridge, and again after every bridge restart: Mixxx has no MIDI hot-plug, and the old ALSA addresses are gone after a bridge restart. A working controller logs
[mixxx-mcp] init: 122/122 controls watchedwith--controller-debug.MCP client - connects to the bridge on each tool call.
bridge_status shows whether the controller has sent feedback.
Register with Claude Code
claude mcp add mixxx -e MIXXX_MCP_MUSIC_ROOT=$HOME/Music -- \
~/mixxx-mcp-bridge/.venv/bin/python ~/mixxx-mcp-bridge/main.pyAny other MCP client works the same way: run .venv/bin/python main.py over stdio and pass
MIXXX_MCP_MUSIC_ROOT in the environment.
Testing
.venv/bin/python -m unittest discover -s tests -t . # unit, fake-MIDI and real-ALSA testsThe real-ALSA tests use ports named
mixxx-mcp-test-<pid>and are skipped when/dev/snd/seqis missing.tests/test_js_map_matches_python.pyruns the controller script in a realQJSEnginefrom the systemlibQt6Qml(the library Mixxx links) with fakeengine/midiobjects (tests/js/).tests/js/build.shbuilds the runner; it needsg++and the Qt 6 QtCore/QtQml/QtNetwork headers. PointQT6_INCLUDE_DIRat them if they are not in/usr/include/qt6or/usr/include/x86_64-linux-gnu/qt6(andQT6_LIB_DIRfor the libraries). Without them the test is skipped and says why.The headless end-to-end test against a real Mixxx is skipped unless
MIXXX_E2E=1:MIXXX_E2E=1 MIXXX_MCP_MUSIC_ROOT=~/Music \ MIXXX_E2E_TRACK1=artist/one.mp3 MIXXX_E2E_TRACK2=artist/two.wav \ .venv/bin/python -m unittest tests.e2e.test_mixxx_e2e -vMIXXX_E2E_TRACK1/2(paths relative to the music folder) are required; pick two files whose tempos differ by a few percent, ideally one MP3 and one WAV. It needsXvfb,mixxx,pactlandunshare, and it needs root: Mixxx starts in a private mount namespace (unshare -m) where the music folder is read-only, and the test is skipped with a reason when the user may not create one. It runs with your current environment (XDG_RUNTIME_DIRmust point at your audio server), and uses a private scratch directory: a freshmkdtempdirectory (mode 0700, removed after a passing run) unlessMIXXX_E2E_BASEnames one. A configured base must be a real directory (not a symlink) that you own with mode 0700; it is created if missing, and the test is skipped otherwise. The test starts Xvfb on:97, a temporary null sink, a fresh Mixxx profile (the music folder is mounted read-only for that Mixxx only), the bridge on the portmixxx-mcp-e2e, then Mixxx; loads two tracks, beatjumps, plays, crossfades 2 bars with sync and reads the state back; and removes all of it again.
Limits
Linux only today. Windows is planned. It would need loopMIDI for the virtual ports, a non-Unix-socket transport between the MCP server and the bridge, and a different way to verify
load_track, which now reads/proc.load_trackvisibly moves what you see in the library (sidebar, search, sort, selection), and each probe queues the probed track for analysis; results say so. A click in the library during the walk can break it; the tool detects that and retries or fails, it never loads an unverified row.load_trackrefuses a playing deck (Mixxx would refuse silently), and needs the MCP server on the same host as Mixxx, as a user that can read/proc/<mixxx pid>and the library database.crossfadeblocks for the whole fade, up to 120 s. A 16-bar crossfade at 93 BPM takes about 41 s; check that your MCP client's tool timeout allows it.Trigger tools (
cue,nudge_tempo, the hotcue tools,halve_loop,double_loop) return noold->new; they only report that the trigger was sent.set_loop,exit_loop,halve_loop,double_loop, the hotcue tools andnudge_tempohave not been exercised live with a loaded track yet; tests cover their CC encoding and routing only.Ramps from two clients on the same control interleave (there is no per-control lock).
load_trackwalks are serialized by a lock.There are no volume caps, so mind your master level.
Security
The bridge listens on a local Unix socket only (mode
0600, next to a0600lock file). There is no network listener, and the MCP server speaks stdio and prints nothing else on stdout.load_trackis confined to the music folder: paths are resolved withrealpath, links that point out of it are refused, and the file must exist and have an audio extension.send_controlaccepts only controls that are in the CC map.The
load_tracklock file is opened withO_NOFOLLOWand refused unless it is a regular file owned by the server's user and not writable by group or others.
Documentation
Architecture notes (arc42-light): documentation/arc42/index.md.
Credits
This project started from cloudygetty-ai/mixxx-mcp
(MIT) and keeps its tool surface. serrebidev independently found the same write-path and CC
collision bugs in upstream pull requests #1 and #2
(https://github.com/cloudygetty-ai/mixxx-mcp/pull/1); their fixes confirmed the diagnosis.
Tech stack
Python 3.12, the official MCP SDK (mcp 1.30, FastMCP over stdio), python-rtmidi (ALSA
sequencer), a Mixxx controller script (JavaScript for Mixxx's QJSEngine plus a MIDI mapping
XML), a systemd user unit, unittest.
License
MIT, (c) 2026 cloudygetty-ai (original mixxx-mcp) and visterion (mixxx-mcp-bridge).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Create, co-edit, analyze, publish, and export collaborative step-sequencer sessions through MCP.
Remote MCP server for audio stem separation, denoise, reverb, and MIDI export.
MCP server for Producer/Riffusion AI music generation
Drive WhatsApp from any MCP client: pair devices, send text and media, manage contacts and groups.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for Mixxx DJ software that enables AI agents to control transport, mixing, EQ, loops, hotcues, and effects in real time through MIDI and OSC.1MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that lets AI agents control Mixxx DJ software over a virtual MIDI port, enabling playback, mixing, EQ, effects, and track loading.1MIT
- FlicenseNot gradedqualityBmaintenanceEnables an MCP host to scan and catalog a local drum and bass library, search and analyze tracks, plan and validate ordered set lists, and render gapless DJ-style WAV mixes with beat-aligned crossfades and bass swaps.2-
- AlicenseBqualityBmaintenanceEnables natural-language control of Mixxx DJ software through an OSC bridge and 80+ MCP tools covering decks, library, effects, mixer, stems, transitions, video, crates, and recording.1913MIT