MusicGPT MCP Server
Provides AI-powered audio generation and processing through the MusicGPT API, enabling music creation, voice conversion, audio manipulation, stem extraction, and audio analysis capabilities.
README
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
npm install mcp-server-musicgpt
Or install from source:
git clone https://github.com/pasie15/mcp-server-musicgpt.git
cd mcp-server-musicgpt
npm install
npm run build
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:
export MUSICGPT_API_KEY="your_api_key_here"
Optional configuration:
export MUSICGPT_BASE_URL="https://api.musicgpt.com/api/public/v1" # Default
export MUSICGPT_TIMEOUT="60000" # Timeout in milliseconds (default: 60000)
Usage with MCP Clients
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"musicgpt": {
"command": "npx",
"args": ["-y", "mcp-server-musicgpt"],
"env": {
"MUSICGPT_API_KEY": "your_api_key_here"
}
}
}
}
<details> <summary>Alternative: Install from source</summary>
MacOS/Linux
{
"mcpServers": {
"musicgpt": {
"command": "node",
"args": ["/path/to/mcp-server-musicgpt/dist/index.js"],
"env": {
"MUSICGPT_API_KEY": "your_api_key_here"
}
}
}
}
Windows
{
"mcpServers": {
"musicgpt": {
"command": "node",
"args": ["C:\\path\\to\\mcp-server-musicgpt\\dist\\index.js"],
"env": {
"MUSICGPT_API_KEY": "your_api_key_here"
}
}
}
}
</details>
Cline
Add to your MCP settings:
{
"musicgpt": {
"command": "npx",
"args": ["-y", "mcp-server-musicgpt"],
"env": {
"MUSICGPT_API_KEY": "your_api_key_here"
}
}
}
Available Tools
Helper Tools
get_conversion_by_id
Get the status and results of a conversion task.
{
"conversionType": "MUSIC_AI",
"task_id": "uuid-here" // or use conversion_id
}
get_all_voices
List all available voices with pagination.
{
"limit": 20, // optional, default: 20
"page": 0 // optional, default: 0
}
search_voices
Search for voices by name.
{
"voice_name": "Taylor Swift"
}
Music Generation Tools
generate_music
Generate custom music from a text prompt.
{
"prompt": "An upbeat electronic dance track with energetic synths",
"music_style": "EDM", // optional
"lyrics": "Verse 1: ...", // optional
"make_instrumental": false, // optional
"vocal_only": false, // optional
"voice_id": "voice-uuid", // optional
"webhook_url": "https://example.com/webhook" // optional
}
create_cover_song
Create a cover version with a different voice.
{
"audio_url": "https://example.com/song.mp3",
"voice_id": "voice-uuid",
"webhook_url": "https://example.com/webhook" // optional
}
generate_sound_effect
Generate sound effects from text descriptions.
{
"prompt": "Thunder and rain in a forest",
"duration": 5 // optional, in seconds
}
generate_lyrics
Generate song lyrics from a theme or prompt.
{
"prompt": "A song about summer adventures",
"genre": "Pop" // optional
}
Voice & Speech Tools
voice_changer
Convert audio to a different voice.
{
"audio_url": "https://example.com/audio.mp3",
"voice_id": "voice-uuid"
}
text_to_speech
Convert text to speech.
{
"text": "Hello, this is a text-to-speech conversion",
"voice_id": "voice-uuid"
}
Audio Processing Tools
extract_audio
Extract vocals, instruments, or stems.
{
"audio_url": "https://example.com/song.mp3",
"extraction_type": "vocals" // vocals, instrumental, drums, bass, piano, other
}
denoise_audio
Remove background noise from audio.
{
"audio_url": "https://example.com/noisy-audio.mp3"
}
deecho_audio
Remove echo from audio.
{
"audio_url": "https://example.com/audio-with-echo.mp3"
}
dereverb_audio
Remove reverb from audio.
{
"audio_url": "https://example.com/audio-with-reverb.mp3"
}
Audio Manipulation Tools
convert_audio_format
Convert audio to different formats.
{
"audio_url": "https://example.com/audio.wav",
"output_format": "mp3" // mp3, wav, flac, ogg, m4a
}
cut_audio
Trim audio to specific time range.
{
"audio_url": "https://example.com/audio.mp3",
"start_time": 10, // seconds
"end_time": 60 // seconds
}
change_audio_speed
Change playback speed.
{
"audio_url": "https://example.com/audio.mp3",
"speed_factor": 1.5 // 1.5x speed
}
master_audio
Apply professional audio mastering.
{
"audio_url": "https://example.com/unmastered.mp3"
}
remix_audio
Create a remix of audio.
{
"audio_url": "https://example.com/song.mp3",
"remix_style": "House" // optional
}
extend_audio
Extend audio using AI continuation.
{
"audio_url": "https://example.com/song.mp3",
"extension_duration": 30 // seconds, optional
}
inpaint_audio
Fill gaps or corrupted sections in audio.
{
"audio_url": "https://example.com/audio-with-gap.mp3",
"start_time": 10, // gap start in seconds
"end_time": 15 // gap end in seconds
}
sing_over_instrumental
Add AI vocals to an instrumental track.
{
"instrumental_url": "https://example.com/instrumental.mp3",
"lyrics": "Verse 1: ...",
"voice_id": "voice-uuid"
}
Analysis Tools
transcribe_audio
Transcribe speech to text.
{
"audio_url": "https://example.com/speech.mp3",
"language": "en" // optional, e.g., en, es, fr
}
extract_key_bpm
Extract musical key and BPM.
{
"audio_url": "https://example.com/song.mp3"
}
audio_to_midi
Convert audio to MIDI format.
{
"audio_url": "https://example.com/melody.mp3"
}
Workflow Example
Most audio processing operations are asynchronous. Here's a typical workflow:
-
Start a conversion (e.g.,
generate_music)- Returns:
task_idandconversion_id
- Returns:
-
Check status using
get_conversion_by_id- Pass the
task_idorconversion_id - Status values:
PENDING,PROCESSING,COMPLETED,FAILED
- Pass the
-
Get results when status is
COMPLETED- The response includes
audio_urlwith the processed audio
- The response includes
Example:
// Step 1: Generate music
{
"tool": "generate_music",
"arguments": {
"prompt": "A relaxing piano melody"
}
}
// Returns: { task_id: "abc-123", conversion_id: "def-456", eta: 120 }
// Step 2: Check status (wait for ETA or use webhook)
{
"tool": "get_conversion_by_id",
"arguments": {
"conversionType": "MUSIC_AI",
"task_id": "abc-123"
}
}
// Returns: { status: "COMPLETED", audio_url: "https://..." }
Webhook Support
Most conversion tools support webhooks for async notifications. Set the webhook_url parameter to receive a callback when processing completes:
{
"prompt": "Epic orchestral music",
"webhook_url": "https://your-server.com/musicgpt-webhook"
}
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 correct - Check 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 files - Default is 60 seconds, increase if needed
Tool not found
- Ensure the server is running
- Rebuild the project:
npm run build - Check your MCP client configuration
Development
Build the server:
npm run build
Development mode (watch for changes):
npm run dev
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:
Links
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。