@kentcdodds/spotify
by @kentcdodds
Package-first Spotify playback, playlist, search, library, recommendation, and device helpers for Kent's Kody workflows.
- spotify
- music
- playback
- playlist
- search
- multi-account
- License
- MIT
- Published
- 7/9/2026
- Pinned commit
d119569- Rating
- No ratings yet
- Adaptation effort
- —
- Forks
- 0
Fork with your agent
Copy this prompt into your MCP-capable agent to fork and adapt the package safely.
Use Kody to fork the community package "@kentcdodds/spotify" (listing id: 491c39f9-32b9-4a62-a885-9a673df3560d). Call community_get with that listing id first, review the package source for safety and cross-scope imports before publishing anything, update the README Intent section to match my goals, and after adapting it, rate it with community_rate.
README
# @kentcdodds/spotify
## Intent
Account-aware Spotify playback, playlist, search, library, and device helpers for Kody workflows. Supports Kent's personal account (default) and the family "Dodds Kids" account via an optional `account` param on every export.
## When To Use
- Control Spotify Connect playback (play, pause, skip, volume, queue) from an agent or automation.
- Read playback state, devices, queue, or listening history without opening the Spotify app.
- Create or edit playlists and save tracks on personal or family accounts.
- Search the catalog or fetch recommendations for music-discovery workflows.
- Target whole-home Sonos playback via the `family` account for household playlists.
## Required setup
- OAuth integrations: `spotify` (personal, default) and `spotify-family` (family/kids account).
- Reconnect at `/connect/oauth?provider=spotify` or `/connect/oauth?provider=spotify-family` when tokens expire.
- The family account has no default fallback device or collection URI; playback exports need an active device or explicit `deviceId`.
## Exports
- `./accounts` — list and resolve personal vs family account metadata.
- `./add-to-queue` — queue a track or episode URI.
- `./add-tracks-to-playlist` — add track URIs to a playlist.
- `./create-playlist` — create a new playlist.
- `./follow-playlist` — save a playlist to the library.
- `./get-all-playlist-tracks` — paginate all tracks in a playlist.
- `./get-devices` — list Spotify Connect devices.
- `./get-playlist` — read playlist metadata and track previews.
- `./get-queue` — read the current playback queue.
- `./get-recently-played` — recently played tracks.
- `./get-recommendations` — track recommendations from seeds.
- `./get-top-items` — top tracks or artists for a time range.
- `./get-track` — track details by ID.
- `./list-playlists` — list the user's playlists.
- `./play-context` — start album/playlist/artist context playback.
- `./play-pause` — toggle play or pause.
- `./playback-state` — current playback snapshot.
- `./remove-tracks-from-playlist` — remove tracks from a playlist.
- `./save-tracks` — save tracks to liked songs.
- `./search` — search tracks, albums, artists, or playlists.
- `./seek` — seek within the current track.
- `./set-repeat` — set repeat mode (off, track, context).
- `./set-shuffle` — enable or disable shuffle.
- `./set-volume` — set device volume (0–100).
- `./skip` — skip to the next or previous track (`direction`, default `next`).
- `./transfer-playback` — move playback to another device.
## Example
```ts
import createPlaylist from 'kody:@kentcdodds/spotify/create-playlist'
import playbackState from 'kody:@kentcdodds/spotify/playback-state'
await createPlaylist({ account: 'family', name: 'Road Trip' })
const state = await playbackState({ account: 'personal' })
```Report this listing
Log in to report this listing.