# MusicBrainz Alternative MCP

> MusicBrainz Alternative connects your AI agent directly to a structured music encyclopedia database. You can look up recordings using ISRC, find works by ISWC, or search artists across millions of records using Lucene query syntax. It also lets you manage personal collections—adding tags, ratings, and items.

## Overview
- **Category:** databases
- **Price:** Free
- **Tags:** music-metadata, discography, artist-info, encyclopedia, music-api

## Description

This server connects your AI agent right into a massive, structured music encyclopedia database. You don't just query it; you use it like a deep-dive research tool for anything related to recorded sound or musical works.

When you're trying to find something specific, you’ve got three main ways to kick off the search. First, you can run complex queries across the entire catalog using `search_entities`. This lets your agent combine keywords and fields—you can filter records down to a precise combination of terms, making sure you hit exactly what you're looking for.

If you know the unique identifier, things get faster. Use `lookup_entity` with a MusicBrainz Identifier (MBID) to pull every single detail about any entity—whether it’s an artist, album, or label. For records connected by industry standards, you got specific tools too. You can run `lookup_isrc` using an International Standard Recording Code (ISRC) to get all the metadata for a recording. If you're tracking down the original composition, use `lookup_iswc` with an International Standard Musical Work Code (ISWC). For physical media checks, `lookup_discid` finds the full details on a CD using its specific DiscID number.

Once you find one entity—say, a primary artist or a release—you don't stop there. You can use `browse_entities` to list every single associated record or release linked back to that main entry. This builds out a whole relationship map for your agent. 

If the data is good, you need to manage it in your own workspace. The server gives you tools to handle personal collections. If you're authenticated, your agent can use `add_collection_items` to drop an item into your list. You can also mark items with descriptive tags using `submit_tags`, or grade them by running `submit_ratings`. When the item is wrong or outdated, you can clean things up with `remove_collection_item`.

When your agent performs these actions—retrieving data via unique IDs, executing complex Lucene searches, fetching metadata through ISRC/ISWC codes, listing related releases, or managing your personal collection records—it’s giving you structured data. It's not just a list of facts; it's actionable intelligence about the music world.

## Tools

### add_collection_items
Adds a music item to your personal collection (requires authentication).

### browse_entities
Lists all related entities (like releases) connected to one primary entity.

### lookup_discid
Finds metadata for a CD using its specific DiscID number.

### lookup_isrc
Looks up a recording's metadata using its International Standard Recording Code (ISRC).

### lookup_iswc
Retrieves details about a musical work using its International Standard Musical Work Code (ISWC).

### lookup_entity
Retrieves all details for any MusicBrainz entity given its unique MBID.

### remove_collection_item
Deletes an item from your personal collection (requires authentication).

### search_entities
Searches for any entity using advanced Lucene query syntax, allowing complex filtering.

### submit_ratings
Submits a rating for an item in your collection (requires authentication).

### submit_tags
Adds descriptive tags to an item in your collection (requires authentication).

## Prompt Examples

**Prompt:** 
```
Search for the artist 'Daft Punk' and give me their MBID.
```

**Response:** 
```
I found Daft Punk. Their MusicBrainz Identifier (MBID) is `65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab`. They are an electronic music duo from Paris, France.
```

**Prompt:** 
```
List all releases for the artist with MBID 0383dadf-2a4e-4d10-a46a-e9e041da8eb3.
```

**Response:** 
```
Browsing releases for Queen (MBID: 0383dadf-2a4e-4d10-a46a-e9e041da8eb3)... I've found several releases including 'A Night at the Opera', 'News of the World', and 'The Game'. Would you like details on a specific one?
```

**Prompt:** 
```
Lookup the recording details for ISRC USRC10301589.
```

**Response:** 
```
The ISRC USRC10301589 corresponds to the recording 'Seven Nation Army' by The White Stripes. It appears on the album 'Elephant' and has a duration of approximately 3:51.
```

## Capabilities

### Search by Unique ID
Finds a specific entity (artist or release) using its unique MusicBrainz Identifier (MBID).

### Lookup via Industry Standards
Retrieves full metadata for recordings using an ISRC code, or finds works using an ISWC code.

### Advanced Entity Search
Runs complex searches across the entire database using Lucene query syntax (e.g., combining keywords and fields).

### Browse Linked Records
Lists all associated releases or recordings linked to a primary entity, like an artist.

