Skip to main content
Tutorial

MusicBrainz and Discogs API From Your Own Machine

Look up artists, releases and labels in MusicBrainz and Discogs from an agent. Both run on your machine under their own terms, at 0 credits.

fastcrw
By RecepNovember 18, 20267 min read

By the fastCRW team · Catalogue figures checked 2026-11-05 against GET /v1/data · Verify independently before relying on any figure.

MusicBrainz and Discogs are both in the Pergamon catalogue, but they do not run on fastCRW's servers. They run inside the local crw-mcp on your own machine, under each source's own terms. The call goes from your machine to the source, the data never passes through fastCRW, and the call costs 0 credits. This guide shows how to set that up for an agent and where the limits are.

Why these two run on your machine

A client-run source is one the catalogue cannot run for you on its own servers. The source's terms decide who may call it and from where, so the call happens on the machine that runs your agent. The catalogue row tells you which sources work this way. Look for execution: client in the find output.

The terms differ by source. The MusicBrainz API page says: "Non-commercial use of this web service is free." The Discogs row says: "Prohibited commercial uses include, but are not limited to: Selling or giving to any third party Our API, the Content, or access to Our API or the Content." Read both before you build anything you plan to sell. This guide does not change either source's terms.

Install the local MCP

Install the local server once on the machine where your agent runs. It supports Claude Code, Cursor, Codex, Windsurf, Gemini CLI and OpenCode:

npx -y crw-mcp install --api-key <your fastCRW API key>

The hosted endpoint at https://fastcrw.com/mcp cannot run client sources. If you call a client source through it, you get this error, which is the expected answer and not a bug:

{"success": false, "error": "[client_execution_required] This source runs inside the local crw MCP (Claude Code, Cursor, Codex, Windsurf, Gemini CLI, OpenCode): npx -y crw-mcp install --api-key <your fastCRW API key>. It is not available in this client.", "errorCode": "client_execution_required"}

The same error comes back over REST as an HTTP 409, so a script can detect it and tell the user to install the local server.

Artist lookup with MusicBrainz

Your agent calls the local server with the crw_get_data tool. The arguments name the provider, the capability and the options. For the artist capability, the option is the MusicBrainz id (mbid):

{"name": "crw_get_data", "arguments": {"provider": "musicbrainz", "capability": "artist", "options": {"mbid": "b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d"}}}

On 2026-11-05, through local crw-mcp 0.41.0, this call returned The Beatles (type Group, country GB). The result had the keys capability, creditsUsed, data, provenance and provider, with creditsUsed at 0 and this provenance block:

"provenance": {
  "attributionText": "Source: MusicBrainz",
  "licenceUrl": "https://musicbrainz.org/doc/MusicBrainz_API",
  "retrievedAt": "2026-11-05T10:32:48.000Z",
  "source": "MusicBrainz",
  "upstreamUrl": "https://musicbrainz.org/ws/2/artist/b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d?fmt=json"
}

The artist capability also takes an optional inc option, which asks MusicBrainz for linked data. The allowed values are in the MusicBrainz API documentation. To find an mbid from a name, the search capability takes a query, and releases-by-artist lists releases for an artist id. Read their options in the find output.

MusicBrainz limits each source IP to "(on average) 1 request per second". Above that, "all your requests will be declined (http 503)", according to its rate limiting page. The local client runs one call at a time per source, and it retries once when the source asks it to wait 10 seconds or less.

The same lookup from Python

If your agent is a script rather than an MCP client, the Python SDK does the same job. For a client source, the SDK starts the local server on the same machine and runs the call there, so you do not run crw-mcp by hand. It needs crw-mcp on your PATH (npm i -g crw-mcp), and it does not work where the local server is disabled.

# pip install crw
from crw import CrwClient

client = CrwClient()  # reads CRW_API_KEY
artist = client.get_data("musicbrainz", "artist", {"mbid": "b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d"})
print(artist["provenance"]["attributionText"], artist["creditsUsed"])

