berabuddies/semia/mcp-applemusic
Claude Code and agent skill by berabuddies/semia
- community
Checking that the SKILL.md file is still in the repository.
Apple Music integration via AppleScript (macOS) or MusicKit API
Install
npx vskill@latest install berabuddies/semia/mcp-applemusicSKILL.md
The same SKILL.md was published earlier as berabuddies/semia/mcp-applemusic.
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:
Multi-line scripts:
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)
Track Properties (Writable)
Player State Properties
Playback Commands
Library Queries
Playlist Operations
AirPlay
String Escaping
Always escape user input:
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:
- Apple Developer account
- MusicKit key (.p8 file) from developer portal
- Developer token (JWT, 180 day max)
- User music token (browser OAuth)
Generate developer token:
Get user token: Browser OAuth to https://authorize.music.apple.com/woa
Headers for all requests:
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
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtests/fixtures/skills/epheterson/mcp-applemusic/SKILL.md
Popularity
- Repository stars
- 547
- Repository forks
- 59
- 7-day trend score
- 32
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 Jun 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/berabuddies/semia/mcp-applemusic)