Batch audio processing and optimization using FFmpeg. Modify sample rate, bitrate, volume, channels, and apply effects.
A Model Context Protocol (MCP) server for batch audio processing and optimization using FFmpeg. This package provides parameter-based audio modifications including sample rate conversion, bitrate adjustment, volume control, channel configuration, and audio effects.
npm install -g mcp-audio-tweaker
Windows:
# Using Chocolatey
choco install ffmpeg
# Using winget
winget install FFmpeg
macOS:
# Using Homebrew
brew install ffmpeg
Linux:
# Ubuntu/Debian
sudo apt update && sudo apt install ffmpeg
# CentOS/RHEL
sudo yum install ffmpeg
Add to your Claude Desktop configuration:
{
"mcpServers": {
"audio-tweaker": {
"command": "npx",
"args": ["-y", "mcp-audio-tweaker"],
"env": {
"AUDIO_TWEAKER_LOG_LEVEL": "info"
}
}
}
}
Check system requirements:
mcp-audio-tweaker --standalone check
Process a single file:
mcp-audio-tweaker --standalone process \
--input input.wav \
--output output.mp3 \
--volume -3 \
--sample-rate 44100 \
--bitrate 192 \
--normalize
Batch process with preset:
mcp-audio-tweaker --standalone batch \
--input-dir ./audio/raw \
--output-dir ./audio/processed \
--preset game-audio-mobile
List available presets:
mcp-audio-tweaker --standalone presets
Process a single audio file with custom operations.
Parameters:
inputFile
(string): Path to input audio fileoutputFile
(string): Path for output fileoperations
(object): Audio processing operationsoverwrite
(boolean): Whether to overwrite existing filesExample:
{
"inputFile": "/path/to/input.wav",
"outputFile": "/path/to/output.mp3",
"operations": {
"volume": {
"adjust": -3,
"normalize": true,
"targetLUFS": -20
},
"format": {
"sampleRate": 44100,
"bitrate": 192,
"channels": 2,
"codec": "mp3"
},
"effects": {
"fadeIn": 0.1,
"fadeOut": 0.2
}
}
}
Process multiple audio files in a directory.
Parameters:
inputDirectory
(string): Directory containing input filesoutputDirectory
(string): Directory for processed filesfilePattern
(string): Glob pattern for file matchingoperations
(object): Audio processing operationsoverwrite
(boolean): Whether to overwrite existing filesApply predefined audio processing preset.
Parameters:
inputFile
(string): Path to input audio fileoutputFile
(string): Path for output filepreset
(string): Preset name to applyoverwrite
(boolean): Whether to overwrite existing filesAvailable Presets:
game-audio-mobile
: Optimized for mobile gamesgame-audio-desktop
: High-quality for desktop gamesgame-audio-console
: Premium quality for consoleselevenLabs-optimize
: Optimizes ElevenLabs AI voice outputvoice-processing
: General voice and dialogue processingmusic-mastering
: High-quality music masteringsfx-optimization
: Sound effects and ambient audioList all available presets with descriptions.
Parameters:
category
(string, optional): Filter by category (game
, voice
, music
, effects
)Get current status of the audio processing queue.
{
"volume": {
"adjust": -3, // Volume adjustment in dB (-60 to +20)
"normalize": true, // Apply loudness normalization
"targetLUFS": -23 // Target LUFS for normalization
}
}
{
"format": {
"sampleRate": 44100, // Sample rate (8000, 16000, 22050, 44100, 48000, 96000, 192000)
"bitrate": 192, // Bitrate in kbps (64-320)
"channels": 2, // Channel count (1, 2, 6, 8)
"codec": "mp3" // Codec (pcm, mp3, aac, vorbis, flac)
}
}
{
"effects": {
"fadeIn": 0.1, // Fade in duration in seconds
"fadeOut": 0.2, // Fade out duration in seconds
"trim": { // Trim audio
"start": 1.0, // Start time in seconds
"end": 30.0 // End time in seconds
},
"loop": { // Loop audio
"enabled": true,
"count": 3 // Number of loops
}
}
}
@audio-tweaker Apply the elevenLabs-optimize preset to the file /audio/voice-output.wav and save it as /audio/optimized-voice.mp3
@audio-tweaker Process all WAV files in /game-assets/audio/raw/ using the game-audio-mobile preset and save them to /game-assets/audio/mobile/
@audio-tweaker Process /recordings/dialogue.wav with the following operations: normalize audio to -20 LUFS, convert to 22kHz mono MP3 at 128kbps, add 0.05s fade in and 0.1s fade out, and save as /processed/dialogue.mp3
@audio-tweaker What's the current status of the audio processing queue?
elevenLabs-optimize
presetgame-audio-mobile
, game-audio-desktop
, or game-audio-console
presetsmusic-mastering
presetAUDIO_TWEAKER_LOG_LEVEL
: Set logging level (debug
, info
, warn
, error
)FFMPEG_PATH
: Custom FFmpeg binary path (optional)The package supports advanced FFmpeg configurations through direct parameter passing. See the FFmpeg documentation for additional options.
The package provides comprehensive error handling with specific error codes:
FILE_NOT_FOUND
: Input file does not existFFMPEG_NOT_FOUND
: FFmpeg not installed or not in PATHINVALID_PARAMETERS
: Processing parameters validation failedOUTPUT_WRITE_FAILED
: Cannot write to output locationPROCESSING_FAILED
: FFmpeg processing failedPRESET_NOT_FOUND
: Requested preset does not existInput Formats: MP3, WAV, OGG, FLAC, M4A, AAC Output Formats: MP3, WAV, OGG, FLAC, M4A, AAC
git clone https://github.com/your-org/mcp-audio-tweaker.git
cd mcp-audio-tweaker
npm install
npm run build
npm test
npm run test:coverage
npm run test:ffmpeg
This README provides a quick overview. For comprehensive documentation:
MIT License - see LICENSE file for details.
Interface with SIEMENS PLC S7-1500/1200 using their JSON-RPC 2.0 API, exposing PLC functionalities as MCP tools for programmatic interaction.
Detects Chinese mobile phone carriers, including China Mobile, China Unicom, China Telecom, and virtual operators.
Provides Chinese Tung Shing (almanac) data, including calendar conversions, auspicious activities, and traditional metaphysical elements.
An MCP server for accessing UPS shipping and logistics services.
Generates true random coin flips using the random.org API.
Analyzes manufacturing production capacity, including evaluations, equipment, processes, and factory distribution to assess enterprise strength.
An MCP server for accessing Bazi (Chinese astrology) data, requiring an API key.
Provides weather-related tools using the US National Weather Service API.
MCP Server for DealX platform
Provides emotional support and positive reinforcement for LLMs, with customizable therapeutic personas.