Skip to content
Conduit

mcp server

16bits-audio-mcp

MCP server for game audio generation — BGM, SE, jingles as 16-bit WAV. Zero dependencies, pure Zig.

Matuyuhi/16bits-audio-mcpcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 21, 2026

16bits-gaudio-mcp

CI Release License: MIT Zig

A Zig-powered MCP server that generates game audio — loopable BGMs, sound effects, and jingles — as 16-bit PCM WAV files.

Claude calls the tools, and .wav files come out. That's it.

  • Zero external dependencies (Zig standard library only)
  • 16-bit PCM WAV output
  • FM synthesis, Schroeder reverb, ADSR envelopes, multi-track mixing
  • Deterministic generation via seed — same seed = same output, every time

Samples

All samples below were generated by this tool. Click to listen on GitHub, or clone the repo to get the WAV files.

BGM

SampleStyleKey / ScaleBPM
AdventureadventureC major140
Boss BattlebossD minor160
TowntownF major100
CybercyberA harmonic_minor140
HorrorhorrorC phrygian70

Sound Effects

JumpCoinExplosionLaser
PowerupDashShieldWarp
Thunder

Jingles

Stage ClearGame OverVictory
Item GetSecret FoundDanger

Quick Start

brew tap matuyuhi/tools
brew install 16bits-audio-mcp

Add to your Claude config (~/.claude/settings.json for Claude Code, or claude_desktop_config.json for Desktop):

{
  "mcpServers": {
    "16bits-audio": {
      "command": "16bits-audio-mcp"
    }
  }
}

Then just ask Claude:

Generate a dungeon BGM at 90 BPM in A harmonic_minor, 8 bars, and play it

What You Can Generate

BGM — 15 styles

Full 4-track compositions (melody, bass, harmony, percussion) with per-style timbre, rhythm, and reverb.

StyleMoodTime Sig.Chord Progression
adventureBright, heroic4/4I–IV–V–I
dungeonDark, tense4/4i–VI–VII–i
bossAggressive, dramatic4/4i–bVII–bVI–V
townWarm, waltz3/4I–V–vi–IV
battleIntense, driving4/4ii–V–I–VI
fieldOpen, pastoral4/4I–vi–IV–V
puzzleQuirky, thoughtful5/4I–iii–vi–IV
menuClean, ambient4/4I–IV–I–V
horrorUnsettling, sparse4/4i–bII–V–i
spaceEthereal, floating4/4Isus4–bVII–IV–I
shopUpbeat, friendly4/4I–IV–iii–vi
castleRegal, minor4/4i–iv–V–i
underwaterDreamy, flowing4/4Isus2–IV–vi–Vsus4
forestNatural, gentle3/4I–iii–IV–vi
cyberEdgy, electronic4/4i–bVII7–bVI–bVII

Each style uses different waveforms, ADSR envelopes, percussion patterns (kick/snare/hihat/rim/shaker), swing, and reverb settings.

Sound Effects — 20 types

TypeDescriptionDuration
jumpUpward frequency sweep200ms
hitNoise burst, rapid decay100ms
coinTwo-note chime (C6→E6)150ms
explosionFiltered noise rumble800ms
laserDownward sawtooth sweep300ms
powerupAscending pentatonic arpeggio500ms
errorSquare wave with tremolo200ms
footstepTwo filtered noise bursts200ms
menu_selectBright short blip80ms
menu_cancelDescending two-note blip120ms
dashFast noise swoosh250ms
shieldMetallic resonant tone400ms
healGentle ascending shimmer600ms
chargeRising frequency crescendo800ms
warpWobbly FM sweep500ms
doorLow resonant thud350ms
switchShort click-clack60ms
splashFiltered water noise500ms
windSustained modulated noise1000ms
thunderCrack + low rumble1200ms

All SEs support pitch (0.5–2.0) and volume (0.0–1.0) for tuning.

Jingles — 12 types

