soundraw-game-bgm
Provides auto-generated integration code for Unity engine, allowing developers to easily incorporate generated background music into their game projects.
Provides auto-generated integration code for Unreal Engine, allowing developers to easily incorporate generated background music into their game projects.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@soundraw-game-bgm generate BGM for a boss fight in a dark fantasy game"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Soundraw Game BGM MCP Server
An MCP (Model Context Protocol) server that enables AI agents to generate game background music. Uses DeepSeek for intelligent scene analysis and parameter generation, and Soundraw B2B API V3 for actual music generation.
🎶 Why Game Developers ❤️ This
Modern games use dynamic, adaptive music — but composing custom BGM is costly and time-consuming.
soundraw-game-bgm automates composition by analyzing your game scenes and generating royalty-free background music that fits the mood and gameplay context.
It even outputs ready-to-use integration code for Unity and Unreal Engine so you can drop the track in with no extra engineering work.
Architecture
Game Dev Agent (Claude/Cursor)
↓ calls MCP tool
MCP Server (soundraw-game-bgm)
↓ uses DeepSeek API for reasoning
DeepSeek analyzes game context
↓ generates Soundraw parameters (moods, genres, themes, tempo, energy)
Soundraw API generates actual music
↓ async: returns request_id → poll for result
Game Dev Agent receives share_link + audio_urlRelated MCP server: Unreal Engine MCP Server
Features
Cost-Optimized: Uses DeepSeek (~90% cheaper than Claude) for scene analysis
4 MCP Tools: Full suite for game audio needs
Real Soundraw API: Uses B2B API V3 with proper async handling
Engine Integration: Auto-generated code snippets for Unreal, Unity, and Godot
Adaptive Audio: Stem muting for dynamic game audio layers
Installation
git clone https://github.com/yksanjo/soundraw-game-bgm.git
cd soundraw-game-bgm
npm install
npm run buildConfiguration
Create a .env file:
DEEPSEEK_API_KEY=sk-your-deepseek-api-key
SOUNDRAW_API_KEY=your-soundraw-bearer-tokenTesting API Connections
Before using the MCP server, verify your API keys work:
# Quick test (checks API connections only)
npm run test:apis
# Full test (generates a 10-second track - uses API credits)
npm run test:apis:fullExpected output:
🎮 Soundraw Game BGM MCP Server - API Test
==================================================
Testing DeepSeek API
==================================================
API Key: sk-xxxxxx...
✅ DeepSeek Response: "DeepSeek OK"
==================================================
Testing Soundraw API Connection
==================================================
API Key: xxxxxxxxxx...
✅ Soundraw Account: Number of queries: X from ...
==================================================
Testing Soundraw Tags Endpoint
==================================================
✅ Available genres for "Epic" mood: Orchestra, Electronica...
✅ Available themes: Gaming, Cinematic...
==================================================
Test Summary
==================================================
✅ DeepSeek API
✅ Soundraw Connection
✅ Soundraw Tags
❌ Music Generation (skipped without --full flag)
🎉 Core APIs working! Ready to use the MCP server.MCP Tools
1. generate_bgm
Generate background music based on game scene description.
Input:
{
"scene": "boss_fight",
"game_genre": "dark_souls_like",
"intensity": "high",
"mood": "epic",
"duration_seconds": 60,
"engine": "unreal",
"file_format": "m4a"
}Output:
{
"share_link": "https://soundraw.io/edit_music?m=...",
"audio_url": "https://..../final_xxx.m4a",
"request_id": "...",
"duration_seconds": 60,
"bpm": 140,
"timestamps": [{"start": 0, "end": 15, "energy": "Low"}, ...],
"file_format": "m4a",
"integration_code": "// Unreal Engine 5 integration...",
"deepseek_reasoning": "Boss fights need epic orchestral...",
"soundraw_params": {"moods": ["Epic", "Dark"], "genres": ["Orchestra"], ...}
}2. get_bgm_variations
Generate variations of existing BGM.
Input:
{
"share_link": "https://soundraw.io/edit_music?m=...",
"variation_type": "similar",
"length": 60
}Or customize energy/stems:
{
"share_link": "https://soundraw.io/edit_music?m=...",
"variation_type": "customize",
"energy_preset": "building",
"mute_stems": ["me"]
}Stem codes: bc (backing), bs (bass), dr (drums), me (melody), fe (fill end), ff (fill start)
3. adaptive_layer_control
Generate multiple versions with different stems muted for adaptive audio.
Input:
{
"share_link": "https://soundraw.io/edit_music?m=...",
"layers_to_keep": ["drums", "bass", "melody", "backing"]
}Output: Separate audio URLs for each layer + JavaScript integration code for runtime mixing.
4. scene_transition_music
Generate transition music between scenes.
Input:
{
"from_scene": "peaceful village exploration",
"to_scene": "intense boss battle",
"transition_type": "stinger",
"duration_seconds": 15
}Transition Types:
fade: Gradual energy shiftstinger: Dramatic accentcrossfade: Smooth blend
Usage with Claude Code
Add to ~/.mcp.json:
{
"mcpServers": {
"soundraw-game-bgm": {
"command": "node",
"args": ["/path/to/soundraw-game-bgm/dist/index.js"],
"env": {
"DEEPSEEK_API_KEY": "sk-your-key",
"SOUNDRAW_API_KEY": "your-bearer-token"
}
}
}
}Then restart Claude Code and try:
Generate epic boss battle music for my Dark Souls-like game, 60 seconds, with Unreal Engine integration codeSoundraw API Parameters
The server maps game scenes to these Soundraw parameters:
Moods: Angry, Busy & Frantic, Dark, Dreamy, Elegant, Epic, Euphoric, Fear, Funny & Weird, Glamorous, Happy, Heavy & Ponderous, Hopeful, Laid Back, Mysterious, Peaceful, Restless, Romantic, Running, Sad, Scary, Sentimental, Sexy, Smooth, Suspense
Genres: Acoustic, Hip Hop, Beats, Funk, Pop, Drum n Bass, Trap, Tokyo night pop, Rock, Latin, House, Tropical House, Ambient, Orchestra, Electro & Dance, Electronica, Techno & Trance, Jersey Club, Drill, R&B, Lofi Hip Hop, World, Afrobeats, Christmas
Themes: Ads & Trailers, Broadcasting, Cinematic, Corporate, Comedy, Cooking, Documentary, Drama, Fashion & Beauty, Gaming, Holiday Season, Horror & Thriller, Motivational & Inspiring, Nature, Photography, Sports & Action, Technology, Travel, Tutorials, Vlogs, Wedding & Romance, Workout & Wellness
Tempo: low (<100 bpm), normal (100-125 bpm), high (>125 bpm)
Energy Levels: Muted, Low, Medium, High, Very High
Development
# Run in development mode (watches for changes)
npm run dev
# Type check
npm run typecheck
# Build
npm run build
# Run built version
npm start
# Test API connections
npm run test:apisCost
Component | Purpose | Cost |
DeepSeek | Scene analysis → Soundraw params | ~$0.001/request |
Soundraw | Music generation | Per your B2B plan |
DeepSeek handles the reasoning at ~90% less cost than Claude API.
License
MIT
Available Tools
4 toolsadaptive_layer_controlA
Generate multiple versions of a track with different stems muted for adaptive game audio. Creates separate audio files for each layer configuration that can be mixed in real-time based on gameplay.
Inputs: share_link (required), layers_to_keep (required), file_format.
generate_bgmA
Generate background music for a game scene. Uses DeepSeek to analyze the scene and map to Soundraw parameters, then generates music via Soundraw API. Returns audio URL, share link, and optional game engine integration code.
Inputs: scene (required), game_genre (required), intensity (required), mood, +3 more.
get_bgm_variationsA
Generate a variation of an existing BGM using Soundraw. Use "similar" to create a new song with similar style, or "customize" to adjust energy levels or mute stems of the original.
Inputs: share_link (required), variation_type (required), length, energy_preset, +1 more.
scene_transition_musicA
Generate transition music between two game scenes. Uses DeepSeek to analyze the emotional journey between scenes and creates appropriate transition audio with dynamic energy levels.
Inputs: from_scene (required), to_scene (required), transition_type (required), duration_seconds (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a distinct purpose (generation, adaptation, variation, transition). Some slight overlap between adaptive_layer_control and get_bgm_variations regarding stems, but descriptions clarify the different contexts (real-time mixing vs. variation creation).
All tools follow a consistent verb_noun pattern in snake_case (e.g., generate_bgm, get_bgm_variations). No mixing of conventions or irregular naming.
Four tools cover the essential functionalities for game background music generation: initial generation, adaptive layering, variations, and transitions. This is well-scoped and not excessive.
The set covers core operations but lacks a tool for listing or deleting existing BGMs. Otherwise, the lifecycle from generation to adaptation to variation to transition is well-covered.
Maintenance
Related MCP Connectors
AI game assets for agents: consistent sprites, 2D animations, tiles, maps, music and engine exports.
Game-design skills for AI agents: describe a problem, get the right skill. Plus free sound effects.
Score video, make music as an agent: 100+ AI instruments play your MIDI, audio, stems, Logic/Ableton
Score video as an agent: cue sheet from the cut, 100+ AI instruments play your MIDI, mix to picture
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to interact with Unity projects through multimodal vision, code analysis, asset management, and scene manipulation. Supports real-time Unity editor control, project search, script creation, and visual debugging through screenshots.32MIT
- AlicenseDqualityBmaintenanceEnables AI assistants to control Unreal Engine via Remote Control API for game development automation, including asset management, actor control, level editing, animation, physics, visual effects, and cinematics creation through natural language.11,039MIT
- AlicenseBqualityBmaintenanceEnables AI-powered game audio creation for Unreal Engine 5.7, integrating Wwise, MetaSounds, and Blueprint through MCP tools to generate DSP graphs, sound systems, and trigger logic.818MIT

Sprixen MCP serverofficial
AlicenseNot gradedqualityCmaintenanceEnables AI agents to create style-locked game projects and generate sprites, animations, tiles, maps, music, 3D models, and VFX, then export engine-ready packages for Godot, Phaser, Unity, GameMaker, or RPG Maker MZ.MIT