Data source: MusicBrainz (open music encyclopedia)
Overview
MusicBrainz wraps MusicBrainz (open music encyclopedia), handling authentication, pagination, and rate limits for you. This tutorial covers all 5 tools with working code examples you can copy and run.
Prerequisites
- Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
- Choose your integration method: MCP protocol or REST API.
Connect via MCP
Add to your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"gnist-musicbrainz": {
"url": "https://context.gnist.ai/mcp/musicbrainz/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Tools (5)
search_artists
Search for music artists by name. Returns artist names, countries, active years, and genre tags. Args: query: Artist name (e.g. "Radiohead", "Miles Davis", "a-ha"). limit: Maximum results (1-25, default 10).
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | |
limit | integer | optional | (default: 10) |
curl -X POST "https://context.gnist.ai/mcp/musicbrainz/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_artists", "arguments": {"query": "renewable energy"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/musicbrainz/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'query': 'renewable energy'},
'name': 'search_artists'}},
)
print(resp.json())
get_artist_info
Get detailed information about an artist by MusicBrainz ID. Returns full artist profile including name, type, country, lifespan, and tags. Args: artist_id: MusicBrainz UUID (e.g. "a74b1b7f-71a5-4011-9441-d0b5e4122711" for Radiohead).
| Parameter | Type | Required | Description |
|---|---|---|---|
artist_id | string | required |
curl -X POST "https://context.gnist.ai/mcp/musicbrainz/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_artist_info", "arguments": {"artist_id": "12345"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/musicbrainz/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'artist_id': '12345'}, 'name': 'get_artist_info'}},
)
print(resp.json())
get_artist_releases
Get albums and releases for an artist. Returns release titles, dates, countries, and track counts. Args: artist_id: MusicBrainz artist UUID. limit: Maximum results (1-100, default 25).
| Parameter | Type | Required | Description |
|---|---|---|---|
artist_id | string | required | |
limit | integer | optional | (default: 25) |
curl -X POST "https://context.gnist.ai/mcp/musicbrainz/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_artist_releases", "arguments": {"artist_id": "12345"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/musicbrainz/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'artist_id': '12345'}, 'name': 'get_artist_releases'}},
)
print(resp.json())
search_recordings
Search for songs/recordings by title. Returns recording titles, artists, duration, and first release dates. Args: query: Song or track title (e.g. "Bohemian Rhapsody", "Take On Me"). limit: Maximum results (1-25, default 10).
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | |
limit | integer | optional | (default: 10) |
curl -X POST "https://context.gnist.ai/mcp/musicbrainz/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_recordings", "arguments": {"query": "renewable energy"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/musicbrainz/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'query': 'renewable energy'},
'name': 'search_recordings'}},
)
print(resp.json())
report_feedback
Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: general) |
curl -X POST "https://context.gnist.ai/mcp/musicbrainz/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/musicbrainz/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())
Common Patterns
Use
search_artists to find items, then get_artist_info to get full details. This two-step pattern is common for exploring data before drilling down.Several tools support
limit, offset, or page parameters. Start with small limits during development, then increase for production queries.FAQ
What data does MusicBrainz provide?
Music metadata — artist profiles, album discographies, song/recording search. It exposes 5 tools: search_artists, get_artist_info, get_artist_releases, search_recordings, report_feedback.
What do I need to get started?
A Gnist API key (free tier: 100 calls/day). Sign up at https://context.gnist.ai/signup.
What format does the MusicBrainz API return?
JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.