Provides voice synthesis capabilities to generate audio responses using ElevenLabs text-to-speech API for mood-based interactions.
Enables LLM-powered mood classification and natural language processing for analyzing user messages.
Fetches curated playlists based on detected user mood using Spotify's API to provide personalized music recommendations.
Handles inbound and outbound WhatsApp/SMS messages through webhook integration, enabling message-based interactions with mood detection and playlist delivery.
Processes WhatsApp messages to detect user mood and respond with personalized playlists, quotes, and optional voice notes.
Mood-Based Music & Quote MCP Server
An MCP-style server that reacts to WhatsApp/SMS messages: it classifies the user's mood, fetches a curated Spotify playlist, adds a motivational/funny quote, and can optionally deliver a voice note (ElevenLabs). Includes Twilio webhook for inbound WhatsApp and simple MCP endpoints for tool calls.
Quick start
Install deps
Copy env template
Fill in Spotify client credentials, Twilio (for WhatsApp/SMS), and optional ElevenLabs + OpenAI.
Run dev server
Endpoints
GET /healthz– health checkGET /mcp/tools– list available toolsPOST /mcp/call– invoke a tool:{ "name": "run_mood_flow", "input": { "to": "whatsapp:+1...", "text": "I feel stressed", "includeVoice": false } }POST /webhooks/twilio– Twilio WhatsApp/SMS webhook; echoes back playlist + quote
Tools exposed
detect_moodget_playlistget_quotesynthesize_voice(if ElevenLabs configured)send_messagerun_mood_flow(end-to-end orchestration)
Notes
Voice replies require hosting the MP3 somewhere accessible; the current stub generates audio but does not upload it. Add an object-store upload to send
MediaUrlwith Twilio.Mood classification defaults to a keyword heuristic; plug in an LLM if desired.
MCP shape here is HTTP-based for simplicity; can be adapted to an MCP transport.