Musicbrainz Mcp

io.github.chrischall由 GitHub 账号 chrischall 发布v1.3.0更新于 Nov 7, 2026

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

已验证STDIO仅桌面知识与记忆媒体与设计

概览

AI 生成的概览

面向 MusicBrainz 的本地 MCP 服务器,让助手搜索和浏览音乐元数据、获取封面图,并可选地提交标签、评分和收藏集修改。

可以做什么
  • 用 Lucene 查询检索各类 MusicBrainz 实体,返回带 MBID 的排序结果
  • 按 MBID 查询实体并附带关联子实体,浏览与某实体关联的所有条目,解析粘贴的 musicbrainz.org 链接
  • 获取发行版与发行组在 Cover Art Archive 的图片链接和缩略图
  • 检查 API 是否可达,以及 OAuth 写入是否已配置
  • 提交你的标签、设置你的评分、在收藏集中增删实体(需 OAuth,发送前先确认)
适用场景
适合让助手回答关于艺人、发行版、录音、厂牌和作品的问题,获取封面图链接,或在对话中维护你自己在 MusicBrainz 上的标签、评分和收藏集。
运行要求
以 Node.js stdio 服务器在本地运行,通常通过 npx 启动,需要 Node.js 和访问 MusicBrainz 的网络。读取类工具无需凭据。写入类工具需要注册 OAuth 应用,并设置环境变量 MUSICBRAINZ_OAUTH_CLIENT_ID、MUSICBRAINZ_OAUTH_CLIENT_SECRET 和 MUSICBRAINZ_OAUTH_REFRESH_TOKEN,且具备 tag、rating、collection 权限范围。MUSICBRAINZ_USER_AGENT 为可选的覆盖项。
安装前请注意
写入类工具会改动你 MusicBrainz 账户上的数据:标签、评分和收藏集成员。它们需要 OAuth 客户端凭据和刷新令牌,属于应避免放入共享配置的机密。确认行为取决于客户端以及 MCP_CONFIRM_MODE、MCP_CONFIRM_ELICITATION、MCP_CONFIRM_SECRET 的设置;auto 模式允许模型自行查看预览后继续提交。README 说明该项目由 AI 开发和维护,使用需自行判断。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Musicbrainz Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

musicbrainz-mcp

[CI] [npm] [license]

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:

json
{  "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

bash
npm installnpm run buildnpm 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.

来源:README.md,提交 e44157f

工具

9

musicbrainz_lookup

Look up a MusicBrainz entity by MBID

Fetch a single MusicBrainz entity (artist, release, recording, release-group, label, work, area, place, event, instrument, series, genre, url) by its MBID. Use `inc` to pull linked sub-entities and relationships, e.g. inc: ["releases","release-groups"] on an artist, or ["recordings","labels"] on a release, or ["artist-credits","url-rels"] on most entities. Your own tags/ratings (inc: ["user-tags"], ["user-ratings"], …) need OAuth (MUSICBRAINZ_OAUTH_*). Read-only. Data from MusicBrainz (https://musicbrainz.org), the open music encyclopedia.

输入参数incmbid必填viewentity必填

musicbrainz_browse

Browse MusicBrainz entities linked to another

List all entities of one type directly linked to a given entity — e.g. every release by an artist (entity: "release", linkedBy: "artist", mbid: <artist>), recordings on a release, releases in a collection (a private collection needs OAuth: MUSICBRAINZ_OAUTH_*), or events at a place. This is the complete, paged set for a relationship (unlike search, which ranks fuzzy matches). Use `inc` for extra detail and limit/offset to page (max 100/page). Read-only. Data from MusicBrainz (https://musicbrainz.org), the open music encyclopedia.

输入参数incmbid必填viewlimitentity必填offsetlinkedBy必填

musicbrainz_cover_art

Get Cover Art Archive images for a release

Fetch Cover Art Archive image metadata for a release or release-group MBID — front/back cover URLs, thumbnails, and image types. Returns the image URLs (you can open or download them); it does not embed the bytes. Errors clearly when no art exists for the MBID. Read-only. Data from MusicBrainz (https://musicbrainz.org), the open music encyclopedia.

输入参数mbid必填entity必填

musicbrainz_resolve

Resolve a MusicBrainz URL to its entity

Turn a musicbrainz.org URL (e.g. https://musicbrainz.org/artist/<mbid> or /release-group/<mbid>) into the underlying entity by extracting its type + MBID and looking it up. Handy when a user pastes a MusicBrainz link. Pass `inc` to include linked sub-entities. Read-only. Data from MusicBrainz (https://musicbrainz.org), the open music encyclopedia.

输入参数incurl必填view

musicbrainz_healthcheck

Verify MusicBrainz connectivity

Confirm the MusicBrainz API is reachable (and our User-Agent accepted) by looking up a stable entity, and report whether the OAuth write path is configured. Reports {ok, reachable, oauth_configured} with a plain-English hint. Read-only.

无需输入参数。

musicbrainz_submit_tags

Submit user tags to MusicBrainz

Apply user tags to a MusicBrainz entity on YOUR account (needs OAuth: MUSICBRAINZ_OAUTH_* with the `tag` scope). Default `vote: upvote` adds the tags; `downvote` opposes them; `withdraw` removes your vote. Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call returns a preview and a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE). The preview shows the exact XML; nothing is sent before confirmation. Data from MusicBrainz (https://musicbrainz.org), the open music encyclopedia.

输入参数mbid必填tags必填voteentity必填confirmToken

musicbrainz_submit_rating

Submit a user rating to MusicBrainz

Set YOUR rating for a MusicBrainz entity (needs OAuth: MUSICBRAINZ_OAUTH_* with the `rating` scope). Rating is 0–100 (MusicBrainz shows it as 1–5 stars in steps of 20; 0 removes your rating). Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call returns a preview and a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE). Nothing is sent before confirmation. Data from MusicBrainz (https://musicbrainz.org), the open music encyclopedia.

输入参数mbid必填entity必填rating必填confirmToken

musicbrainz_modify_collection

Add or remove entities in a MusicBrainz collection

Add or remove entities (releases, artists, recordings, release-groups, works, labels, places, areas, events) in one of YOUR MusicBrainz collections (needs OAuth: MUSICBRAINZ_OAUTH_* with the `collection` scope). Get the collection MBID from its URL (musicbrainz.org/collection/<mbid>). Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call returns a preview and a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE). Nothing is changed before confirmation. Data from MusicBrainz (https://musicbrainz.org), the open music encyclopedia.

输入参数mbids必填action必填collection必填entityType必填confirmToken

版本历史

13
  1. v1.3.0最新Nov 4, 2026
  2. v1.2.7Oct 16, 2026
  3. v1.2.6Oct 10, 2026
  4. v1.2.5Oct 7, 2026
  5. v1.2.4Oct 5, 2026
  6. v1.2.3Oct 3, 2026
  7. v1.2.1Sep 25, 2026
  8. v1.2.0Sep 24, 2026
  9. v1.1.2Sep 23, 2026
  10. v1.1.1Sep 21, 2026
  11. v1.1.0Sep 20, 2026
  12. v1.0.0Sep 18, 2026
  13. v0.3.2Sep 16, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分