Skip to main content
Glama
zas

MusicBrainz MCP Server

by zas

search_releases

Find music releases by filtering with artist name, label, barcode, or title to locate specific albums or recordings in the MusicBrainz database.

Instructions

Search for releases with specific filters. Prefer search_entities for simple title searches; use this when filtering by artist, label, or barcode. Args: title: Release title artist: Artist name label: Label name barcode: UPC/EAN barcode limit: Max results (default 5)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNo
artistNo
labelNo
barcodeNo
limitNo

Implementation Reference

  • The search_releases function performs the logic of querying the MusicBrainz API and formatting the release results.
    def search_releases(
        title: str | None = None,
        artist: str | None = None,
        label: str | None = None,
        barcode: str | None = None,
        limit: int = 5,
    ) -> str:
        """
        Search for releases with specific filters.
        Prefer search_entities for simple title searches; use this when filtering
        by artist, label, or barcode.
        Args:
            title: Release title
            artist: Artist name
            label: Label name
            barcode: UPC/EAN barcode
            limit: Max results (default 5)
        """
        kwargs = {"limit": limit}
        if title:
            kwargs["release"] = title
        if artist:
            kwargs["artist"] = artist
        if label:
            kwargs["label"] = label
        if barcode:
            kwargs["barcode"] = barcode
    
        if not any((title, artist, label, barcode)):
            return "Please provide at least one search parameter."
    
        result = musicbrainzngs.search_releases(**kwargs)
        items = result.get("release-list", [])
        lines = [f"Found {len(items)} releases:"]
        for i in items:
            rtitle = i.get("title")
            rartist = i.get("artist-credit-phrase", "Unknown")
            date = i.get("date", "?")
            lines.append(f"- {rtitle} by {rartist} ({date}) | release ID: {i['id']}")
        return "\n".join(lines)
  • The search_releases function is registered as an MCP tool using the @mcp.tool() decorator.
    @mcp.tool()
    @cached_tool()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zas/mcp-musicbrainz'

If you have feedback or need assistance with the MCP directory API, please join our Discord server