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: apple-music-mcp
🔌 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. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Related MCP Connectors
MCP connector for iMessage & Contacts via a local Mac agent + Vercel relay
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
iTunes Search MCP — Apple's public catalog search
MCP connector that lets ChatGPT list, search, and run your Apple Shortcuts via a local Mac agent
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceMCP server for controlling Apple Music on macOS using JXA (JavaScript for Automation). Manage playback, search tracks, create playlists, and more without API keys.12MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for controlling Apple Music on macOS via AppleScript, enabling playlist management, playback control, and library search through natural language.121MIT
- AlicenseNot gradedqualityBmaintenanceControls Apple Music on macOS via AppleScript, enabling playback, lyrics retrieval, playlist management, and catalog search through an MCP interface.MIT
- AlicenseAqualityCmaintenanceA safe, structured Model Context Protocol server for the local Apple Music app on macOS. It lets an MCP client inspect a library, analyze and manage playlists, control playback, edit supported metadata, and keep a local audit trail.18MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/saitarrun/apple-music-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server