Complete guide to integrating and using AI Music MCP
Prefer REST API? View API DocumentationSet up AI Music MCP in minutes
Visit musicmcp.ai and sign up for a free account. You'll receive trial credits to test the service.
Navigate to your dashboard and generate your API key. Keep this key secure - you'll need it for authentication.
Select how you want to use AI Music MCP based on your needs.
Choose the best method for your use case
For individual users and quick prototyping
Install uv package manager: curl -LsSf https://astral.sh/uv/install.sh | sh
Locate your Claude Desktop config file: • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json • Windows: %APPDATA%\Claude\claude_desktop_config.json
Add the MCP server configuration
Restart Claude Desktop
Verify 5 MCP tools are available in Claude
1{2 "mcpServers": {3 "MusicMCP.AI": {4 "command": "uvx",5 "args": ["aimusic-mcp"],6 "env": {7 "MUSICMCP_API_KEY": "<your-api-key>",8 "MUSICMCP_API_URL": "https://www.musicmcp.ai/api",9 "TIME_OUT_SECONDS": "600"10 }11 }12 }13}For developers building AI applications
Install the package: pip install aimusic-mcp
Import and initialize in your code
Call the 5 available MCP tools through the protocol
Handle responses and download URLs
1from musicmcp_ai_mcp import MusicMCPClient23# Initialize client4client = MusicMCPClient(5 api_key="your-api-key",6 api_url="https://www.musicmcp.ai/api"7)89# Generate music10result = await client.generate_prompt_song(11 prompt="peaceful morning song",12 instrumental=False13)Generate music with simple commands
Generate music from simple text descriptions
Examples:
"Generate a peaceful morning song""Create upbeat electronic music for a workout""Make ambient music for meditation"Tip: Describe the mood, scene, or feeling you want. The AI handles title, lyrics, and arrangement.
Full control with your own lyrics and style
Examples:
"Create a song titled 'Summer Dreams' with folk style""Generate pop music with these lyrics: [your lyrics]""Make a rock ballad called 'Memories' with my lyrics"Tip: Provide title, complete lyrics, and style tags for precise control.
Generate music without vocals
Examples:
"Create instrumental jazz for background""Generate cinematic orchestral music""Make lo-fi beats without lyrics"Tip: Perfect for background music, games, and content creation.
4 MCP tools at your disposal
generate_prompt_song5 credits → 2 songsGenerate music from text prompts (Inspiration Mode)
generate_custom_song5 credits → 2 songsGenerate songs with custom lyrics and style
check_credit_balanceFreeCheck your API key and remaining credits
check_api_healthFreeMonitor API service status
Complete song information returned after generation
When music generation completes, you receive rich metadata for each song:
Generated song title (or your custom title)
Unique identifier for the song
Direct MP3 download link (full-length, 4+ minutes)
AI-generated cover art URL
Song length in seconds
Music genre and style labels
Whether the song is instrumental (Yes/No)
Timestamp when the song was generated
Complete song lyrics (for non-instrumental songs)
💡 The MCP server automatically polls the API and returns complete information once generation is finished. You don't need to manually query for status.
Common issues and solutions
✓ Solution: Ensure MUSICMCP_API_KEY is correctly set in your environment variables. Use check_credit_balance to verify.
✓ Solution: You've run out of credits. Check your balance and purchase more credits from the dashboard.
✓ Solution: Increase TIME_OUT_SECONDS in your configuration. Default is 600 (10 minutes).
✓ Solution: Restart your MCP client (Claude Desktop). Verify the configuration file is valid JSON.
✓ Solution: Check API health status. If service is operational, verify your prompt follows guidelines.