suno_stems_music
Separate any song into individual vocal and instrumental stems for remixing or creating karaoke versions.
Instructions
Separate a song into individual stems (vocals and instruments).
Splits the audio into separate tracks for vocals and instrumentals,
useful for remixing, karaoke, or isolating specific parts.
Use this when:
- You want to separate vocals from instrumentals
- You need individual stem tracks for mixing
- You want to create a karaoke version
Returns:
Task ID and stem separation results with individual track URLs.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audio_id | Yes | ID of the audio to separate into stems. | |
| callback_url | No | Webhook callback URL for asynchronous notifications. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- tools/audio_tools.py:464-493 (handler)The main handler function for the suno_stems_music tool. Decorated with @mcp.tool(), it takes an audio_id (and optional callback_url), calls client.generate_audio with action='stems', and returns the formatted result.
@mcp.tool() async def suno_stems_music( audio_id: Annotated[ str, Field(description="ID of the audio to separate into stems."), ], callback_url: Annotated[ str | None, Field(description="Webhook callback URL for asynchronous notifications."), ] = None, ) -> str: """Separate a song into individual stems (vocals and instruments). Splits the audio into separate tracks for vocals and instrumentals, useful for remixing, karaoke, or isolating specific parts. Use this when: - You want to separate vocals from instrumentals - You need individual stem tracks for mixing - You want to create a karaoke version Returns: Task ID and stem separation results with individual track URLs. """ result = await client.generate_audio( action="stems", audio_id=audio_id, callback_url=callback_url, ) return format_audio_result(result) - main.py:210-213 (registration)Registration of suno_stems_music in the server card tool list (main.py HTTP route), listing the tool with a description for client discovery.
{ "name": "suno_stems_music", "description": "Separate into vocal and instrument stems", }, - tools/audio_tools.py:464-493 (registration)The @mcp.tool() decorator registers suno_stems_music as an MCP tool with the FastMCP server instance.
@mcp.tool() async def suno_stems_music( audio_id: Annotated[ str, Field(description="ID of the audio to separate into stems."), ], callback_url: Annotated[ str | None, Field(description="Webhook callback URL for asynchronous notifications."), ] = None, ) -> str: """Separate a song into individual stems (vocals and instruments). Splits the audio into separate tracks for vocals and instrumentals, useful for remixing, karaoke, or isolating specific parts. Use this when: - You want to separate vocals from instrumentals - You need individual stem tracks for mixing - You want to create a karaoke version Returns: Task ID and stem separation results with individual track URLs. """ result = await client.generate_audio( action="stems", audio_id=audio_id, callback_url=callback_url, ) return format_audio_result(result) - core/client.py:172-176 (helper)The generate_audio method on SunoClient that suno_stems_music calls internally. It sends a POST request to /suno/audios with the provided params (including action='stems').
# Convenience methods for specific endpoints async def generate_audio(self, **kwargs: Any) -> dict[str, Any]: """Generate audio using the audios endpoint.""" logger.info(f"🎵 Generating audio with action: {kwargs.get('action', 'generate')}") return await self.request("/suno/audios", self._with_async_callback(kwargs)) - core/utils.py:77-90 (helper)The format_audio_result utility used by suno_stems_music to format the API response as JSON with async submission guidance.
def format_audio_result(data: dict[str, Any]) -> str: """Format audio generation result as JSON. Args: data: API response dictionary Returns: JSON string representation of the result """ return json.dumps( _with_submission_guidance(data, "suno_get_task", "suno_get_tasks_batch"), ensure_ascii=False, indent=2, )