Search MusicBrainz artists, releases, works, labels; resolve ISRC/ISWC/barcode; fetch cover art.
Search artists, releases, recordings, works, and labels; traverse relationships; resolve ISRC/ISWC/barcode; fetch cover art via MCP. STDIO or Streamable HTTP.
Public Hosted Server: https://musicbrainz.caseyjhand.com/mcp
Open music metadata over the live MusicBrainz Web Service v2 and the Cover Art Archive. Search by name, look up entities by MBID or a standard identifier (ISRC/ISWC/barcode), browse the complete linked set beyond what the lookup tools embed, and fetch cover art from any MCP client. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
| Tool | Description |
|---|---|
musicbrainz_search_entities | Full-text Lucene search across a MusicBrainz entity type. Returns ranked matches with MBID and a relevance score. |
musicbrainz_get_artist | Artist profile by MBID — type, life span, discography, relationships, external links. |
musicbrainz_get_release_group | Release-group ("the album" above specific pressings) by MBID — type, first-release date, editions, cover-art availability. |
musicbrainz_get_release | One edition's full detail by MBID — tracklist, label, catalog number, barcode, packaging. |
musicbrainz_get_recording | Recording (a specific performance) by MBID — length, ISRCs, releases it appears on, performance relationships. |
musicbrainz_get_work | Work (a composition) by MBID — type, ISWCs, writer relationships, performing recordings. |
musicbrainz_get_label | Label by MBID — type, life span, label code, external links. |
musicbrainz_lookup_identifier | Resolve an ISRC, ISWC, or barcode directly to recordings, works, or releases. |
musicbrainz_browse_entities | Paginate the complete set of entities linked to a parent MBID — the only complete-enumeration path. |
musicbrainz_get_cover_art | Cover Art Archive images for a release or release-group MBID. |
| Resource | Description |
|---|---|
musicbrainz://{entity_type}/{mbid} | A single MusicBrainz entity by type and MBID, with default linked sub-resources folded in. |
All entity data is also reachable via the get_* tools, so tool-only clients lose nothing. There is no resource list() — the corpus is millions of entities; discovery is via musicbrainz_search_entities.
musicbrainz_search_entities toolartist:radiohead AND country:GB)score per hit (100 = exact); results stay in MusicBrainz score-descending order, not re-rankedlimit (1–100, default 25) and offset; echoes the effective query and the true upstream totalblank_query with a recovery hint; everything else goes upstream exactly as sent, incidental whitespace includedmusicbrainz_get_artist toolincurl-rels — chainable to wikidata-mcp-server and friends; this server does not chase them itselfinc_release_groups and inc_relationships (both default true) toggle the expensive sub-resourcesmusicbrainz_browse_entities (target_type=release-group, artist link)musicbrainz_get_release_group toolmusicbrainz_browse_entities (target_type=release, link.release-group) gives the complete setmusicbrainz_get_cover_art returns for the same MBID — looked up alongside the MusicBrainz record; when that lookup fails the field is omitted with a notice rather than reported as "no art"musicbrainz_get_release for its tracklistmusicbrainz_get_release toolm:ss, stored as milliseconds upstream)musicbrainz_get_cover_art with the release MBID for the actual image URLsmusicbrainz_get_recording toolm:ss), ISRCs, artist credits, and the releases it appears oninc_relationships (default true) toggles performance/production relationships (performer, producer, engineer — each with role and credited-artist MBID) and work-rels linking to the underlying compositionmusicbrainz_get_work toolinc_relationships (default true) toggles writer/composer/lyricist relationships, recording-rels (the recordings that perform it), and external linksget_* tool with no per-page capmusicbrainz_get_label toolmusicbrainz_browse_entities (target_type=release, link.label)musicbrainz_lookup_identifier toolid_type=isrc → recordings (a recording-level code, often shared by several recordings)id_type=iswc → works (a composition-level code)id_type=barcode → releases (UPC/EAN digits; spaces and hyphens are ignored, anything else is rejected as invalid_identifier)kind field discriminates which entity type came back (recordings | works | releases)musicbrainz_browse_entities toollimit (1–100, default 25); pages arbitrarily deep via offset, and totalCount is the true upstream totalget_* tools embed at most one page (25), and a partial list read as complete is a silent correctness gaplink MBID matching a valid parent→child relationship for the target_typemusicbrainz_get_cover_art toolinvalid_mbid, one matching no release/release-group as entity_not_found, and an unreachable check returns the empty set with its existence flagged unconfirmedentity_type defaults to release, and a release-group MBID resolves to a representative release's art automaticallymusicbrainz://{entity_type}/{mbid} resourcemusicbrainz_get_* tool with the same default inc sets, returned as the raw MusicBrainz JSON recordentity_type ∈ artist, release-group, release, recording, work, labelmusicbrainz_browse_entities for the complete setBuilt on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
MusicBrainz-specific:
musicbrainz.org/ws/2, JSON) plus the Cover Art Archiveinc set) — MBIDs are stable and entity data changes slowly, keeping most repeat lookups off the wireinc-driven lookups fold discography, relationships, tracklists, and external IDs into a single call rather than serial requestsAgent-friendly output:
get_* tools disclose when an embedded linked list is capped at one page and name musicbrainz_browse_entities as the complete-enumeration pathmusicbrainz_lookup_identifier returns a kind-tagged union (recordings | works | releases) so callers branch on data, not string parsingscore surfaced as-is (not a fabricated confidence metric), and missing upstream fields are preserved as absent rather than inventedmusicbrainz-mcp-server is keyless — no API key or account. MusicBrainz does require a descriptive User-Agent with a contact and rate-limits to ~1 request/second per IP; the server ships a default contact so it works out of the box, but operators running a shared or hosted instance should set MUSICBRAINZ_CONTACT to their own email or URL.
A public instance is available at https://musicbrainz.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP, with this client config:
{
"mcpServers": {
"musicbrainz-mcp-server": {
"type": "streamable-http",
"url": "https://musicbrainz.caseyjhand.com/mcp"
}
}
}
Add the following to your MCP client configuration file.
{
"mcpServers": {
"musicbrainz-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/musicbrainz-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"MUSICBRAINZ_CONTACT": "you@example.com"
}
}
}
}
Or with npx (no Bun required):
{
"mcpServers": {
"musicbrainz-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/musicbrainz-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"MUSICBRAINZ_CONTACT": "you@example.com"
}
}
}
}
Or with Docker:
{
"mcpServers": {
"musicbrainz-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"-e", "MUSICBRAINZ_CONTACT=you@example.com",
"ghcr.io/cyanheads/musicbrainz-mcp-server:latest"
]
}
}
}
For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 MUSICBRAINZ_CONTACT=you@example.com bun run start:http
# Server listens at http://localhost:3010/mcp
MUSICBRAINZ_CONTACT to your email or URL — recommended for any shared or hosted deployment.git clone https://github.com/cyanheads/musicbrainz-mcp-server.git
cd musicbrainz-mcp-server
bun install
cp .env.example .env
# edit .env and set MUSICBRAINZ_CONTACT (optional but recommended)
Configuration is validated at startup via Zod schemas in src/config/server-config.ts.
| Variable | Description | Default |
|---|---|---|
MUSICBRAINZ_CONTACT | Contact (email or URL) embedded in the mandatory descriptive User-Agent. Not start-blocking — a default is provided — but operators of a shared/hosted instance should set their own so MusicBrainz can reach them about traffic. | repo URL |
MUSICBRAINZ_BASE_URL | MusicBrainz Web Service v2 base URL. Override for a private mirror or beta.musicbrainz.org. | https://musicbrainz.org/ws/2 |
MUSICBRAINZ_RATE_LIMIT_RPS | Client-side request-per-second ceiling. ~1 is the documented limit; lower it for shared-hosting headroom. | 1 |
MUSICBRAINZ_CACHE_TTL | Response cache TTL in seconds. MBIDs are stable, so data changes slowly. 0 disables caching. | 86400 |
MUSICBRAINZ_TIMEOUT_MS | Per-request HTTP timeout in milliseconds. | 30000 |
MUSICBRAINZ_MAX_RETRIES | Retry attempts for transient upstream failures (503 / 5xx / HTML error page). | 3 |
COVER_ART_BASE_URL | Cover Art Archive base URL. | https://coverartarchive.org |
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | Port for the HTTP server. | 3010 |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (RFC 5424). | info |
OTEL_ENABLED | Enable OpenTelemetry instrumentation. | false |
See .env.example for the full list of optional overrides.
MusicBrainz blocks requests without a descriptive User-Agent identifying the application and a contact. This server sends musicbrainz-mcp-server/<version> (<contact>), where <contact> is MUSICBRAINZ_CONTACT — set it to your own email or URL when you deploy. Upstream calls serialize through one process-wide limiter, so on a shared or hosted instance every client draws on the same ~1 req/sec budget and bulk enumeration via musicbrainz_browse_entities paces accordingly.
Build and run:
# One-time build
bun run rebuild
# Run the built server
bun run start:stdio
# or
bun run start:http
Run checks and tests:
bun run devcheck # Lint, format, typecheck, security, packaging
bun run test # Vitest test suite
bun run lint:mcp # Validate MCP definitions against the linter rules
docker build -t musicbrainz-mcp-server .
docker run --rm -e MUSICBRAINZ_CONTACT=you@example.com -p 3010:3010 musicbrainz-mcp-server
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/musicbrainz-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point — registers tools and the resource, inits both services. |
src/config | Server-specific environment variable parsing and validation with Zod. |
src/services/musicbrainz | MusicBrainz WS/2 client — User-Agent, rate limiter, response cache, retry, and domain types. |
src/services/cover-art | Cover Art Archive client — maps 404 to an empty image set flagged as not found, follows the release-group redirect. |
src/mcp-server/tools | Tool definitions (*.tool.ts). Ten read-only tools across search, lookup, browse, and cover art. |
src/mcp-server/resources | Resource definitions. The musicbrainz://{entity_type}/{mbid} entity mirror. |
tests/ | Unit and integration tests mirroring src/. |
See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for request-scoped logging, ctx.state for tenant-scoped storagesrc/mcp-server/*/definitions/index.tsfetch() MusicBrainz directly, or you bypass the User-Agent, rate limiter, and cacheMusicBrainz core entity data is released under CC0 (public-domain dedication) — see the MusicBrainz license. This server stays on that core metadata and does not fetch annotation text (which carries a different, non-CC0 license). Cover art is served by the Cover Art Archive, a joint project of MusicBrainz and the Internet Archive; image URLs are linked, never rehosted, and each image's copyright stays with its rights holders. Cite MusicBrainz and the Cover Art Archive in downstream use.
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
Apache-2.0 — see LICENSE for details.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @cyanheads/musicbrainz-mcp-serverMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-cyanheads-musicbrainz-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/musicbrainz-mcp-server"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referenceio.github.cyanheads/musicbrainz-mcp-server works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.