Skip to main content
Glama
Sound

Sound

by seayniclabs

Sound 是一个原生的 macOS MCP 服务器,让 Claude Code、Cursor 和 Windsurf 等 AI 工具能够通过自然语言搜索、播放和管理 Apple Music。

无需 API 密钥。无需浏览器授权流程。一条命令安装,一个提示词设置。

功能特性

工具

描述

search_catalog

在 Apple Music 中搜索歌曲、专辑或艺人

get_song_details

获取歌曲的完整元数据

get_album_details

获取包含曲目列表的专辑信息

play_song

通过目录 ID 播放特定歌曲

play_pause

切换播放/暂停

skip_next / skip_previous

曲目导航

get_now_playing

当前曲目信息和播放状态

get_queue / set_queue

读取或替换播放队列

get_library_playlists

列出你的播放列表

get_recently_played

最近收听历史

create_playlist

创建新播放列表

add_to_playlist

将歌曲添加到播放列表

ping

健康检查

Related MCP server: MCP AppleMusic Server

要求

  • macOS 14+ (Sonoma 或更高版本) 且运行在 Apple Silicon 上

  • Apple Music 订阅(用于播放;目录搜索无需订阅)

  • 支持 MCP 的 AI 工具(Claude Code、Cursor、Windsurf 等)

  • 从源码构建:Xcode 16.3+ / Swift 6.1+

安装

Homebrew (推荐)

brew install seayniclabs/tap/sound

从源码构建

git clone https://github.com/seayniclabs/sound.git
cd sound
swift build -c release
codesign --force --sign - --entitlements Sources/Sound/Sound.entitlements .build/release/Sound

二进制文件位于 .build/release/Sound。

首次设置

运行设置命令以授予 Apple Music 访问权限:

sound setup

这将触发 macOS 权限提示。你只需执行一次。

添加到 Claude Code

claude mcp add sound -- $(which sound)

或者手动添加到 ~/.claude.json:

{
  "mcpServers": {
    "sound": {
      "command": "/path/to/sound",
      "args": ["serve"]
    }
  }
}

使用方法

连接后,直接与你的 AI 工具对话即可:

  • “在 Apple Music 中搜索 Tycho”

  • “播放 Foo Fighters 的 Everlong”

  • “创建一个名为 Focus 的播放列表并添加这些曲目”

  • “现在正在播放什么?”

  • “跳到下一首”

工作原理

Sound 使用 Apple 的 MusicKit 框架在 macOS 上原生与 Apple Music 交互。它通过 Model Context Protocol (JSON-RPC) 使用 stdio 与 AI 工具进行通信。

AI Tool  --stdio/JSON-RPC-->  Sound  --MusicKit-->  Apple Music
                                     --ApplicationMusicPlayer-->  Music.app

授权由 macOS 处理——二进制文件具有嵌入的包标识符 (com.seayniclabs.sound) 和 MusicKit 授权。用户只需在提示时点击“允许”即可。无需令牌,无需刷新逻辑,无需配置文件。

构建

swift build           # debug build
swift build -c release  # release build

Sound 需要 Swift 6.1+ 并针对 macOS 14+ 进行构建。

许可证

MIT

致谢

由 Seaynic Labs 构建。

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Allows controlling Apple Music on macOS through an MCP server that supports playback control, volume adjustment, and music search functionality.
      2
      MIT