4,500+ servers built on MCP Fusion
Vinkius
MusicBrainz logo
Vinkius
Mastra AI logo

How to Use the MusicBrainz MCP in Mastra AI

Build resilient music data pipelines. Automate metadata lookups and enrichment for any artist or track with Mastra AI and MusicBrainz.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

MusicBrainz MCP on Cursor AI Code Editor MCP Client MusicBrainz MCP on Claude Desktop App MCP Integration MusicBrainz MCP on OpenAI Agents SDK MCP Compatible MusicBrainz MCP on Visual Studio Code MCP Extension Client MusicBrainz MCP on GitHub Copilot AI Agent MCP Integration MusicBrainz MCP on Google Gemini AI MCP Integration MusicBrainz MCP on Lovable AI Development MCP Client MusicBrainz MCP on Mistral AI Agents MCP Compatible MusicBrainz MCP on Amazon AWS Bedrock MCP Support
MCP Servers - Free for Subscribers
Mastra AI

Connect MusicBrainz MCP to Mastra AI

Create your Vinkius account to connect MusicBrainz to Mastra AI and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.

GDPR Free for Subscribers

Automate Music Catalog Ingestion

Create a workflow that pulls in new music metadata automatically. Your Mastra AI agent can use a simple input, like a track title, and run it through `search_recordings` to find potential matches. The workflow can then branch based on how many results it gets. If there's a single, high-confidence match, the agent proceeds to call `get_recording` and `get_release` to pull the full dataset. If there are multiple matches, it can flag the item for human review, using Mastra's `requireToolApproval` feature. It's a reliable way to clean up a messy catalog.

Create Failsafe Metadata Workflows

MusicBrainz is community-driven, so data can be inconsistent. A Mastra AI workflow handles this. For example, if a `get_release` call fails to find a barcode, your agent can automatically retry by calling `get_release_group` and then browsing its associated releases. This conditional logic is Mastra's strength. You can build a sequence: try `search_releases` with a UPC, if that fails, try `search_recordings` with an ISRC. The built-in exponential backoff in your MCP connection means your agent won't hammer the API if there's a temporary issue.

Enrich Your Data with this MCP Server

Go beyond basic track and artist names. Set up a Mastra AI agent to enrich your existing database. It can take an artist ID you already have and use `get_artist` with the `inc="aliases"` parameter to find all their alternate names or spellings. You can also identify composers and writers. The workflow can take a recording, find its associated `work` via `get_recording`, and then use `get_work` to retrieve the ISWC and writer credits. This whole process runs as a background job, managed by the Mastra AI engine.

Setup guide

Set up MusicBrainz MCP in Mastra AI

Prerequisites

  • Node.js 18+ and a TypeScript project
  • @mastra/mcp + @mastra/core packages
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install dependencies

    Run npm install @mastra/mcp @mastra/core plus your preferred model provider (e.g. @ai-sdk/openai).

  2. 2

    Configure the MCPClient

    Create an MCPClient with your Vinkius endpoint as a URL object. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com.

  3. 3

    Discover and inject tools

    Call mcpClient.listTools() and spread the result into your agent's tools object. All MusicBrainz tools become native Mastra tools.

  4. 4

    Run with any model

    Swap openai("gpt-4o") for any AI SDK-compatible provider. Call agent.generate() and the agent routes tool calls through MCP automatically.

agent.ts
import { MCPClient } from "@mastra/mcp";
import { Agent } from "@mastra/core/agent";
import { openai } from "@ai-sdk/openai";

const mcpClient = new MCPClient({
  id: "musicbrainz-mcp-client",
  servers: {
    "musicbrainz-mcp": {
      url: new URL(
        "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
      ),
    },
  },
});

const agent = new Agent({
  name: "MusicBrainz Agent",
  model: openai("gpt-4o"),
  instructions: "You have access to MusicBrainz tools.",
  tools: {
    ...(await mcpClient.listTools()),
  },
});

const result = await agent.generate(
  "List recent MusicBrainz transactions"
);
console.log(result.text);

Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by MusicBrainz. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.

Why Choose Vinkius

Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.

Real-time monitoring

Live

visibility into every interaction

Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.

Built-in savings

60%

lower AI costs

Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.

Single dashboard

One

place for every integration

Every tool your AI connects to, managed from a single screen. One account, complete control.

Common questions about MusicBrainz MCP in Mastra AI

Your Mastra AI agent can use a tool like `search_artists` and check the number of results. If it's greater than one, you can program the workflow to use `requireToolApproval` to pause and wait for a human to select the correct artist.
Yes. The agent would first use `search_artists` to get the artist's ID. Then, it would call `browse_releases_by_artist` and filter the results where the release status is 'official', ignoring bootlegs and promotional material.
First, find the album using `search_releases`. Then, use the resulting MBID with the `get_release` tool and include the `inc="isrcs"` parameter. Your Mastra AI agent can then parse this list and store it.
You'd start with the `search_areas` tool to get the unique ID for that country. Then, you can use that area ID as a filter parameter in a Lucene query within the `search_releases` tool to narrow down the results.
The server processes only the public music metadata you request, like album titles, artist IDs, and ISWCs. It's an ephemeral, zero-trust environment. Your requests are authenticated via your Vinkius token, and the server itself stores no logs of your queries.

Start using the MusicBrainz MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 15 tools

We've already built the connector for MusicBrainz. Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 15 tools are live and waiting. You're up and running in seconds.

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.