TypeMoodWaveform
stage_clearTriumphant ascending + fanfare chordsine
game_overDescending minor with reverbtriangle
level_upQuick ascending pentatonicsine
item_getTwo bright notessine
boss_clearDramatic ascending + power chordsine
victoryFanfare brass ascending + big chordsawtooth
defeatSlow descending minortriangle
secret_foundMysterious chromatic sparklesine
saveGentle confirmation chimesine
shop_buyCheerful quick dingsquare
dangerUrgent pulsing alarm (minor 2nd)square
unlockBright ascending + shimmer chordsine

Tempo feel options: fast, normal, slow, triumphant

Scales — 10 types

ScaleIntervalsCharacter
major0, 2, 4, 5, 7, 9, 11Bright, happy
minor0, 2, 3, 5, 7, 8, 10Sad, serious
pentatonic0, 2, 4, 7, 9Simple, universal
blues0, 3, 5, 6, 7, 10Bluesy, soulful
dorian0, 2, 3, 5, 7, 9, 10Jazz, folk
mixolydian0, 2, 4, 5, 7, 9, 10Rock, dominant
phrygian0, 1, 3, 5, 7, 8, 10Spanish, exotic
lydian0, 2, 4, 6, 7, 9, 11Dreamy, bright
harmonic_minor0, 2, 3, 5, 7, 8, 11Dramatic, Eastern
chromatic0–11All semitones

Audio Effects — 9 types (via wav_fx)

EffectParametersUse Case
reverbroom_size (0–1), wet (0–1)Space, depth
delaydelay_ms, feedback (0–1), wet (0–1)Echo, rhythm
lowpasscutoff_hzMuffle, warmth
highpasscutoff_hzThin, clarity
bandpasslow_hz, high_hzTelephone, radio
chorusdepth (0–1), rate Hz, wet (0–1)Width, shimmer
distortiondrive (0–1), wet (0–1)Grit, aggression
bitcrusherbit_depth (1–16), downsample (1–64)Lo-fi, retro
tremolorate Hz, depth (0–1)Pulsing, vibrato

Effects can be chained — they are applied in order.

Example Prompts

Basic Generation

Generate a boss battle BGM at 160 BPM in D minor, 8 bars
Create jump and coin sound effects, then play them
Make a victory jingle in G major with triumphant tempo

Creative Combinations

Generate a cyber BGM at 140 BPM in A harmonic_minor, then apply bitcrusher (8-bit, downsample 4) for retro feel
Create a forest BGM in E lydian at 100 BPM, 16 bars, then add chorus and reverb
Generate explosion, laser, and hit SEs with different pitches, then mix them with offsets into one file

Workflow: Iterate with Seeds

Generate a dungeon BGM with seed 42 — if you like the melody, keep the same seed and try different scales

The seed parameter makes BGM generation deterministic. Same seed + same parameters = same output. Change key, scale, or bpm while keeping the seed to preserve the melody shape.

Install

Homebrew (recommended)

brew tap Matuyuhi/tools
brew install 16bits-audio-mcp

One-liner

curl -fsSL https://raw.githubusercontent.com/Matuyuhi/16bits-gaudio-mcp/main/install.sh | bash

Build from source

Requires Zig 0.15.x.

git clone https://github.com/Matuyuhi/16bits-gaudio-mcp.git
cd 16bits-gaudio-mcp
zig build
# binary: zig-out/bin/16bits-audio-mcp

Or:

make install   # builds and installs to ~/.local/bin

Configuration

Claude Code

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "16bits-audio": {
      "command": "16bits-audio-mcp"
    }
  }
}

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "16bits-audio": {
      "command": "16bits-audio-mcp"
    }
  }
}

If you built from source, use the full path:

{
  "mcpServers": {
    "16bits-audio": {
      "command": "/path/to/zig-out/bin/16bits-audio-mcp"
    }
  }
}

Tools Reference (9 tools)

bgm_compose

Generate loopable BGM with 4 tracks (melody, bass, harmony, percussion).

