MCP applemusic 音频

SKILLAI 工具

原名 mcp-applemusic

AI 工具 调用外部服务 许可证明确 OpenClaw
安装这个技能

用于辅助音频、音乐、语音转写、语音合成或声音素材处理。它适合让 Agent 生成配乐说明、整理音频流程、调用语音工具或处理播客和视频配音素材。使用时需要确认输入音频来源、输出格式、时长和模型限制;涉及人声克隆、版权音乐或公开发布时,应先核对授权和合规边界。

一句话选型结论

按资料字段整理

MCP applemusic 音频是AI 工具类的 Agent Skill,安装方式:ClawHub 市场,权限级别:调用外部服务,许可证明确(MIT-0),有可直接复制的安装命令,可被 OpenClaw 加载。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类AI 工具 安装方式ClawHub 市场 权限级别调用外部服务 许可证许可证明确
累计安装 79,389 本周 3,243
GitHub 星标 3 仓库 mcp-applemusic
下载量 25,425 技能市场下载数
权限级别 调用外部服务 安装前请确认风险范围
许可证 许可证明确 MIT-0

安装

ClawHub 市场
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
openclaw skills install mcp-applemusic
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills,并且版本不旧;已标注支持:OpenClaw。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

AI 工具
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方epheterson仓库 mcp-applemusic · 版本 1.0.6
宿主客户端OpenClaw技能可被这些客户端加载
安装方式ClawHub 市场安装包 epheterson/mcp-applemusic
权限级别调用外部服务安装前请确认风险范围
许可证MIT-0许可证明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验2026-05-01上游最后核验时间 · 数据更新 未标注
正文体量15.9 KBSKILL.md 原文大小,越大说明说明书写得越细

能做什么

4 项能力
上游给出的能力概览与适用场景
  • 调用音乐生成模型
  • 支持文本到音乐或歌曲生成
  • 提供 CLI 示例和使用场景
  • 适合音频内容工作流
生成背景音乐生成歌曲或旋律视频和播客配乐社媒内容音频素材

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
组合多个 AI 能力

把写作、检索、总结串成一条流程。

搭工作流

把固定流程做成可重复调用的步骤。

做提示词与评测

整理提示词并对比输出效果。

权限与风险

调用外部服务
装之前先读完这段

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 许可证明确(MIT-0),商用边界更清楚。
  • 有可直接复制的安装命令,不用自己翻文档找入口。
  • 列了 4 项能力,能直接看出它能做什么。
  • 标注支持 OpenClaw,换客户端不用重新找。
  • 累计安装 79,389,用的人多,遇到问题更容易搜到答案。

先想清楚的地方

  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在AI 工具场景里给模型补一套做法的人。
  • 已经在用 OpenClaw 的人,接入路径最短。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
MCP applemusic 音频当前 调用外部服务 ClawHub 市场 79,389 OpenClaw 有
执行计划 只读 GitHub 仓库 151.5 万 Codex、Claude、Cursor 有
Playwright MCP 测试 浏览器控制 ClawHub 市场 136.5 万 OpenClaw 有
完成前的验证 未标注权限 GitHub 仓库 131.9 万 Codex、Claude、Cursor 有
子 Agent 驱动开发 只读 GitHub 仓库 131.2 万 Codex、Claude、Cursor 有
前端设计 执行命令 GitHub 仓库 125.6 万 Codex、Claude、Cursor 有

安装与使用指南

安装步骤

本站只展示命令,不托管安装包,也不自动执行。

怎么用

安装后应在对应宿主中按原始 README 的触发条件使用;当前草稿只做目录说明,具体调用方式由规则抽取,异常条目再复核。

SKILL.md 全文

15.9 KB
模型实际读到的说明书原文,来自技能仓库

Apple Music Integration

Guide for integrating with Apple Music. Covers AppleScript (macOS), MusicKit API (cross-platform), and the critical library-first requirement.

When to Use

Invoke when users ask to:
- Manage playlists (create, add/remove tracks, list)
- Control playback (play, pause, skip, volume)
- Search catalog or library
- Add songs to library
- Access listening history or recommendations

Critical Rule: Library-First Workflow

You CANNOT add catalog songs directly to playlists.

Songs must be in the user's library first:
- ❌ Catalog ID → Playlist (fails)
- ✅ Catalog ID → Library → Playlist (works)

Why: Playlists use library IDs (i.abc123), not catalog IDs (1234567890).

This applies to both AppleScript and API approaches.

Platform Comparison

Feature AppleScript (macOS) MusicKit API
Setup required None Dev account + tokens
Playlist management Full API-created only
Playback control Full None
Catalog search No Yes
Library access Instant With tokens
Cross-platform No Yes

AppleScript (macOS)

Zero setup. Works immediately with the Music app.

Run via Bash:

osascript -e 'tell application "Music" to playpause'
osascript -e 'tell application "Music" to return name of current track'

Multi-line scripts:

osascript <<'EOF'
tell application "Music"
    set t to current track
    return {name of t, artist of t}
end tell
EOF

Available Operations

Category Operations
Playback play, pause, stop, resume, next track, previous track, fast forward, rewind
Player State player position, player state, sound volume, mute, shuffle enabled/mode, song repeat
Current Track name, artist, album, duration, time, rating, loved, disliked, genre, year, track number
Library search, list tracks, get track properties, set ratings
Playlists list, create, delete, rename, add tracks, remove tracks, get tracks
AirPlay list devices, select device, current device

Track Properties (Read)

tell application "Music"
    set t to current track
    -- Basic info
    name of t           -- "Hey Jude"
    artist of t         -- "The Beatles"
    album of t          -- "1 (Remastered)"
    album artist of t   -- "The Beatles"
    composer of t       -- "Lennon-McCartney"
    genre of t          -- "Rock"
    year of t           -- 1968

    -- Timing
    duration of t       -- 431.0 (seconds)
    time of t           -- "7:11" (formatted)
    start of t          -- start time in seconds
    finish of t         -- end time in seconds

    -- Track info
    track number of t   -- 21
    track count of t    -- 27
    disc number of t    -- 1
    disc count of t     -- 1

    -- Ratings
    rating of t         -- 0-100 (20 per star)
    loved of t          -- true/false
    disliked of t       -- true/false

    -- Playback
    played count of t   -- 42
    played date of t    -- date last played
    skipped count of t  -- 3
    skipped date of t   -- date last skipped

    -- IDs
    persistent ID of t  -- "ABC123DEF456"
    database ID of t    -- 12345
end tell

Track Properties (Writable)

tell application "Music"
    set t to current track
    set rating of t to 80          -- 4 stars
    set loved of t to true
    set disliked of t to false
    set name of t to "New Name"    -- rename track
    set genre of t to "Alternative"
    set year of t to 1995
end tell

Player State Properties

tell application "Music"
    player state          -- stopped, playing, paused, fast forwarding, rewinding
    player position       -- current position in seconds (read/write)
    sound volume          -- 0-100 (read/write)
    mute                  -- true/false (read/write)
    shuffle enabled       -- true/false (read/write)
    shuffle mode          -- songs, albums, groupings
    song repeat           -- off, one, all (read/write)
    current track         -- track object
    current playlist      -- playlist object
    current stream URL    -- URL if streaming
end tell

Playback Commands

tell application "Music"
    -- Play controls
    play                          -- play current selection
    pause
    stop
    resume
    playpause                     -- toggle play/pause
    next track
    previous track
    fast forward
    rewind

    -- Play specific content
    play (first track of library playlist 1 whose name contains "Hey Jude")
    play user playlist "Road Trip"

    -- Settings
    set player position to 60     -- seek to 1:00
    set sound volume to 50        -- 0-100
    set mute to true
    set shuffle enabled to true
    set song repeat to all        -- off, one, all
end tell

Library Queries

tell application "Music"
    -- All library tracks
    every track of library playlist 1

    -- Search by name
    tracks of library playlist 1 whose name contains "Beatles"

    -- Search by artist
    tracks of library playlist 1 whose artist contains "Beatles"

    -- Search by album
    tracks of library playlist 1 whose album contains "Abbey Road"

    -- Combined search
    tracks of library playlist 1 whose name contains "Hey" and artist contains "Beatles"

    -- By genre
    tracks of library playlist 1 whose genre is "Rock"

    -- By year
    tracks of library playlist 1 whose year is 1969

    -- By rating
    tracks of library playlist 1 whose rating > 60  -- 3+ stars

    -- Loved tracks
    tracks of library playlist 1 whose loved is true

    -- Recently played (sort by played date)
    tracks of library playlist 1 whose played date > (current date) - 7 * days
end tell

Playlist Operations

tell application "Music"
    -- List all playlists
    name of every user playlist

    -- Get playlist
    user playlist "Road Trip"
    first user playlist whose name contains "Road"

    -- Create playlist
    make new user playlist with properties {name:"New Playlist", description:"My playlist"}

    -- Delete playlist
    delete user playlist "Old Playlist"

    -- Rename playlist
    set name of user playlist "Old Name" to "New Name"

    -- Get playlist tracks
    every track of user playlist "Road Trip"
    name of every track of user playlist "Road Trip"

    -- Add track to playlist (must be library track)
    set targetPlaylist to user playlist "Road Trip"
    set targetTrack to first track of library playlist 1 whose name contains "Hey Jude"
    duplicate targetTrack to targetPlaylist

    -- Remove track from playlist
    delete (first track of user playlist "Road Trip" whose name contains "Hey Jude")

    -- Playlist properties
    duration of user playlist "Road Trip"   -- total duration
    time of user playlist "Road Trip"       -- formatted duration
    count of tracks of user playlist "Road Trip"
end tell

AirPlay

tell application "Music"
    -- List AirPlay devices
    name of every AirPlay device

    -- Get current device
    current AirPlay devices

    -- Set output device
    set current AirPlay devices to {AirPlay device "Living Room"}

    -- Multiple devices
    set current AirPlay devices to {AirPlay device "Living Room", AirPlay device "Kitchen"}

    -- Device properties
    set d to AirPlay device "Living Room"
    name of d
    kind of d           -- computer, AirPort Express, Apple TV, AirPlay device, Bluetooth device
    active of d         -- true if playing
    available of d      -- true if reachable
    selected of d       -- true if in current devices
    sound volume of d   -- 0-100
end tell

String Escaping

Always escape user input:

def escape_applescript(s):
    return s.replace('\\', '\\\\').replace('"', '\\"')

safe_name = escape_applescript(user_input)
script = f'tell application "Music" to play user playlist "{safe_name}"'

Limitations

  • No catalog access - only library content
  • macOS only - no Windows/Linux

MusicKit API

Cross-platform but requires Apple Developer account ($99/year) and token setup.

Authentication

Requirements:
1. Apple Developer account
2. MusicKit key (.p8 file) from developer portal
3. Developer token (JWT, 180 day max)
4. User music token (browser OAuth)

Generate developer token:

import jwt, datetime

with open('AuthKey_XXXXXXXXXX.p8') as f:
    private_key = f.read()

token = jwt.encode(
    {
        'iss': 'TEAM_ID',
        'iat': int(datetime.datetime.now().timestamp()),
        'exp': int((datetime.datetime.now() + datetime.timedelta(days=180)).timestamp())
    },
    private_key,
    algorithm='ES256',
    headers={'alg': 'ES256', 'kid': 'KEY_ID'}
)

Get user token: Browser OAuth to https://authorize.music.apple.com/woa

Headers for all requests:

Authorization: Bearer {developer_token}
Music-User-Token: {user_music_token}

Base URL: https://api.music.apple.com/v1

Available Endpoints

Catalog (Public - dev token only)

Endpoint Method Description
/catalog/{storefront}/search GET Search songs, albums, artists, playlists
/catalog/{storefront}/songs/{id} GET Song details
/catalog/{storefront}/albums/{id} GET Album details
/catalog/{storefront}/albums/{id}/tracks GET Album tracks
/catalog/{storefront}/artists/{id} GET Artist details
/catalog/{storefront}/artists/{id}/albums GET Artist's albums
/catalog/{storefront}/artists/{id}/songs GET Artist's top songs
/catalog/{storefront}/artists/{id}/related-artists GET Similar artists
/catalog/{storefront}/playlists/{id} GET Playlist details
/catalog/{storefront}/charts GET Top charts
/catalog/{storefront}/genres GET All genres
/catalog/{storefront}/search/suggestions GET Search autocomplete
/catalog/{storefront}/stations/{id} GET Radio station

Library (Requires user token)

Endpoint Method Description
/me/library/songs GET All library songs
/me/library/albums GET All library albums
/me/library/artists GET All library artists
/me/library/playlists GET All library playlists
/me/library/playlists/{id} GET Playlist details
/me/library/playlists/{id}/tracks GET Playlist tracks
/me/library/search GET Search library
/me/library POST Add to library
/catalog/{sf}/songs/{id}/library GET Get library ID from catalog ID

Playlist Management

Endpoint Method Description
/me/library/playlists POST Create playlist
/me/library/playlists/{id}/tracks POST Add tracks to playlist

Personalization

Endpoint Method Description
/me/recommendations GET Personalized recommendations
/me/history/heavy-rotation GET Frequently played
/me/recent/played GET Recently played
/me/recent/added GET Recently added

Ratings

Endpoint Method Description
/me/ratings/songs/{id} GET Get song rating
/me/ratings/songs/{id} PUT Set song rating
/me/ratings/songs/{id} DELETE Remove rating
/me/ratings/albums/{id} GET/PUT/DELETE Album ratings
/me/ratings/playlists/{id} GET/PUT/DELETE Playlist ratings

Storefronts

Endpoint Method Description
/storefronts GET All storefronts
/storefronts/{id} GET Storefront details
/me/storefront GET User's storefront

Common Query Parameters

Parameter Description Example
term Search query term=beatles
types Resource types types=songs,albums
limit Results per page (max 25) limit=10
offset Pagination offset offset=25
include Related resources include=artists,albums
extend Additional attributes extend=editorialNotes
l Language code l=en-US

Search Example

GET /v1/catalog/us/search?term=wonderwall&types=songs&limit=10

Response:
{
  "results": {
    "songs": {
      "data": [{
        "id": "1234567890",
        "type": "songs",
        "attributes": {
          "name": "Wonderwall",
          "artistName": "Oasis",
          "albumName": "(What's the Story) Morning Glory?",
          "durationInMillis": 258773,
          "releaseDate": "1995-10-02",
          "genreNames": ["Alternative", "Music"]
        }
      }]
    }
  }
}

Library-First Workflow (Complete)

Adding a catalog song to a playlist requires 4 API calls:

import requests

headers = {
    "Authorization": f"Bearer {dev_token}",
    "Music-User-Token": user_token
}

# 1. Search catalog
r = requests.get(
    "https://api.music.apple.com/v1/catalog/us/search",
    headers=headers,
    params={"term": "Wonderwall Oasis", "types": "songs", "limit": 1}
)
catalog_id = r.json()['results']['songs']['data'][0]['id']

# 2. Add to library
requests.post(
    "https://api.music.apple.com/v1/me/library",
    headers=headers,
    params={"ids[songs]": catalog_id}
)

# 3. Get library ID (catalog ID → library ID)
r = requests.get(
    f"https://api.music.apple.com/v1/catalog/us/songs/{catalog_id}/library",
    headers=headers
)
library_id = r.json()['data'][0]['id']

# 4. Add to playlist (library IDs only!)
requests.post(
    f"https://api.music.apple.com/v1/me/library/playlists/{playlist_id}/tracks",
    headers={**headers, "Content-Type": "application/json"},
    json={"data": [{"id": library_id, "type": "library-songs"}]}
)

Create Playlist

POST /v1/me/library/playlists
Content-Type: application/json

{
  "attributes": {
    "name": "Road Trip",
    "description": "Summer vibes"
  },
  "relationships": {
    "tracks": {
      "data": []
    }
  }
}

Ratings

# Love a song (value: 1 = love, -1 = dislike)
PUT /v1/me/ratings/songs/{id}
Content-Type: application/json

{"attributes": {"value": 1}}

Limitations

  • No playback control - API cannot play/pause/skip
  • Playlist editing - can only modify API-created playlists
  • Token management - dev tokens expire every 180 days
  • Rate limits - Apple enforces request limits

Common Mistakes

❌ Using catalog IDs in playlists:

# WRONG
json={"data": [{"id": "1234567890", "type": "songs"}]}

Fix: Add to library first, get library ID, then add.

❌ Playing catalog songs via AppleScript:

# WRONG
play track id "1234567890"

Fix: Song must be in library.

❌ Unescaped AppleScript strings:

# WRONG
name = "Rock 'n Roll"
script = f'tell application "Music" to play playlist "{name}"'

Fix: Escape quotes.

❌ Expired tokens:
Dev tokens last 180 days max.
Fix: Check expiration, handle 401 errors.


The Easy Way: mcp-applemusic

The mcp-applemusic MCP server handles all this complexity automatically: AppleScript escaping, token management, library-first workflow, ID conversions.

Install:

git clone https://github.com/epheterson/mcp-applemusic.git
cd mcp-applemusic && python3 -m venv venv && source venv/bin/activate
pip install -e .

Configure Claude Desktop:

{
  "mcpServers": {
    "Apple Music": {
      "command": "/path/to/mcp-applemusic/venv/bin/python",
      "args": ["-m", "applemusic_mcp"]
    }
  }
}

On macOS, most features work immediately. For catalog features or Windows/Linux, see the repo README.

Manual mcp-applemusic
4 API calls to add song playlist(action="add", auto_search=True)
AppleScript escaping Automatic
Token management Automatic with warnings

常见问题

7 问
答案由本站依据条目字段整理
MCP applemusic 音频怎么安装?

在支持 Skills 的客户端里执行:openclaw skills install mcp-applemusic。安装方式为ClawHub 市场。装完刷新技能列表或重开客户端。

MCP applemusic 音频支持哪些客户端?

资料标注支持 OpenClaw;其他支持 Skills 的客户端也能用同样的方式加载。

MCP applemusic 音频权限高吗,安全吗?

权限级别为调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

MCP applemusic 音频收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

MCP applemusic 音频用什么许可证?

许可证标注为 MIT-0(许可证明确)。商用或二次分发前请到仓库确认条款原文。

MCP applemusic 音频能做什么?

资料列出的能力包括:调用音乐生成模型、支持文本到音乐或歌曲生成、提供 CLI 示例和使用场景、适合音频内容工作流。

MCP applemusic 音频怎么用?

安装后应在对应宿主中按原始 README 的触发条件使用;当前草稿只做目录说明,具体调用方式由规则抽取,异常条目再复核。

安全信息

审计结论
未标注不代表已通过审计
安全审计VirusTotal、ClawScan、Static analysis第三方安全审计平台给出的结论

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 2026-05-01。