dj-music-metadata-mcp
MCP server for DJs to scan music folders, validate and suggest metadata via MusicBrainz/iTunes/Spotify, and batch write metadata to audio files with confidence scoring.
README
DJ Music Metadata MCP (Python)
MCP server for DJs to organize metadata with API-based validation and batch writing.
What this server does
- Scans a music folder and finds missing fields.
- Queries external APIs (MusicBrainz and iTunes) to suggest metadata with evidence.
- Computes a confidence score per track and blocks low-confidence writes in strict mode.
- Supports multiple genres per track.
- Writes metadata to MP3, FLAC, and M4A/MP4.
Exposed MCP tools
- scan_tracks
- suggest_verified_metadata
- apply_verified_metadata
- organize_metadata
- organize_directory_by_genre
Notes about metadata correction
suggest_verified_metadataagora aceitafixExistingMetadata(defaulttrue) para sugerir correcoes mesmo quando os campos ja estao preenchidos.- Isso ajuda a corrigir genero preenchido incorretamente e limpar
title/artistquando vierem misturados.
Requirements
- Python 3.10+
Optional API credentials
- Spotify (recommended):
- SPOTIFY_CLIENT_ID
- SPOTIFY_CLIENT_SECRET
- SoundCloud (optional):
- SOUNDCLOUD_CLIENT_ID
If these variables are not configured, the server still works with MusicBrainz and iTunes.
Install
pip install -r requirements.txt
Run
python server.py
Launcher desktop (React + Tailwind + Python)
O projeto agora inclui um launcher desktop para:
- Iniciar/parar o servidor MCP
- Selecionar modo
streamable-httpoustdio - Configurar conexao automatica para VS Code, Cursor e Claude Code
Stack da interface:
- Shell desktop:
pywebview(Python) - Frontend:
React+Tailwind CSS(Vite)
Rodar launcher em desenvolvimento:
cd ui
npm install
npm run build
cd ..
python launcher.py
Observacao:
- Se o launcher for executavel (
.exe), ele tambem funciona como processo do servidor via--server.
Gerar executavel (Windows)
Use o script (compila frontend e empacota exe):
build_exe.bat
Resultado esperado:
dist/DJMetadataLauncher.exe
Example (Windows PowerShell):
$env:SPOTIFY_CLIENT_ID="your_client_id"
$env:SPOTIFY_CLIENT_SECRET="your_client_secret"
$env:SOUNDCLOUD_CLIENT_ID="your_client_id"
python server.py
MCP setup (VS Code)
Example file: mcp.server.json
Opcao recomendada: use o launcher e clique em Conectar automaticamente com Agente = VS Code.
Connect (local and remote)
1. Local (recommended for personal use)
Run:
python server.py
Then configure your MCP client with stdio command.
2. Remote/public (HTTP + API key)
Create an .env file from .env.example and set MCP_API_KEY.
Run:
MCP_TRANSPORT=streamable-http MCP_HOST=0.0.0.0 MCP_PORT=8000 python server.py
Your endpoint will be:
https://your-domain.com/mcp
Cursor (remote)
mcp.json:
{
"mcpServers": {
"dj-metadata": {
"url": "https://your-domain.com/mcp",
"headers": {
"Authorization": "Bearer <your-api-key>"
}
}
}
}
Opcao recomendada: use o launcher e clique em Conectar automaticamente com Agente = Cursor.
Claude Code (remote)
claude mcp add --transport http dj-metadata https://your-domain.com/mcp --header "Authorization: Bearer <your-api-key>"
Opcao recomendada: use o launcher e clique em Conectar automaticamente com Agente = Claude Code.
Notes
- This server modifies local files; if you host it remotely, ensure each user is isolated to their own folder.
- Keep
dryRun=trueas the default workflow before writing metadata.
Recommended workflow
- Run scan_tracks to map missing fields.
- Run suggest_verified_metadata with minConfidence between 0.78 and 0.90.
- Review per-track evidence.
- Run apply_verified_metadata with dryRun true.
- If results look correct, run again with dryRun false.
Example 1: scan
Tool: scan_tracks
{
"folderPath": "D:/DJ/Setlist",
"recursive": true
}
Example 2: API-based verified suggestion
Tool: suggest_verified_metadata
{
"folderPath": "D:/DJ/Setlist",
"recursive": true,
"minConfidence": 0.82,
"onlyMissing": true
}
Example 3: apply in strict mode
Tool: apply_verified_metadata
{
"dryRun": true,
"strict": true,
"minConfidence": 0.82,
"updates": [
{
"filePath": "D:/DJ/Setlist/Artist - Track.mp3",
"confidence": 0.91,
"evidence": [
{ "source": "musicbrainz", "recordingId": "..." }
],
"metadata": {
"title": "Track",
"artist": "Artist",
"genre": ["Tech House", "House"],
"comment": ["Validated by API"]
}
}
]
}
Set dryRun to false to write changes.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。