### Manage Collections
Adds items, submits tags, or updates ratings for a user's personal music collection (requires authentication).

## Use Cases

### Verifying Artist Credits for a Historical Article
A journalist needs to confirm the exact release date and primary label for an obscure 1980s recording. They use `lookup_isrc` with the known ISRC code, which immediately returns the album details, confirming the date without needing to guess which database is right.

### Building a Catalog of Related Works
A developer needs to build an application that lists all recordings tied to one specific record label. They use `browse_entities` on the label's MBID, automatically generating a list of every associated artist and album for their database.

### Cleaning Up Personal Music Libraries
A collector wants to tag hundreds of records with genre notes. They run an agent that iterates through items and uses `submit_tags` and `submit_ratings`, making the whole process automated instead of tedious manual entry.

### Finding a Record When Only the CD ID is Known
You only have a physical CD with a DiscID. Instead of searching by name, you run `lookup_discid`. The tool pulls up all the necessary metadata—artist, title, and release year—in one clean action.

## Benefits

- Precision lookups are instant. Instead of relying on vague web searches, you use `lookup_isrc` or `lookup_iswc` to pull hard data based on industry-standard codes.
- You can map relationships easily. Use `browse_entities` to list every known release associated with a specific artist's MBID—no manual browsing required.
- Complex searching is simple. The `search_entities` tool lets you combine multiple criteria (like 'Daft Punk' AND 'French') using Lucene syntax, getting highly filtered results right away.
- Manage your data workflow end-to-end. Beyond just reading, authenticated tools like `submit_tags` and `submit_ratings` let your agent manage a personal library.
- Cross-reference records easily. If you have an album's DiscID but need the artist's full profile, use `lookup_discid` to get the necessary link data.

## How It Works

The bottom line is: it turns complex database queries into simple function calls for your AI client.

1. First, subscribe to the server and provide your required User Agent string. You might also need an Access Token if you plan on modifying data.
2. Next, direct your AI client to use a specific tool—for example, running `lookup_isrc` with a code or using `search_entities` with Lucene syntax.
3. The server returns clean, structured JSON metadata that your agent can read and act on. You're done.

## Frequently Asked Questions

**How do I find an artist's MBID using MusicBrainz Alternative?**
You can use `search_entities` and specify the artist name along with a search filter for 'artist'. The tool will return the unique MBID if it exists in the database.

**Can I add tags to my collection using MusicBrainz Alternative?**
Yes, you can use `submit_tags`. Just remember this requires authentication and you'll need to pass the specific item ID along with your tags via XML POST.

**What is the difference between lookup_entity and browse_entities?**
`lookup_entity` gives you one big data dump on a single entity using its MBID. `browse_entities`, however, lists all *related* entities—like showing every release attached to that main artist.

**Is ISRC the same as ISWC in MusicBrainz Alternative?**
No, they track different things. ISRC is for a specific recording (the master file). ISWC tracks the underlying musical work itself—like the sheet music or composition.

**What do I need to use write tools like `submit_tags` or `add_collection_items`?**
You must authenticate with a valid MusicBrainz Access Token. Write operations require this token for validation. Without it, the agent cannot modify your personal data.

**How does the `search_entities` tool handle complex queries using Lucene syntax?**
The `search_entities` tool processes queries by combining specific fields and terms with boolean operators (AND/OR). You must specify the field prefix, like 'arid:...' for artist identifiers.

**If I know an entity's MBID, how should I use `browse_entities` to find its related releases?**
You pass the known MBID and specify the relationship type you want to explore. This function maps relationships—for example, finding all associated records or labels.

**What happens if I provide an invalid identifier when calling `lookup_isrc`?**
The agent will return a specific error indicating the provided code does not match any record in the database. Always verify your ISRC format before querying.

**How do I search for a specific artist if I don't have their MBID?**
Use the `search_entities` tool. Set the `entity_type` to 'artist' and provide the name in the `query` field. The agent will return a list of matches with their respective MBIDs.

**Can I see all the recordings (songs) on a specific album?**
Yes! Use the `lookup_entity` tool with the release MBID and include 'recordings' in the `inc` parameter. This will fetch the full tracklist and metadata for that release.

**Do I need an account to search the database?**
No. Searching and looking up data only requires a `MUSICBRAINZ_USER_AGENT`. An Access Token is only needed for actions like `submit_tags`, `submit_ratings`, or `add_collection_items`.