Enables conversion of audio files to MIDI format, allowing extraction of musical notation and melodies from audio recordings.
MusicGPT MCP Server
A Model Context Protocol (MCP) server for the MusicGPT API, providing AI-powered audio generation and processing capabilities.
Features
Music Generation
Generate Music: Create custom music from text prompts with optional lyrics
Cover Songs: Create cover versions with different voices
Sound Effects: Generate sound effects from descriptions
Lyrics Generation: Generate song lyrics based on themes
Voice & Speech
Voice Changer: Convert audio to different AI voices
Text-to-Speech: Convert text to natural-sounding speech
Voice Library: Access 3000+ AI voices
Audio Processing
Audio Extraction: Isolate vocals, instruments, or specific stems
Denoise/Deecho/Dereverb: Clean up audio recordings
Audio Mastering: Professional-quality audio mastering
Format Conversion: Convert between audio formats
Audio Manipulation
Audio Cutter: Trim audio to specific durations
Speed Changer: Adjust playback speed
Remix: Create remixes of tracks
Extend: AI-powered audio extension
Inpaint: Fill gaps in audio
Sing Over Instrumental: Add AI vocals to instrumentals
Analysis Tools
Transcription: Convert speech to text
Key & BPM Detection: Extract musical key and tempo
Audio to MIDI: Convert audio to MIDI format
Installation
Or install from source:
Configuration
Get Your API Key
Visit MusicGPT API Dashboard
Sign up for an account
Generate your API key
Environment Variables
Set the following environment variable:
Optional configuration:
Usage with MCP Clients
Claude Desktop
Add to your claude_desktop_config.json:
MacOS/Linux
Windows
Cline
Add to your MCP settings:
Available Tools
Helper Tools
get_conversion_by_id
Get the status and results of a conversion task.
get_all_voices
List all available voices with pagination.
search_voices
Search for voices by name.
Music Generation Tools
generate_music
Generate custom music from a text prompt.
create_cover_song
Create a cover version with a different voice.
generate_sound_effect
Generate sound effects from text descriptions.
generate_lyrics
Generate song lyrics from a theme or prompt.
Voice & Speech Tools
voice_changer
Convert audio to a different voice.
text_to_speech
Convert text to speech.
Audio Processing Tools
extract_audio
Extract vocals, instruments, or stems.
denoise_audio
Remove background noise from audio.
deecho_audio
Remove echo from audio.
dereverb_audio
Remove reverb from audio.
Audio Manipulation Tools
convert_audio_format
Convert audio to different formats.
cut_audio
Trim audio to specific time range.
change_audio_speed
Change playback speed.
master_audio
Apply professional audio mastering.
remix_audio
Create a remix of audio.
extend_audio
Extend audio using AI continuation.
inpaint_audio
Fill gaps or corrupted sections in audio.
sing_over_instrumental
Add AI vocals to an instrumental track.
Analysis Tools
transcribe_audio
Transcribe speech to text.
extract_key_bpm
Extract musical key and BPM.
audio_to_midi
Convert audio to MIDI format.
Workflow Example
Most audio processing operations are asynchronous. Here's a typical workflow:
Start a conversion (e.g.,
generate_music)Returns:
task_idandconversion_id
Check status using
get_conversion_by_idPass the
task_idorconversion_idStatus values:
PENDING,PROCESSING,COMPLETED,FAILED
Get results when status is
COMPLETEDThe response includes
audio_urlwith the processed audio
Example:
Webhook Support
Most conversion tools support webhooks for async notifications. Set the webhook_url parameter to receive a callback when processing completes:
The webhook will receive a POST request with the conversion results.
API Documentation
For detailed API documentation, visit:
Conversion Types
When using get_conversion_by_id, use these conversion types:
MUSIC_AI- Music generationTEXT_TO_SPEECH- Text to speechVOICE_CONVERSION- Voice changerEXTRACTION- Audio extractionCOVER- Cover songsSTEMS_SEPARATION- Stems separationVOCAL_EXTRACTION- Vocal extractionDENOISING- DenoiseDEECHO- DeechoDEREVERB- DereverbSOUND_GENERATOR- Sound effectsAUDIO_TRANSCRIPTION- TranscriptionAUDIO_SPEED_CHANGER- Speed changerAUDIO_MASTERING- MasteringAUDIO_CUTTER- Audio cutterREMIX- RemixFILE_CONVERT- Format conversionKEY_BPM_EXTRACTION- Key & BPM extractionAUDIO_TO_MIDI- Audio to MIDIEXTEND- Audio extensionINPAINT- Audio inpaintingSING_OVER_INSTRUMENTAL- Sing over instrumentalLYRICS_GENERATOR- Lyrics generation
Rate Limits
MusicGPT API has rate limits based on your subscription tier. Check your API dashboard for your limits.
Troubleshooting
"Authentication failed"
Verify your
MUSICGPT_API_KEYis correctCheck your API key is active in the dashboard
Ensure you have sufficient credits
"Rate limit exceeded"
Wait before making more requests
Check your API usage in the dashboard
Upgrade your plan if needed
Timeout errors
Increase
MUSICGPT_TIMEOUTfor large audio filesDefault is 60 seconds, increase if needed
Tool not found
Ensure the server is running
Rebuild the project:
npm run buildCheck your MCP client configuration
Development
Build the server:
Development mode (watch for changes):
Credits & Costs
Most operations consume API credits. Check the pricing page for details.
License
MIT
Support
For issues with this MCP server:
For MusicGPT API issues: