itunes.vim
This is MCP server for playing from Apple Music Library
Install / Use
claude mcp add chew-z -- npx -y github:chew-z/itunes.vimIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
OtherSupported Platforms
Our assessment of itunes.vim
itunes.vim scores 72/100 on our quality scale, 278th of 301 Other skills we index.
Its MCP Server is 9.8 KB long, well organised into 31 sections with 11 code examples: a thorough specification that gives an agent plenty to work with.
It has 10 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-10-21 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 78/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
itunes.vim compared with similar skills
All 4 of these similar skills score higher than itunes.vim; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| itunes.vim (this skill)by chew-z | 72 | 10 | 4mo ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 109.2k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 78.9k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.8k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 97.9k | today | MCP Server |
Frequently asked questions
- How do I install itunes.vim?
- Run
claude mcp add chew-z -- npx -y github:chew-z/itunes.vim. The install tabs above show the steps for each supported agent. - Which AI agents does itunes.vim work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is itunes.vim safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 78/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is itunes.vim still maintained?
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubiTunes/Apple Music CLI & MCP Server
High-performance command-line tool and MCP server for iTunes/Apple Music integration on macOS
Overview
A Go-based tool that bridges command-line interfaces and AI applications with your Apple Music library. Features ultra-fast search (<7ms via SQLite FTS5), smart playback control, and integration with Large Language Models through the Model Context Protocol (MCP).
Key Features
- Ultra-Fast Search: SQLite FTS5 database with <7ms query performance
- Smart Playback: ID-based track lookup with playlist context support
- Audio Control: EQ presets and output device management (local/AirPlay)
- MCP Integration: 14 specialized tools for AI/LLM applications
- Database-First: Normalized SQLite schema keyed by persistent Apple Music IDs
- Context-Aware:
context.Contextflows from MCP requests down to SQLite queries and JXA processes, so cancellation propagates end to end - Radio Stations: Apple Music stations with database-backed CRUD and search
- Vim Plugin: fzf-powered library search and playback from inside Vim/Neovim (
vim-plugin/)
Project History
This project evolved from a legacy VIM plugin for iTunes integration. The original plugin remains untouched in the master branch as a reference. The current implementation is a complete rewrite focused on modern Apple Music integration, database performance, and AI/LLM compatibility through the MCP protocol — and includes a rewritten Vim plugin (vim-plugin/) that fronts the Go CLI instead of JXA scripts.
Architecture
+-------------------+ +--------------------+ +-------------------+
| CLI Tool | | MCP Server | | Apple Music |
| (itunes) | | (mcp-itunes) | | Desktop App |
+---------+---------+ +---------+----------+ +---------+---------+
| | |
+----------+-------------+ |
| |
+----------v------------+ +----------v--------+
| itunes.Client | | JXA Scripts |
| (core library) |<-------------+ (via osascript |
+----------+------------+ | stdin) |
| +-------------------+
+----------v------------+
| SQLite Database |
| FTS5 Search |
+-----------------------+
- Search path: queries hit the local SQLite database directly — the Apple Music app is not involved.
- Playback path: Go pipes embedded JXA scripts to
osascriptvia stdin (no temp files) to drive the Apple Music app. - Library refresh: Apple Music → JXA bulk property fetch → SQLite (~15–30 seconds even for 10k+ track libraries).
Installation
Prerequisites
- macOS (required for Apple Music integration)
- Go 1.25+
- Apple Music app (installed and configured)
- Terminal access with Automation permissions for AppleScript/JXA
Build from Source
git clone <repository-url>
cd itunes
go build -o bin/itunes . # CLI tool
go build -o bin/mcp-itunes ./mcp-server # MCP server
go build -o bin/itunes-migrate ./cmd/migrate # Migration tool
Quick Start
Database Setup (first)
# First-time setup or library refresh (~15-30 seconds)
./bin/itunes-migrate -from-script
# Validate existing database
./bin/itunes-migrate -validate
When to refresh: first install, library changes, metadata updates, or search issues.
CLI Usage
# Search your music library
./bin/itunes search "jazz"
./bin/itunes search "Miles Davis"
./bin/itunes search --json "Miles Davis" # JSON output (used by the Vim plugin)
# Play tracks: play <playlist> [album] [track] [trackID]
./bin/itunes play "My Playlist" "" "" "B258396D58E2ECC9" # ID with playlist context
./bin/itunes play "" "Kind of Blue" "So What" # album + track name
# Current playback status
./bin/itunes now-playing # or: status
# Radio stations
./bin/itunes search-stations "jazz"
./bin/itunes list-stations
./bin/itunes add-station --name "Name" --url "itmss://..." [--genre g --description d --homepage url]
./bin/itunes update-station <id> [--name/--url/--genre/--description/--homepage ...]
./bin/itunes delete-station <id>
./bin/itunes import-stations stations.json
./bin/itunes export-stations stations.json
MCP Server
# Start MCP server (stdio transport)
./bin/mcp-itunes
Claude Desktop / Claude Code configuration:
{
"mcpServers": {
"itunes": {
"command": "/path/to/bin/mcp-itunes"
}
}
}
Vim Plugin
Search and play from inside Vim/Neovim via fzf:
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'chew-z/itunes.vim', { 'branch': 'main', 'rtp': 'vim-plugin' }
| Command | Description |
|---|---|
| :Tunes [query] | Fuzzy-search the library and play the selected track |
| :TunesStatus | Show the currently playing track |
| :TunesPlay [playlist] | Play an entire playlist |
The plugin shells out to bin/itunes (auto-detected, or set g:itunes_bin).
See vim-plugin/README.md for configuration and
docs/VIM-PLUGIN.md for design details.
MCP Tools (14)
Music Library:
search_itunes— search library (<7ms FTS5 performance)search_advanced— filtered search (genre, artist, album, rating, starred, streaming)play_track— play with ID-based lookup and optional playlist contextnow_playing— current playback status and track inforefresh_library— rebuild database from Apple Music (~15–30 s, resource-intensive)
Playlists:
list_playlists— all playlists with metadataget_playlist_tracks— tracks in a specific playlist
Radio & Streams:
search_stations— find Apple Music radio stations by genre/nameplay_stream— play streaming URLs (itmss://,https://)
EQ & Audio Output:
check_eq— current EQ status and available presetsset_eq— apply EQ presets (Rock, Jazz, Classical, …) or enable/disableget_output_device— current audio output (local/AirPlay)list_output_devices— available output devicesset_output_device— switch to local output (AirPlay selection must be manual)
MCP Resources: itunes://database/stats, itunes://database/playlists
Usage Pattern
Best practice is ID-based playback with playlist context for continuous play:
{"track_id": "B258396D58E2ECC9", "playlist": "My Jazz Collection"}
Track IDs come from search results and are Apple Music persistent IDs, which avoids name-matching and encoding issues.
Performance
- Search: <7ms queries, <5µs cache hits
- Database: ~760 bytes per track, ~800 tracks/sec migration
- Storage: ~1MB per 1,000 tracks including FTS5 indexes
- Driver: pure Go SQLite (
modernc.org/sqlite, no CGO)
Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| ITUNES_DB_PATH | ~/Music/iTunes/itunes_library.db | Primary database path |
| ITUNES_BACKUP_DB_PATH | ~/Music/iTunes/itunes_library_backup.db | Backup database path |
| ITUNES_SEARCH_LIMIT | 15 | Maximum search results |
Documentation
Developer docs live in docs/: architecture,
database & FTS5 internals,
JXA automation (including the bulk-fetch rule —
required reading before touching any JXA script), and the
Vim plugin.
Development
Project Structure
├── itunes.go # CLI application (command dispatch + handlers)
├── mcp-server/ # MCP server (14 tools, grouped registration)
├── itunes/ # Core library: Client type, playback, EQ, JXA scripts
│ └── scripts/ # Embedded JXA automation scripts
├── database/ # SQLite + FTS5: schema, search, migrations
├── vim-plugin/ # Vim/Neovim frontend (fzf + CLI)
├── docs/ # Developer documentation
├── logging/ # zap logger setup
└── cmd/migrate/ # Database migration/validation tool
The core library exposes itunes.NewClient(logger) owning the database connection and search manager; playback and audio-control functions are package-level and take a context.Context.
Build, Test, Lint
./run_test.sh # go test -v ./...
./run_lint.sh # golangci-lint (zero findings expected)
./run_format.sh # gofmt -w .
# Or directly:
go test ./...
go test ./database -bench=BenchmarkSearch
Troubleshooting
Database issues:
./bin/itunes-migrate -from-script # Initialize/refresh
./bin/itunes-migrate -validate # Check status
Playback issues:
- Use
track_idfrom search results (most reliable) - Ensure the Apple Music app is running
- Grant Automation permissions: System Settings → Privacy & Security → Automation
EQ/Audio issues:
- EQ status is unavailable while using AirPlay (macOS limitation)
- Specific AirPlay device selection must be done manually in the Music app
Radio station playback:
- Stations must use
itmss://protocol URLs for playback;https://URLs are homepage links only
License & Acknowledgments
MIT License — see LICENSE file for details.
Thanks to Apple Music, SQLite FTS5, the MCP Protocol, and modernc.org/sqlite.
Related Skills
Agent-Reach
109.2kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
78.9kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.8kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Scrapling
97.9k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
