Skip to main content
Glama
analyze-now-playing.ts918 B
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; export function registerAnalyzeNowPlayingPrompt(server: McpServer) { server.registerPrompt( "analyze_now_playing", { title: "Analyze Current Track", description: "Analyze what's currently playing and get recommendations for similar music" }, async () => { const promptText = `Please analyze what I'm currently listening to on Spotify: 1. Use get_playback_state to see what's playing now 2. Search for the artist to get more context about their music 3. Use get_recommendations with the current track as a seed 4. Suggest 5-7 similar tracks I might enjoy and explain why they're good matches`; return { messages: [ { role: "user", content: { type: "text", text: promptText, }, }, ], }; } ); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nicklaustrup/mcp-spotify'

If you have feedback or need assistance with the MCP directory API, please join our Discord server