Skip to main content
Glama

Moodify

A Spotify MCP server with a personal recommendation engine. Control Spotify and discover music tailored to your evolving taste profile — all through Claude.

Also powers the Moodify Remote Even Realities G2 plugin (Spotify control from your smart glasses + R1 ring).

Deploy in 5 minutes

Option A — Railway (no VPS needed, free tier available)

Deploy on Railway

  1. Click the button → sign in to Railway → Deploy

  2. Set environment variables in Railway dashboard:

    • SPOTIFY_CLIENT_ID — from developer.spotify.com

    • SPOTIFY_REDIRECT_URI — your Railway app URL + /auth/callback (e.g. https://moodify-xxx.railway.app/auth/callback)

    • MCP_API_KEY — run openssl rand -hex 32 to generate one

  3. Add the redirect URI to your Spotify app settings

  4. Visit https://your-app.railway.app/auth/login to link your Spotify account

  5. Done — use the URL and MCP_API_KEY in Moodify Remote

Option B — Self-hosted VPS (full control)

git clone https://github.com/yannrapaport/moodify
cd moodify
./scripts/install.sh

The install script sets up Docker + Caddy with HTTPS automatically.

Related MCP server: Spotify MCP Server

Features

  • Surprise Me — plays a track based on your taste profile and queues more in the background

  • Taste profile — learns from thumbs-up/down ratings using audio features (energy, valence, danceability, acousticness, tempo)

  • Mood context — adjust recommendations with natural language ("something chill", "upbeat workout")

  • Exclusions — block artists, genres, or tracks from recommendations

  • Full Spotify control — playback, queue, search, playlists, library

  • OAuth PKCE — no client secret required, intentionally secret-free

Architecture

  • TypeScript / Node.js 20, Hono HTTP framework

  • MCP transport: WebStandardStreamableHTTPServerTransport

  • Spotify SDK: @spotify/web-api-ts-sdk

  • DB: better-sqlite3 (5 tables: tokens, feedback, audio features cache, artist genres cache, exclusions)

Setup

1. Create a Spotify app at developer.spotify.com with redirect URI http://localhost:3000/auth/callback.

2. Configure environment:

SPOTIFY_CLIENT_ID=your_client_id
SPOTIFY_REDIRECT_URI=http://localhost:3000/auth/callback
PORT=3000

3. Run:

npm install
npm run dev

4. Authenticate: visit http://localhost:3000/auth/login in your browser.

5. Connect Claude Code:

{
  "mcpServers": {
    "moodify": {
      "type": "http",
      "url": "http://localhost:3000/mcp"
    }
  }
}

Docker

docker compose up -d

Development

npm test        # run 22 unit tests
npm run build   # compile TypeScript

Support

If Moodify is useful to you, you can support its development on Patreon. It covers the VPS that runs the demo instance and helps me keep building open-source tools in my spare time.

License

MIT — © Yann Rapaport

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with Spotify through natural language for music discovery, playback control, library management, and playlist creation. Supports searching for music, controlling playback, managing saved tracks, and getting personalized recommendations based on mood and preferences.
      5
      ISC
    • F
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to control Spotify playback, search for music, manage playlists, and access library information through the Spotify API. Requires Spotify Premium for playback control features.
      4
      -
    • F
      license
      B
      quality
      C
      maintenance
      Enables AI assistants to control Spotify playback, search the catalog, and manage playlists and liked songs through natural language. Supports reading currently playing tracks, queues and devices, plus play, pause, skip, queueing, volume control, and playlist creation and editing.
      30
      -