Music Collection MCP Server

Music Collection MCP Server

Provides intelligent access to local music collections through advanced metadata management, album classification across 8 types, collection analytics, and smart search capabilities for AI-powered music library organization.

Category
访问服务器

README

Music Collection MCP Server

A powerful Model Context Protocol (MCP) server that provides intelligent access to your local music collection through advanced metadata management, album type classification, and comprehensive analytics.

✨ Key Features

  • 🎵 Smart Music Discovery: Intelligent scanning with 8-type album classification (Album, EP, Live, Demo, Compilation, Single, Instrumental, Split)
  • 📊 Advanced Analytics: Collection maturity assessment, health scoring, and personalized recommendations
  • 🏗️ Flexible Organization: Support for multiple folder structures with automated migration and compliance scoring
  • ⚡ High Performance: Optimized scanning (20-30% faster), batch operations, and intelligent caching
  • 🤖 AI Integration: Works seamlessly with Claude Desktop and other MCP clients
  • 🔄 Automated Setup: One-command installation with configuration generation

🚀 Quick Start

Option 1: Automated Setup (Recommended)

python scripts/setup.py

This guided setup will:

  • Check system requirements
  • Install dependencies
  • Configure your music collection path
  • Generate Claude Desktop configuration
  • Validate your setup

Option 2: Manual Installation

Using Python

# Install dependencies
pip install -r requirements.txt

# Set your music path
export MUSIC_ROOT_PATH="/path/to/your/music"

# Run the server
python main.py

Using Docker

# Build and run
docker build -t music-mcp .
docker run -v "/path/to/your/music:/music" -e MUSIC_ROOT_PATH=/music music-mcp

🤖 MCP Client Setup

Configuration File Locations for Claude desktop

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Python Installation

{
  "mcpServers": {
    "music-collection": {
      "command": "python",
      "args": ["/path/to/music-mcp-server/main.py"],
      "env": {
        "MUSIC_ROOT_PATH": "/path/to/your/music",
        "CACHE_DURATION_DAYS": "30",
        "LOG_LEVEL": "INFO"
      }
    }
  }
}

Docker Installation

{
  "mcpServers": {
    "music-collection": {
      "command": "docker",
      "args": [
        "run", "--rm", "--interactive",
        "-v", "/path/to/your/music:/music",
        "-e", "MUSIC_ROOT_PATH=/music",
        "-e", "CACHE_DURATION_DAYS=30",
        "music-mcp"
      ]
    }
  }
}

📁 Music Organization

The server supports multiple organization patterns:

Enhanced Structure (Recommended)

Band Name/
├── Album/
│   ├── 1973 - Dark Side of the Moon/
│   └── 1979 - The Wall (Deluxe)/
├── Live/
│   └── 1988 - Delicate Sound of Thunder/
├── Compilation/
│   └── 2001 - Echoes - Best Of/
└── .band_metadata.json (auto-generated)

Simple Structure (Also Supported)

Band Name/
├── 1973 - Dark Side of the Moon/
├── 1988 - Delicate Sound of Thunder (Live)/
└── 2001 - Echoes - Best Of (Compilation)/

🛠️ MCP Capabilities

Tools (10 total)

  • Music Discovery: scan_music_folders - Smart scanning with type detection
  • Collection Management: get_band_list - Advanced filtering and search
  • Metadata Storage: save_band_metadata, save_band_analyze, save_collection_insight
  • Validation: validate_band_metadata - Dry-run validation
  • Advanced Search: advanced_search_albums - 13-parameter filtering system
  • Analytics: analyze_collection_insights - Comprehensive collection analysis
  • Structure Migration: migrate_band_structure - Safe folder organization migration

Resources (3 total)

  • Band Info: band://info/{band_name} - Detailed band information
  • Collection Summary: collection://summary - Overview and statistics
  • Advanced Analytics: collection://analytics - Deep collection analysis

Prompts (4 total)

  • Information Gathering: fetch_band_info, analyze_band
  • Analysis: compare_bands, collection_insights

⚙️ Configuration

Configure via environment variables or the automated setup:

MUSIC_ROOT_PATH="/path/to/your/music"     # Required: Your music directory
CACHE_DURATION_DAYS=30                    # Optional: Cache expiration (default: 30)
LOG_LEVEL=INFO                           # Optional: Logging level (default: INFO)

📚 Documentation

Get Started Quickly

Learn More

Get Help

🔧 Maintenance & Scripts

The scripts/ directory provides powerful maintenance tools:

  • Setup: setup.py - Automated installation and configuration
  • Docker: start-docker.sh - Container management with options
  • Validation: validate-music-structure.py - Collection health checking
  • Backup: backup-recovery.py - Complete backup and recovery system
  • Monitoring: health-check.py - Comprehensive health monitoring

🧪 Testing

# Using Docker (recommended)
docker build -f Dockerfile.test -t music-mcp-tests .
docker run --rm music-mcp-tests python -m pytest . -v

# Using Python
python -m pytest tests/ -v

📊 What's New

Recent Improvements

  • Migration Tools: Safe folder structure migration with backup and rollback
  • Advanced Analytics: Collection maturity assessment and health scoring
  • Performance: 20-30% faster scanning with optimized file operations
  • Separated Schema: Local vs missing albums for better management
  • Automated Setup: One-command installation and configuration
  • Album Types: Intelligent 8-type classification system
  • Flexible Structure: Support for multiple organization patterns

🆘 Need Help?

  1. Check the FAQ for common questions
  2. Run health check: python scripts/health-check.py /path/to/music
  3. Validate structure: python scripts/validate-music-structure.py /path/to/music
  4. Review Troubleshooting guide

🔗 Links

  • Setup Scripts: Complete automation in scripts/ directory
  • Claude Desktop Configs: Ready-to-use examples in scripts/claude-desktop-configs/
  • Developer Docs: Architecture and API reference in docs/developer/

Transform your music collection into an intelligent, searchable library with AI-powered insights! 🎶

Requirements

  • Python 3.8+
  • Docker (for containerized deployment)

License

MIT License

Copyright (c) 2025 Music Collection MCP Server

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选