Skip to main content
Glama

Library(曲目库)

Platform support: macOS — supported (developed & verified on this machine) · Windows — unverified (paths are cross-platform in the codebase, but no real-machine testing yet).

本地 SQLite 曲目库:文件不动只引索。第 9 个 ShadowRoom 插件。

中文说明 · License: AGPL-3.0-only

工具(MCP,共 13 个)

工具

输入

说明

scan_folder

path, recursive?

指纹增量入库/更新(指纹 = size + mtime + 首尾 64KB SHA-256)

list_tracks

query?, bpm_min/max?, camelot?, tags?, limit?, offset?

多条件检索

track_detail

id

全字段(标签/BPM/调性/能量/64 桶峰值/crate)

analyze_missing

limit?

缺 BPM/调性的交给本机 analysis 插件(detect_tempo/detect_key)补全

crate_create

name

创建 crate(同名校验,幂等)

crate_list

—

crate 列表(含每个 crate 的曲数)

crate_add

crate_id, track_ids[]

按加入顺序追加;重复跳过

stats

—

总数 / 缺失分析数 / crate 数 / 库大小

import_history

source?: rekordbox|serato|auto

只读导入 Rekordbox/Serato 的歌单与播放历史 → sets/history

import_rekordbox_xml

path

只读解析 Rekordbox Export Collection in xml(6.3.0+ 明文)→ sets

learn_preferences

—

从 set 学偏好(ΔBPM / Camelot 走法 / 能量步进 / set 形状)

preference_summary

—

中文一句话汇报偏好(无足够历史时回冷启动默认)

forget_preferences

forget_history?

一键清空偏好(可选连 sets/history 一起清)

Related MCP server: spotify-dj

表结构

  • tracks(id, path UNIQUE, title, artist, album, year, genre, duration_ms, sample_rate, bit_depth, bpm, key, camelot, energy, peaks_json, has_stems, fingerprint, added_at, analyzed_at)

  • crates(id, name UNIQUE, created_at)、crate_tracks(crate_id, track_id, position)

库文件:~/Documents/ShadowRoom/_library/library.db(SHADOW_LIBRARY_DB 可覆盖)。

只读承诺(重要)

  • 不写用户的 Rekordbox / Serato 原库。import_history 只读打开 Rekordbox master.db(路径 由用户指定);新版 master.db 是 SQLCipher 加密的,会立刻报错让用户知道;import_rekordbox_xml 只解析用户导出的明文 XML。Serato 那边只读 _Serato_/subcrates/ 下的二进制 crate 文件, 不写任何东西到 Serato 自己的 database V2。

  • 不挪动用户的音频文件。scan_folder 只读取文件元数据 + 首尾 64KB 算指纹;path UNIQUE 是 引用,文件该在哪还在哪。要搬家 / 删除曲目走文件管理器,不走本插件。

  • 库文件 = 新建一份,与 DJ 软件原库隔离。库文件在 ~/Documents/ShadowRoom/_library/library.db, 坏了 / 想重置直接删掉它;用户的 Rekordbox/Serato 不受影响。

  • 历史与偏好可一键清空:forget_preferences(forget_history=true) 把 sets/history 也清掉, 回到冷启动默认。

设计取舍

见 docs/internals.md:指纹为什么取首尾 64KB、为什么扫描不解析 ID3、 camelot 换算表、missing 文件为什么不删行。

许可证

AGPL-3.0-only。

Available Tools

13 tools
analyze_missingA

Fill in missing BPM/key by running the local analysis plugin (detect_tempo/detect_key) over the files that lack them.

Inputs: limit.

crate_addA

Append tracks to a crate (keeps insertion order; duplicates are skipped).

Inputs: crate_id (required), track_ids (required).

crate_createA

Create a named crate (idempotent: same name returns the existing id).

Inputs: name (required).

crate_listA

List crates with their track counts.

Inputs: no named parameters.

forget_preferencesB

Wipe the learned model (optionally also sets/history); summary returns to the cold-start default.

Inputs: forget_history.

import_historyA

READ-ONLY import of Rekordbox (master.db opened read-only) / Serato crates into sets/history tables. Never writes your DJ libraries.

Inputs: source, serato_dirs, rekordbox_db.

import_rekordbox_xmlA

Import a Rekordbox 'Export Collection in xml' file (6.3.0+, plaintext): tracks with BPM/key/genre, cues, playlists → sets. Read-only on the XML.

Inputs: path (required).

learn_preferencesA

Learn a preference model from imported sets: genre weights, ΔBPM, Camelot moves, energy steps, set shape. Explainable, one-click forgettable.

Inputs: no named parameters.

list_tracksA

Search the library: query (title/artist/album), bpm range, camelot code, genre tags, limit/offset.

Inputs: tags, limit, query, offset, +3 more.

preference_summaryB

One human-readable Chinese sentence about what you favour and how you transition (falls back to defaults when there is not enough history).

Inputs: no named parameters.

scan_folderB

Index/refresh a folder of audio files into the library (fingerprint = size + mtime + head/tail 64KB hash; only changed files are re-read).

Inputs: path (required), recursive.

statsB

How many tracks, how many still missing BPM/key, crates, db size.

Inputs: no named parameters.

track_detailC

Full row for one track (tags, BPM/key/camelot, energy, 64-bucket peaks, crates).

Inputs: id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 13 tools

    Disambiguation4/5

    Most tools are clearly distinct, but the two import tools (import_history and import_rekordbox_xml) could be confused despite different input formats. Preference and crate tools are well-separated.

    Naming Consistency4/5

    Most tools follow verb_noun pattern (e.g., scan_folder, list_tracks), but 'stats' and 'preference_summary' deviate, breaking the consistency slightly.

    Tool Count5/5

    13 tools is within the well-scoped range for a library management server, covering imports, preferences, crates, analysis, and stats without excess.

    Completeness4/5

    Core workflows are covered (import, scan, search, detail, analysis, crate management, preferences), but there are no update/delete tools for tracks or crates, leaving minor gaps.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A comprehensive MCP server for rekordbox database management with real-time database access, enabling track search, playlist operations, library analytics, and DJ history retrieval.
      31
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables DJs to retrieve BPM, key/Camelot, energy, and other track metadata with provider provenance, score transitions, plan setlists, and control Spotify playlists and playback with staged, revalidated writes for safety.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Connects AI assistants to a local music library for full-text search and filtering of tracks, albums, artists, genres, composers, and lyrics, plus listening analytics and metadata hygiene audits. Also lets users generate and populate playlists and control playback (play, pause, seek, volume) in a running player instance.
      MIT
    • A
      license
      A
      quality
      A
      maintenance
      Enables AI assistants to query and manage a local Engine DJ library on macOS, including searching tracks by BPM, key, genre, or comments, auditing duplicates and missing files, reading cues and beatgrids, and building playlists or fixing tags when write access is enabled.
      9
      96 npm
      1
      MIT