music-digger-mcp
Allows controlling Apple Music playback (play stations, albums, control playback), retrieving current track, and marking tracks with reactions like love, like, meh, or skip.
Enables storing music diary entries and album cards in an Obsidian vault based on reactions to tracks.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@music-digger-mcp Play a station based on The Beatles"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
music-digger-mcp
YouTube + Safari + Apple Music で音楽を掘るための MCP サーバー。Claude Code から自然言語で操作し、聴いて反応した曲だけを Obsidian Vault に蓄積する。
v0.2.0 で再生エンジンを YouTube に切り替えました。 旧 Apple Music + AppleScript ベースの理由は
docs/superpowers/specs/2026-06-13-youtube-pivot.mdを参照。
ワークフロー
play_station("Roy Ayers")→ YouTube 検索 → Safari で再生(autoplay 無し、MCP が制御)気に入ったら
mark_current("love")→ Obsidian 日記に追記 + iTunes Search API で楽曲を照合 → Music.app で同じ楽曲ページを開く(あとはユーザーが「+」でライブラリ追加・再生)love 1 回 or like 2 回でアルバムカードに自動昇格
Apple Music カタログの「特定の曲」を AppleScript から再生する公式 API は無く、URL を
openしても navigate するだけで自動再生しない。digger としての再生は YouTube + Safari に統一し、Apple Music は「気に入った曲をあとで聴くための着地点」として使い分ける。
Related MCP server: mcp-apple-music
Tools
play_station(seed?)— YouTube 検索で seed の station を Safari で起動。seed 省略時はmusic/stations.mdからランダムplay_album(artist, album)—<artist> <album> full albumで YouTube 検索 → Safaricurrent_track()— MCP が「最後に再生指示した曲」の情報を返す(ブラウザに問い合わせない)mark_current(reaction, note?, artist?, album?, track?)— 現在曲を love / like / meh / skip でマーク。日記追記 + 昇格判定。love / like の時は iTunes Search API で Apple Music カタログを引いて、Music.app に楽曲ページを開く
動作環境
macOS(Safari、Music.app、
openコマンド)Node.js 18+ (built-in fetch)
YouTube アカウント(Safari でログイン推奨。Premium ならバックグラウンド再生・広告無し)
Apple Music サブスクリプション(love した曲を Music.app で続けるなら)
Obsidian Vault
セットアップ
npm install
npm run buildSafari で YouTube にログインしておく(Premium 推奨)。youtube.com の autoplay は OFF にしておくと state ずれが起きない。
Claude Code への接続
examples/mcp.json を参考に、Claude Code の .mcp.json に music-digger エントリを追加して再起動する。
開発
npm run dev # tsx watch でホットリロード
npm test # vitest
npm run test:watch # vitest watch環境変数
変数 | デフォルト | 用途 |
| 必須 | Obsidian Vault のルート |
|
| 反応日記の保存先 |
|
| アルバムカードの保存先 |
|
| station の seed リスト |
stations.md の書き方
## ソウル / ファンク
- Aaron Frazer # Introducing... が今のお気に入り (Bad News)
- Curtis Harding # ◎ The Power
- Roy Ayers # ◎ Everybody Loves The Sunshine
## スキップ中
# - Lofi # 今の気分じゃない行頭
-で 1 行 1 seed行頭が
#の行はコメント / 無効化末尾の
# ...は seed の覚え書き(パーサーが無視する)
仕様書 / 実装計画
docs/superpowers/specs/2026-06-12-music-digger-mcp-design.md— 初版(Apple Music ベース、現在は参考資料)docs/superpowers/specs/2026-06-13-youtube-pivot.md— YouTube 移行設計メモdocs/superpowers/plans/2026-06-12-music-digger-mcp.md— 旧実装計画
注意
YouTube の HTML スクレイピングを使用しているため、YouTube 側のレイアウト変更で壊れる可能性があります(個人用前提)
current_trackは MCP がこのセッションで再生指示した曲のみを反映します。ブラウザ上で手動で次の曲に進めた場合は state がずれます(その間mark_currentを呼ばなければ実害なし)mark_currentの love / like で Music.app の楽曲ページが開きますが、ライブラリへの追加は手動で「+」を押してください
Available Tools
4 toolscurrent_trackA
Return the currently playing track info, based on what this MCP last started. Reflects MCP-driven playback only; manual browser interaction is not tracked.
Inputs: no named parameters.
mark_currentA
Stamp the currently playing track with a reaction (love/like/meh/skip). Appends to the day diary and promotes to an album card on love>=1 or like>=2. YouTube title parsing can be overridden with explicit artist / album / track.
Inputs: reaction (required), note, album, track, +1 more.
play_albumA
Play an album by artist + album name. Searches YouTube for <artist> <album> full album and opens the top result in Safari.
Inputs: album (required), artist (required).
play_stationA
Start a YouTube station from an artist or genre seed. Opens the top result in Safari. When seed is omitted, picks one at random from the Obsidian stations note (MUSIC_STATIONS_PATH).
Inputs: seed.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool serves a distinct purpose: displaying current track, reacting, playing album, and playing station. No overlap in functionality.
All names use snake_case and follow a verb_noun pattern except 'current_track' (adjective_noun). Consistency is high with only a minor deviation.
Four tools is well-scoped for a music discovery server. Each tool contributes a necessary function without redundancy.
Core actions (display, react, play album/station) are covered. Missing features like search or basic playback controls (skip, pause) but acceptable for focused scope.
Maintenance
Related MCP Connectors
Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.
Notes and actions in one app. Let Claude or ChatGPT read and update them.
Claude and ChatGPT, connected to your iCloud Calendar, Mail, Contacts and Reminders.
Run Apple Search Ads from Claude: performance, recommendations, keywords, budgets, launches.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables Claude Desktop and GitHub Copilot to interact with native macOS applications including Spotify, Apple Music, Notes, Calendar, FaceTime, and Contacts through natural language commands. Provides comprehensive control over music playback, note management, calendar events, video calls, and contact operations using AppleScript integration.8MIT
- AlicenseAqualityBmaintenanceFull Apple Music integration for Claude: search the catalog, browse your personal library, manage playlists, and get personalised recommendations.1547MIT
- AlicenseNot gradedqualityDmaintenanceConnects Claude Code to Apple Music using only your Apple ID, without needing a developer account. Enables access to recently played, playlists, search, recommendations, and playlist creation.MIT
- FlicenseNot gradedqualityBmaintenanceGive Claude access to your music library. MixCraft is a hosted MCP server that connects Claude to Apple Music, letting Claude search your library, build playlists, and learn your taste over time.2-