apple_music_mcp
High-efficiency Apple Music MCP Server featuring a dual-engine architecture (macOS Native JXA + Cloud REST API), cross-platform chart discovery (Shazam,Spotify, YouTube), async parallel batch additions, pure-audio enforcement, and zero-timeout execution.
README
<div align="center"> <img src="./assets/banner.svg" alt="Apple Music MCP Banner" width="100%" />
Apple Music MCP
A high-performance Model Context Protocol (MCP) server for Apple Music.<br /> Dual native macOS JXA & cloud REST engine with cross-platform discovery, async batching, and zero-timeout execution.
<p> <a href="https://www.npmjs.com/package/@saitarrunpitta/apple-music-mcp"><img src="https://img.shields.io/npm/v/@saitarrunpitta/apple-music-mcp.svg?style=flat-square&color=CB3837&logo=npm" alt="npm version" /></a> <a href="https://github.com/saitarrun/apple-music-mcp/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-FA2D55.svg?style=flat-square" alt="MIT License" /></a> <a href="https://python.org"><img src="https://img.shields.io/badge/Python-3.10+-3776AB.svg?style=flat-square&logo=python&logoColor=white" alt="Python 3.10+" /></a> <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-1.0.0-0A84FF.svg?style=flat-square" alt="Model Context Protocol" /></a> <a href="https://apple.com/macos"><img src="https://img.shields.io/badge/Platform-macOS-000000.svg?style=flat-square&logo=apple&logoColor=white" alt="macOS Platform" /></a> </p>
<p> <a href="https://glama.ai/mcp/servers/saitarrun/apple-music-mcp"><img src="https://glama.ai/mcp/servers/saitarrun/apple-music-mcp/badges/score.svg" alt="apple-music-mcp MCP server score" /></a> </p>
<a href="https://glama.ai/mcp/servers/saitarrun/apple-music-mcp"><img src="https://glama.ai/mcp/servers/saitarrun/apple-music-mcp/badges/card.svg" alt="apple-music-mcp MCP server card" /></a>
<p> <a href="#-quick-start">Quick Start</a> • <a href="#-mcp-client-setup">Client Setup</a> • <a href="#-tools-reference">Tools</a> • <a href="#-cli">CLI</a> • <a href="#-tags--discoverability">Keywords</a> </p> </div>
⚡ Quick Start
Run instantly with npx or uvx (zero install required):
Option A: Using npx (Recommended)
npx -y @saitarrunpitta/apple-music-mcp
Option B: Using uvx
uvx --from git+https://github.com/saitarrun/apple-music-mcp.git apple-music-mcp serve
Option C: Install locally via npm or pip
npm install -g @saitarrunpitta/apple-music-mcp
# or
pip install git+https://github.com/saitarrun/apple-music-mcp.git
🔌 MCP Client Setup
Add apple-music to your preferred AI assistant in seconds:
1. Antigravity / AGY CLI
agy mcp add apple-music -- npx -y @saitarrunpitta/apple-music-mcp
2. Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"apple-music": {
"command": "npx",
"args": [
"-y",
"@saitarrunpitta/apple-music-mcp"
]
}
}
}
3. Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"apple-music": {
"command": "npx",
"args": [
"-y",
"@saitarrunpitta/apple-music-mcp"
]
}
}
}
4. Codex MCP
codex mcp add apple-music -- npx -y @saitarrunpitta/apple-music-mcp
✨ Features at a Glance
- ⚡ Zero-Timeout JXA Engine: Reads playlists with 1,000+ songs in under 100ms without AppleScript freezes.
- 🌐 Cross-Platform Charts: Direct discovery feeds from Shazam, Spotify, YouTube, and Apple Music.
- 🚀 Async Parallel Batching: Add or remove 100+ songs in parallel in under 1 second.
- 🎵 Pure-Audio Enforcement: Auto-filters out music videos and lyric videos to keep playlists pure audio.
- 🛡️ 100% Duplicate Prevention: Built-in fuzzy matching prevents duplicate song additions.
- 🔐 Automatic Safari Auth: Extracts web player tokens seamlessly from Safari without manual API keys.
- 🧠 Smart Recommendations: Real-time track suggestions based on your listening history & artist similarity.
🛠️ Tools Reference
| Category | Tool | Description |
|---|---|---|
| Discovery | apple_music_get_cross_platform_charts |
Pull top hits from Shazam, Spotify, YouTube, or Apple Music charts. |
apple_music_populate_from_charts |
Populate a playlist directly from any chart with deduplication. | |
apple_music_get_music_recommendations |
Smart recommendations based on listening history & artists. | |
apple_music_get_recently_played |
Fetch recent listening history from Apple Music cloud. | |
apple_music_get_heavy_rotation |
Fetch most played albums and playlists. | |
| Playlists | apple_music_list_playlists |
List all library playlists with track counts and descriptions. |
apple_music_get_playlist_tracks |
Fast bulk retrieval of tracks (title, artist, album, duration). | |
apple_music_add_tracks_to_playlist |
Parallel batch add with zero duplicates. | |
apple_music_remove_tracks_from_playlist |
Bulk remove track relationship IDs. | |
apple_music_create_playlist |
Create new playlist with custom description. | |
apple_music_delete_playlist |
Safely delete playlist without removing songs from library. | |
apple_music_set_playlist_description |
Update playlist description and sync to iCloud. | |
| Catalog | apple_music_search_catalog |
Search global Apple Music catalog (songs, albums, artists, playlists). |
apple_music_resolve_song |
Pin exact studio audio catalog ID for title/artist. | |
apple_music_get_artist_top_songs |
Get top-rated songs for any artist. | |
apple_music_get_catalog_playlist_tracks |
Fetch tracks from official Apple curated playlists (pl.xxx). |
|
| Playback | apple_music_playback_control |
Control player (play, pause, skip, volume, shuffle, rate, love). |
apple_music_airplay_devices |
Discover available AirPlay speakers and HomePods. | |
| Curation | apple_music_curation_clean_videos |
Strip video entities and swap with official studio audio songs. |
apple_music_curation_deduplicate |
Deduplicate playlist editions, keeping canonical tracks. | |
apple_music_curation_merge_playlists |
Merge playlists with 100% deduplication. |
💻 CLI Commands
# Check status & active tokens
apple-music-mcp status
# Extract authentication tokens from open Safari session
apple-music-mcp login
# Clear catalog cache
apple-music-mcp clean-cache
# Run MCP server over stdio
apple-music-mcp serve
🏷️ Tags & Discoverability
#ModelContextProtocol #MCP #MCPServer #AppleMusic #ClaudeAI #CursorAI #AnthropicClaude #AIAgents #MusicKit #Spotify #Shazam #YouTubeMusic #AppleScript #Python #OpenSource #DeveloperTools #LLM #Automation #PlaylistGenerator
📄 License
MIT © saitarrun
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。