apple_music_mcp
Apple Music MCP
一个为 Apple Music 打造的高性能 Model Context Protocol (MCP) 服务器。 原生 macOS JXA 与云 REST 双引擎,支持跨平台发现、异步批处理以及零超时执行。
⚡ 快速开始
使用 npx 或 uvx 即刻运行(无需安装):
选项 A:使用 npx(推荐)
npx -y @saitarrunpitta/apple-music-mcp选项 B:使用 uvx
uvx --from git+https://github.com/saitarrun/apple-music-mcp.git apple-music-mcp serve选项 C:通过 npm 或 pip 本地安装
npm install -g @saitarrunpitta/apple-music-mcp
# or
pip install git+https://github.com/saitarrun/apple-music-mcp.gitRelated MCP server: mcp-applemusic
🔌 MCP 客户端设置
几秒钟即可将 apple-music 添加到您偏好的 AI 助手:
1. Antigravity / AGY CLI
agy mcp add apple-music -- npx -y @saitarrunpitta/apple-music-mcp2. 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✨ 功能一览
⚡ 零超时 JXA 引擎:可在 100ms 内读取包含 1,000+ 首歌曲的播放列表,且不会因 AppleScript 而卡顿。
🌐 跨平台榜单:直接从 Shazam、Spotify、YouTube 和 Apple Music 获取发现数据。
🚀 异步并行批处理:在 1 秒内 并行添加或移除 100+ 首歌曲。
🎵 纯音频强制:自动过滤音乐视频和歌词视频,使播放列表保持纯音频。
🛡️ 100% 重复预防:内置模糊匹配机制,防止添加重复歌曲。
🔐 自动 Safari 认证:无需手动 API 密钥,即可从 Safari 无缝提取网页播放器令牌。
🧠 智能推荐:基于您的收听历史和艺术家相似度,提供实时曲目推荐。
🛠️ 工具参考
类别 | 工具 | 描述 |
发现 |
| 从 Shazam、Spotify、YouTube 或 Apple Music 榜单中获取热门歌曲。 |
| 从任意榜单直接填充播放列表,并自动去重。 | |
| 基于收听历史和艺术家的智能推荐。 | |
| 从 Apple Music 云服务获取最近的收听历史。 | |
| 获取播放次数最多的专辑和播放列表。 | |
播放列表 |
| 列出资料库中的所有播放列表,包含歌曲数量与描述。 |
| 快速批量获取曲目(标题、艺术家、专辑、时长)。 | |
| 并行批量添加曲目,零重复。 | |
| 按曲目关系 ID 批量移除。 | |
| 创建带有自定义描述的新播放列表。 | |
| 安全删除播放列表,不会从资料库中移除歌曲。 | |
| 更新播放列表描述并同步到 iCloud。 | |
曲库 |
| 搜索全球 Apple Music 曲库(歌曲、专辑、艺术家、播放列表)。 |
| 为标题/艺术家锁定精确的录音室音频目录 ID。 | |
| 获取任何艺术家的热门歌曲。 | |
| 获取 Apple 官方精选播放列表( | |
播放 |
| 控制播放器( |
| 发现可用的 AirPlay 音箱和 HomePod。 | |
整理 |
| 移除视频实体,并替换为官方录音室音频歌曲。 |
| 对播放列表版本去重,保留规范曲目。 | |
| 合并播放列表,100% 去重。 |
💻 CLI 命令
# 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🏷️ 标签与可发现性
#ModelContextProtocol #MCP #MCPServer #AppleMusic #ClaudeAI #CursorAI #AnthropicClaude #AIAgents #MusicKit #Spotify #Shazam #YouTubeMusic #AppleScript #Python #OpenSource #DeveloperTools #LLM #Automation #PlaylistGenerator
📄 许可证
MIT © saitarrun
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Unified 15-tool SEO, SERP, clean Markdown & GEO (LLM citation Share-of-Voice) MCP server.
Real-time YouTube transcripts, comments, channels & video search MCP. Local npx or hosted OAuth.
Spotify MCP server for ChatGPT, Claude and any AI agent: search songs and artists, list playlists, read playlist songs, create playlist, add songs to playlist, remove songs from playlist, set playlist public or private and save to Liked Songs in your own Spotify account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Spotify yourself; Cotlet does not store your password and you need no Spotify API key. About the official Spotify API: Spotify has a full Web API and, since 23 Apr 2026, an official connector for Claude (checked 5 Nov 2026). The API needs an app you register, and in development mode the app owner must have Premium and the app allows 5 users; unlimited users need a registered business with at least 250,000 monthly users. Setup and FAQ: https://cotlet.dev/integrations/spotify-api-mcp-server
Remote MCP server for audio stem separation, denoise, reverb, and MIDI export.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for controlling Apple Music on macOS using JXA (JavaScript for Automation). Manage playback, search tracks, create playlists, and more without API keys.7 npmMIT
- AlicenseBqualityBmaintenanceThe ultimate 66-tool Apple Music MCP server for macOS: playback, Spotify playlist importer, listening journal, Replay reports, smart DJ crossfades, and AirPlay.663MIT
- FlicenseNot gradedqualityAmaintenanceGives MCP clients control of Apple Music playlists, library, catalog, discovery, playback, and the Up Next queue, using four interchangeable engines that run on macOS, Windows, and Linux. Requires only a Mac or an Apple Music subscription, with the API engine needing no browser or Music app at all.-
- FlicenseNot gradedqualityAmaintenanceEnables any MCP client to control Apple Music playlists, library, catalog, discovery, playback, and the Up Next queue on macOS, Windows, and Linux using selectable native, API, Safari, or Chrome engines. Provides catalog and library search, playlist and folder management, ratings and favorites, playback controls, queue management, AirPlay selection, and cross-platform support with or without an Apple Music subscription.-