npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

apple-music-mcp

v0.2.1

Published

MCP server for controlling Apple Music via JXA

Readme

Apple Music MCP

MCP server for controlling Apple Music on macOS. Uses JXA (JavaScript for Automation) to talk to Music.app directly — no API keys or authentication needed.

Install

Requires Bun and macOS.

Claude Desktop / Claude Code

Add to your MCP config:

{
  "mcpServers": {
    "apple-music": {
      "command": "bunx",
      "args": ["apple-music-mcp"]
    }
  }
}

From source

git clone https://github.com/lucasilverentand/apple-music-mcp.git
cd apple-music-mcp
bun install
bun run src/index.ts

Tools

Playback

| Tool | Description | |------|-------------| | get_player_state | Current track, position, volume, shuffle & repeat state | | play_pause | Toggle play/pause | | next_track | Skip to next track | | previous_track | Go to previous track | | set_volume | Set volume (0–100) | | set_shuffle | Enable/disable shuffle | | set_repeat | Set repeat mode (off, one, all) |

Search & Browse

| Tool | Description | |------|-------------| | search_tracks | Search library by name, artist, or album | | get_track_details | Full metadata for a track by persistent ID | | get_tracks_by_criteria | Filter tracks by genre, BPM, year, play count, artist, favorites | | get_library_stats | Aggregated stats: genres, top artists, most played, decades |

Playlists

| Tool | Description | |------|-------------| | list_playlists | List all playlists with track counts | | get_playlist_tracks | Get tracks from a playlist (paginated) | | create_playlist | Create a playlist or folder | | create_smart_playlist | Create a playlist from filter criteria in one step | | add_to_playlist | Add tracks to a playlist by persistent ID | | remove_from_playlist | Remove tracks from a playlist | | delete_playlist | Delete a playlist | | move_playlist_to_folder | Move a playlist into a folder |

Playback Control

| Tool | Description | |------|-------------| | play_track | Play a specific track by persistent ID | | play_playlist | Start playing a playlist by name |

Track Actions

| Tool | Description | |------|-------------| | favorite | Favorite/unfavorite a track | | dislike | Dislike/un-dislike a track | | set_rating | Rate a track (0–5 stars) | | add_to_library | Add the currently playing track to your library | | set_bpm | Manually tag BPM on a track |

Wikidata Lookup

| Tool | Description | |------|-------------| | wikidata_lookup | Look up a song on Wikidata for rich metadata: genres, musical key, BPM, record label, producers, songwriters, ISRC, Spotify/MusicBrainz IDs, and Wikipedia summary |

How it works

The server shells out to osascript -l JavaScript (JXA) to control Music.app. Track persistentID is the stable identifier used across all tools. Streaming tracks from Apple Music have bpm: 0 — use set_bpm to tag them manually, or use wikidata_lookup to find the BPM.

Requirements

  • macOS (uses Music.app via JXA)
  • Bun runtime

License

MIT