io.github.chrischall/musicbrainz-mcp

السجل الرسمي البحث والويب

MusicBrainz MCP — search/browse music metadata, cover art, and submit tags/ratings/collections

ماذا يمكنك أن تفعل مع io.github.chrischall/musicbrainz-mcp؟

  • Register an application at musicbrainz.org/account/applications (redirect URI urn:ietf:wg:oauth:2.0:oob).
  • Complete the OAuth flow with the tag, rating, and collection scopes to obtain a refresh token.
  • Provide these via your MCP host's env (or a local .env):

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package musicbrainz-mcp
Claude Code
claude mcp add musicbrainz-mcp -e 'MUSICBRAINZ_USER_AGENT=<MUSICBRAINZ_USER_AGENT>' -e 'MUSICBRAINZ_OAUTH_CLIENT_ID=<your musicbrainz_oauth_client_id>' -e 'MUSICBRAINZ_OAUTH_CLIENT_SECRET=<your musicbrainz_oauth_client_secret>' -e 'MUSICBRAINZ_OAUTH_REFRESH_TOKEN=<your musicbrainz_oauth_refresh_token>' -- npx -y musicbrainz-mcp@1.2.7
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "musicbrainz-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "musicbrainz-mcp@1.2.7"
            ],
            "env": {
                "MUSICBRAINZ_USER_AGENT": "<MUSICBRAINZ_USER_AGENT>",
                "MUSICBRAINZ_OAUTH_CLIENT_ID": "<your musicbrainz_oauth_client_id>",
                "MUSICBRAINZ_OAUTH_CLIENT_SECRET": "<your musicbrainz_oauth_client_secret>",
                "MUSICBRAINZ_OAUTH_REFRESH_TOKEN": "<your musicbrainz_oauth_refresh_token>"
            }
        }
    }
}

متغيرات البيئة

  • MUSICBRAINZ_USER_AGENT Optional override for the User-Agent sent to MusicBrainz.
  • MUSICBRAINZ_OAUTH_CLIENT_ID سري OAuth client ID (write tools only). Register at musicbrainz.org/account/applications.
  • MUSICBRAINZ_OAUTH_CLIENT_SECRET سري OAuth client secret (write tools only).
  • MUSICBRAINZ_OAUTH_REFRESH_TOKEN سري OAuth refresh token with tag/rating/collection scopes (enables the write tools).

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. musicbrainz-mcp
  2. Tools
  3. Install
  4. Enabling the write tools (optional)
  5. Confirmations
  6. Development
  7. License

musicbrainz-mcp

An MCP server for MusicBrainz, the open music encyclopedia. It gives Claude live access to MusicBrainz metadata — artists, releases, recordings, labels, works, and more — plus Cover Art Archive images, and (optionally) lets you submit your own tags, ratings, and collection edits.

Developed and maintained by AI (Claude Code). Use at your own discretion.

Tools

Read (no credentials required):

ToolWhat it does
musicbrainz_searchSearch any entity type with a Lucene query; returns ranked matches + MBIDs
musicbrainz_lookupLook up an entity by MBID, with inc subqueries for linked data
musicbrainz_browseList all entities linked to another (e.g. every release by an artist)
musicbrainz_cover_artCover Art Archive image URLs for a release / release-group
musicbrainz_resolveTurn a pasted musicbrainz.org URL into its entity
musicbrainz_healthcheckVerify connectivity and whether OAuth writes are configured

Write (OAuth, confirmed before sending):

ToolWhat it does
musicbrainz_submit_tagsApply user tags to an entity on your account
musicbrainz_submit_ratingSet your 0–100 rating for an entity
musicbrainz_modify_collectionAdd/remove entities in one of your collections

Each write asks you to confirm before it makes any network call — see Confirmations.

Every read above takes a view, except musicbrainz_cover_art. It defaults to compact, which strips image and avatar URLs — a subtractive rule, so it cannot drop a field nobody knew was there; view: "full" returns MusicBrainz's payload untouched. musicbrainz_cover_art takes none on purpose: the image URLs are its answer, and stripping them would not shrink the response, it would empty it.