The SDK returns the same camelCase keys as the MCP tool, so creditsUsed is 0 for a client source and the provenance block carries the source's licence and attribution.

Discogs search needs your own token

Discogs needs a personal token. The local server stores it for you. Check the status first:

npx -y crw-mcp connectors list

The Discogs row shows required, missing until you set the key. Set it with:

npx -y crw-mcp connectors set-key discogs

The key is saved to your local config file (~/.config/crw/config.toml) with mode 0600 and is never passed as an argument. Once the key is set, your agent can run the search capability with the q option:

{"name": "crw_get_data", "arguments": {"provider": "discogs", "capability": "search", "options": {"q": "your search terms"}}}

Discogs has its own rules on use. Read the Discogs developer documentation at discogs.com/developers before you rely on it in a product.

Open Library, Wikimedia Commons and the Wayback Machine

Three more sources run locally: Open Library, Wikimedia Commons and the Wayback Machine. They use the same install and the same 0 credit rule. Find their capabilities and options with:

curl "https://api.fastcrw.com/v1/data/find?provider=openlibrary&limit=10" \
  -H "Authorization: Bearer $CRW_API_KEY"

Swap openlibrary for wikimedia or waybackmachine to see the others. The Wayback Machine row grants its data "for scholarship and research purposes only", so do not treat it as general reuse rights. The Open Library row says its APIs "are not intended to serve as a data backend for third-party services". The Open Library API docs are at openlibrary.org/developers/api.

What the local client reports back

After each local call, the client sends fastCRW one usage count with your fastCRW API key. The count holds the provider, the capability, the outcome and the time the call took. It never holds the URL, your options, your source key or the data. This is not anonymous, because the count is tied to your API key. You can turn it off in the client settings. See the MCP clients documentation for how.

When a local call does not answer

  • client_execution_required from the hosted endpoint. The call went to the hosted MCP. Point your client at the local server instead, which you install with the command above.
  • Discogs shows required, missing. Run connectors set-key discogs, then check connectors list again.
  • HTTP 503 from MusicBrainz. Your loop is above the rate limit. The local client retries once for short waits, but a sustained burst still gets declined. Slow the loop to about one call per second per source.
  • No answer at all. Check that your machine can reach the source directly, since the call leaves from your network and not from fastCRW's servers.

Honest limits

  • These sources run only where the local server runs. The hosted endpoint cannot call them, and an agent on a machine without the local server gets client_execution_required.
  • Your machine must reach the source directly. A blocked network or a firewall means the call fails on your side.
  • MusicBrainz's API page says non-commercial use is free. Check that page before a commercial build.
  • Discogs needs your own token and has its own list of prohibited commercial uses.
  • The Wayback Machine row limits use to scholarship and research.
  • This is not legal advice. Read each source's terms yourself.

Sources

Related: MusicBrainz on Pergamon · Discogs on Pergamon · Open Library on Pergamon · Wayback Machine on Pergamon · Can you use public API data commercially? · MCP server for public data · What is local-first web scraping

FAQ

Frequently asked questions

Can I use MusicBrainz in a commercial product?
The MusicBrainz API page says: "Non-commercial use of this web service is free." Read that page and its terms before a commercial build. fastCRW does not change the source's terms.
Why does the hosted MCP endpoint fail for MusicBrainz?
The hosted endpoint at fastcrw.com/mcp cannot run client sources, so it returns client_execution_required. Install the local server with npx -y crw-mcp install on the machine that runs your agent.
Does a local call cost credits?
No. A client source call costs 0 credits, and the data does not pass through fastCRW. The client does send one usage count tied to your API key, and you can turn that off in the client settings.

Get Started

Try fastCRW free

Run a live request in the playground — no signup required. Or grab a free API key with 500 credits, earn up to 500 more, no credit card.

Continue exploring

More tutorial posts

View category archive