ParameterTypeRequiredDescription
outputstringyesOutput WAV file path
stylestringyesOne of 15 styles (see above)
bpmnumberyesBeats per minute
duration_barsnumberyesNumber of bars
sample_ratenumberyesSample rate (e.g. 44100)
keystringyesMusical key (e.g. "C", "F#", "Bb")
scalestringyesOne of 10 scales (see above)
seednumberyesRandom seed for deterministic generation

jingle_gen

Generate short game event jingles.

ParameterTypeRequiredDescription
outputstringyesOutput WAV file path
typestringyesOne of 12 jingle types (see above)
sample_ratenumberyesSample rate
keystringyesMusical key
tempo_feelstringyesfast / normal / slow / triumphant

se_gen

Generate game sound effects.

ParameterTypeRequiredDescription
outputstringyesOutput WAV file path
typestringyesOne of 20 SE types (see above)
pitchnumberyesPitch multiplier (0.5–2.0)
volumenumberyesVolume (0.0–1.0)
sample_ratenumberyesSample rate

note_synth

Synthesize single notes or chords to WAV.

ParameterTypeRequiredDescription
outputstringyesOutput WAV file path
notesstring[]yesNote names (e.g. ["C4", "E4", "G4"])
waveformstringyessine / square / sawtooth / triangle / pulse
duration_msnumberyesDuration in milliseconds
adsrobjectyes{attack_ms, decay_ms, sustain_level, release_ms}
sample_ratenumberyesSample rate
reverbbooleannoApply reverb (default: false)

fm_patch

Generate a tone using FM synthesis (YM2612-style 2-operator).

ParameterTypeRequiredDescription
outputstringyesOutput WAV file path
carrier_notestringyesCarrier note (e.g. "A2")
modulator_rationumberyesModulator frequency ratio
modulation_indexnumberyesFM modulation depth
carrier_adsrobjectyesCarrier ADSR envelope
modulator_adsrobjectyesModulator ADSR envelope
duration_msnumberyesDuration in milliseconds
sample_ratenumberyesSample rate

wav_fx

Apply effects chain to an existing WAV file.

ParameterTypeRequiredDescription
inputstringyesInput WAV file path
outputstringyesOutput WAV file path
effectsobject[]yesArray of effects (see effect types above)

wav_mix

Mix multiple WAV files into one.

ParameterTypeRequiredDescription
tracksobject[]yes{path, gain, offset_ms} array
outputstringyesOutput WAV file path
normalizebooleannoNormalize peak to -1 dBFS

wav_info

Get WAV file metadata and waveform statistics (sample rate, channels, bit depth, duration, RMS/peak dB).

ParameterTypeRequiredDescription
pathstringyesWAV file path

wav_play

Play a WAV file asynchronously (macOS: afplay, Linux: aplay).

ParameterTypeRequiredDescription
pathstringyesWAV file path

Supported Keys

C, C#, D, D#, E, F, F#, G, G#, A, A#, B (and flats: Db, Eb, Gb, Ab, Bb)

Note range: C0–B9 (MIDI 12–131). A4 = 440 Hz.

Tips

  • Seed for iteration: Use seed to lock in a melody you like, then tweak key, scale, bpm, or style.
  • Effect chaining: Apply multiple effects in sequence — e.g., bitcrusher → reverb for lo-fi ambient.
  • Mixing workflow: Generate individual tracks (BGM, SEs, jingles), then combine with wav_mix using offset_ms for precise timing.
  • Pitch shifting SEs: Use pitch: 0.5 for heavier sounds, pitch: 2.0 for lighter/faster variants.
  • Lo-fi retro sound: Apply bitcrusher (bit_depth: 4–8, downsample: 2–8) to any generated audio.

Contributing

Issues and PRs welcome at Matuyuhi/16bits-gaudio-mcp.

zig build          # build
zig fmt src/       # format

License

MIT

↑↓ navigate openesc close