Hydrogen MCP Server
Provides export of Hydrogen songs to type 1 MIDI files and supports MIDI trigger controls, using the saved arrangement, velocity, instrument mapping, and enabled tempo markers.
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.
Hydrogen MCP Server

Sequence, mix, and render Hydrogen projects from your local MCP client.
Quick start · Tool overview · First groove · Configuration
This independent integration exposes 28 MCP tools and maps 67 OSC action names from Hydrogen 1.2.7. It supports live transport and mixer control, native project editing, audio and MIDI export, and Windows desktop controls for Hydrogen menus and dialogs.
Quick start
Install Python 3.13 or 3.14, uv, and Hydrogen. The Windows Hydrogen installer includes hydrogen.exe and h2cli.exe. Native integration is verified on Windows with Hydrogen 1.2.7 and Python 3.13.
git clone https://github.com/RandyNorthrup/hydrogen-mcp-server.git
cd hydrogen-mcp-server
uv sync --locked --no-devRegister the generated executable in your MCP client using its absolute path. A client with an mcpServers configuration can use this example.
{
"mcpServers": {
"hydrogen": {
"command": "C:/path/to/hydrogen-mcp-server/.venv/Scripts/hydrogen-mcp.exe",
"args": []
}
}
}On Linux and macOS, use .venv/bin/hydrogen-mcp inside your checkout and set the Hydrogen paths for your installation. The MCP transport is stdio. You can also start it manually from the checkout with uv run --locked --no-dev hydrogen-mcp.
Connect to Hydrogen for live control
Open Hydrogen and go to Preferences → OSC.
Enable OSC support and OSC feedback. Use port
9000or setHYDROGEN_OSC_PORTto match your app.Call
hydrogen_status. Look for a timestamp inosc.last_feedback_received_atto confirm live feedback.
Offline project editing and h2cli audio export work with the desktop app closed. Keep trusted source files in the configured project or library roots.
If Hydrogen 1.2.7 saves OSC as enabled but the listener does not start, apply a different unused incoming port in Preferences, then apply your original port again. You can also save your song and restart Hydrogen.
Related MCP server: openDAW MCP
Tool overview
Workflow | Tools |
Discover files, live controls, and feedback |
|
Control transport, recording, BPM, mixer, timeline, MIDI triggers, and JACK |
|
Launch Hydrogen and work with the active song |
|
Compose and inspect songs, patterns, instruments, and layered samples |
|
Read and create playlists |
|
Load, inspect, validate, import, upgrade, and export drumkits |
|
Render a mix, export isolated stereo stems, or write type 1 MIDI |
|
View and interact with a Hydrogen window on Windows |
|
The hydrogen://reference/osc resource lists the action signatures. For live controls, sent_unconfirmed means the UDP datagram was sent. Mixer feedback comes back through hydrogen_status. hydrogen_save_as verifies the saved song file and changes the active save path. Save current edits before opening or creating another live song.
For Windows desktop control, list the windows, capture a selected window, then send client-relative pointer coordinates or keyboard input to that window. The feature requires an interactive Windows session. Plugins and JACK operations depend on support in the installed Hydrogen build.
Make a two-bar groove
Ask your MCP client to create two bars with the factory GM kit and export a stereo WAV. To call the tools directly, send this payload to hydrogen_edit_song.
{
"source": { "scope": "factory", "path": "demo_songs/GM_kit_demo1.h2song" },
"output": "Grooves/first-beat.h2song",
"edit": {
"name": "First beat",
"bpm": 110,
"mode": "song",
"reset_patterns": true,
"patterns": [
{
"name": "Beat",
"notes": [
{ "instrument": 0, "position": 0 },
{ "instrument": 0, "position": 48 },
{ "instrument": 0, "position": 96 },
{ "instrument": 0, "position": 144 }
]
}
],
"arrangement": [["Beat"], ["Beat"]]
}
}Then send this payload to hydrogen_render.
{
"source": { "path": "Grooves/first-beat.h2song" },
"output": "Grooves/first-beat.wav"
}With the default checkout configuration, both files appear in projects/Grooves/. File references use paths relative to projects, user, or factory. Discover those paths with hydrogen_list. File edits write a new project, and drumkit imports can also create a folder in the user library.
Rendering details
Notes and timing. Use instrument IDs from
hydrogen_read_songfor offline edits. Hydrogen uses 48 ticks per quarter note and 192 ticks for a 4/4 bar. Live OSC indexes are zero-based except for one-based mixerstrippositions.Audio. The Windows 1.2.7 format audit covered WAV, AIFF, FLAC, Ogg Vorbis, Opus, AU, CAF, Wave64, VOC, and MP3. Codec availability depends on the Hydrogen build. Use 48 kHz for Opus and 8-bit PCM for VOC. Stems are separate stereo WAVs rendered by Hydrogen.
MIDI. Export uses the saved arrangement, velocity, instrument mapping, and enabled tempo markers. It includes every note with nonzero probability. The MIDI file contains events for import into a DAW or sequencer.
Sample layers.
sample_instrumentsadds instruments from existing audio files.sample_layersedits gain, pitch, velocity range, trim, loop, or sample assignment. Keep custom samples with the project for portable exports.Drumkits. Import and export Hydrogen’s
.h2drumkitarchives. The import tool’s upgrade mode accepts a manifest or archive and writes the upgraded result to a new directory.
Configuration
Set these variables in your MCP client environment, or copy .env.example to .env and run uv run --env-file .env hydrogen-mcp. Reconnect the client after changing settings.
Environment variable | Windows default |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The MCP server sends OSC over loopback. Hydrogen controls its own listener, so check its firewall access before using OSC on an untrusted network. Hydrogen resolves the asset references inside songs and kits used for native rendering.
Verification
CI checks formatting, lint, types, protocol tests, dependencies, and the wheel build on Windows. The optional native suite verifies live OSC, song and kit operations, rendering, stem isolation, and Windows desktop capture and input against Hydrogen itself.
uv sync --locked
uv run --locked ruff format --check .
uv run --locked ruff check .
uv run --locked mypy
uv run --locked pytest -q
uv run --locked bandit -q -r src
uv run --locked deptry .
uv run --locked vulture src tests --min-confidence 80
uv run --locked pip-audit --local --progress-spinner off
uv build --no-sourcesRun the native suite on Windows with a standard Hydrogen installation. The desktop test activates a disposable Hydrogen window.
$env:HYDROGEN_NATIVE_TESTS = '1'
uv run --locked pytest -qTool 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
Remote MCP server for audio stem separation, denoise, reverb, and MIDI export.
OSC ↔ MIDI bridge for synthesizers and DAWs, with the SyntHub catalogue. A MIDI MCP and OSC MCP.
Create, co-edit, analyze, publish, and export collaborative step-sequencer sessions through MCP.
MCP server for Producer/Riffusion AI music generation
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables controlling FL Studio on macOS via MCP, including transport, mixer, channel, MIDI export, and Piano Roll note insertion.26 PyPIMIT
- AlicenseBqualityBmaintenanceMCP server for headless, agent-native control of openDAW, enabling programmatic music production with tracks, instruments, effects, MIDI, automation, and rendering via 543 tools.100Apache 2.0
- AlicenseNot gradedqualityBmaintenanceLocal MCP bridge for Bitwig Studio, enabling read-back-verified control of tracks, devices, transport, and plug-in parameters via any MCP client.3MIT
- AlicenseCqualityDmaintenanceEnables end-to-end control of FL Studio on macOS through MCP clients, including transport, patterns, mixer, piano roll, playlist, live metering, browser navigation, and rendering.160MIT