feat: Spotify integration (Client Credentials / API key auth)#652
Merged
harshithmullapudi merged 2 commits intomainfrom Mar 23, 2026
Merged
feat: Spotify integration (Client Credentials / API key auth)#652harshithmullapudi merged 2 commits intomainfrom
harshithmullapudi merged 2 commits intomainfrom
Conversation
Adds a new Spotify integration following the existing resend pattern
(api_key auth with multiple fields).
Changes:
- integrations/spotify/: new integration package
- account-create.ts: validates client_id + client_secret via Spotify
Client Credentials token endpoint; stores credentials in config
- index.ts: SpotifyCLI with api_key auth spec (client_id + client_secret fields)
- mcp/index.ts: 8 MCP tools — search_tracks, get_track, search_artists,
get_artist, get_artist_top_tracks, search_albums, get_album, get_album_tracks
- apps/webapp/app/components/icons/spotify.tsx: Spotify SVG icon
- apps/webapp/app/components/icon-utils.tsx: register spotify icon
- docs/toolkit/spotify.mdx: integration setup and usage documentation
No OAuth user flow; access is limited to the public Spotify catalog.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2c52d6a to
ed31c49
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
resendAPI-key patternChanges
integrations/spotify/integrations/spotify/src/account-create.tsclient_id+client_secretinconfigintegrations/spotify/src/index.tsSpotifyCLIwithapi_keyauth spec (two fields: Client ID, Client Secret)integrations/spotify/src/mcp/index.tssearch_tracks,get_track,search_artists,get_artist,get_artist_top_tracks,search_albums,get_album,get_album_tracksapps/webapp/app/components/icons/spotify.tsxapps/webapp/app/components/icon-utils.tsxspotifyinICON_MAPPINGdocs/toolkit/spotify.mdxAuth pattern followed
Mirrors
resendintegration exactly:```typescript
auth: {
api_key: {
fields: [
{ name: 'client_id', label: 'Client ID', ... },
{ name: 'client_secret', label: 'Client Secret', ... },
],
},
},
```
`account-create.ts` calls `POST https://accounts.spotify.com/api/token\` (Client Credentials grant) to validate credentials before saving, identical in structure to how `resend` validates its API key.
Credential storage
`config: { client_id, client_secret }` — stored in `IntegrationAccount.config` via the standard `{ type: 'account', data: { ... } }` return, consistent with all other integrations.
MCP tools (8 total)
`search_tracks` · `get_track` · `search_artists` · `get_artist` · `get_artist_top_tracks` · `search_albums` · `get_album` · `get_album_tracks`
Each tool fetches a fresh access token (Client Credentials) before calling the Spotify Web API — tokens are short-lived (1 h) and not persisted.
Test plan
🤖 Generated with Claude Code