Install

This is a Node MCP server (stdio). Point your MCP host at it:

{
  "mcpServers": {
    "musicbrainz": {
      "command": "npx",
      "args": ["-y", "musicbrainz-mcp"]
    }
  }
}

Reads work immediately. MusicBrainz asks clients to make at most one request per second — the server throttles itself to stay within that limit, so large browses are paced automatically.

Enabling the write tools (optional)

  1. Register an application at musicbrainz.org/account/applications (redirect URI urn:ietf:wg:oauth:2.0:oob).
  2. Complete the OAuth flow with the tag, rating, and collection scopes to obtain a refresh token.
  3. Provide these via your MCP host's env (or a local .env):
MUSICBRAINZ_OAUTH_CLIENT_ID=...
MUSICBRAINZ_OAUTH_CLIENT_SECRET=...
MUSICBRAINZ_OAUTH_REFRESH_TOKEN=...

Confirmations

Every write asks you first. A client that can show a confirmation prompt (Claude Code) shows one, with the entity, tags / rating / collection change. A client that cannot (claude.ai, Claude Desktop) gets a two-step flow instead: the first call sends nothing and returns a confirmation-required preview — the exact XML for tags and ratings, the method and path for collections — plus a confirmToken; only a repeat of the same call with that token submits. A token acts once, and changing any argument between the two calls invalidates it.

variabledefault
MCP_CONFIRM_MODEask-userWhat a write does on a client that cannot show a confirmation prompt (claude.ai, Claude Desktop). ask-user: two steps — the first call does nothing and returns a preview plus a token, and the model must get your approval in chat before calling again with it. auto: the same two steps, but the model may use the token after reviewing the preview itself. refuse: writes are refused on such clients. A client that can show prompts (Claude Code) always gets the real prompt, unless MCP_CONFIRM_ELICITATION=off. An unrecognised value is treated as refuse.
MCP_CONFIRM_ELICITATIONonoff never shows a confirmation prompt, so every client gets the MCP_CONFIRM_MODE behaviour. Set it for a client that says it can show prompts but never does (the write hangs — opencode 2.0.x). Any other value is treated as on, with a warning on stderr.
MCP_CONFIRM_TTL_SECONDS600How long a token stays valid.
MCP_CONFIRM_SECRETrandom per processSigning key; set it only if tokens must survive a server restart.

Development

npm install
npm run build
npm test

See CLAUDE.md for architecture and docs/MUSICBRAINZ-API.md for the pinned API shapes.

License

MIT. Data from MusicBrainz, licensed under CC0 / CC BY-NC-SA.

الأسئلة الشائعة

ما هو io.github.chrischall/musicbrainz-mcp؟

MusicBrainz MCP — search/browse music metadata, cover art, and submit tags/ratings/collections

كيف أثبّت io.github.chrischall/musicbrainz-mcp؟

يعمل على جهازك. في Claude Code: claude mcp add musicbrainz-mcp -e 'MUSICBRAINZ_USER_AGENT=<MUSICBRAINZ_USER_AGENT>' -e 'MUSICBRAINZ_OAUTH_CLIENT_ID=<your musicbrainz_oauth_client_id>' -e 'MUSICBRAINZ_OAUTH_CLIENT_SECRET=<your musicbrainz_oauth_client_secret>' -e 'MUSICBRAINZ_OAUTH_REFRESH_TOKEN=<your musicbrainz_oauth_refresh_token>' -- npx -y musicbrainz-mcp@1.2.7. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.chrischall/musicbrainz-mcp إلى مفتاح API؟

نعم. يتطلب MUSICBRAINZ_OAUTH_CLIENT_ID, MUSICBRAINZ_OAUTH_CLIENT_SECRET, MUSICBRAINZ_OAUTH_REFRESH_TOKEN، وتضبطها في إعداداته.

هل io.github.chrischall/musicbrainz-mcp مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون io.github.chrischall/musicbrainz-mcp؟

ينشره chrischall. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.