Building an AI Music Assistant with Spotify & Microsoft Copilot Studio

Published by

on

The Challenge

I wanted to experiment with Model Context Protocol (MCP) – a new way to connect AI assistants to real-world services. Before MCP, building AI integrations was time-consuming and complicated. Each AI platform required custom code, and making changes meant updating everything separately.

The old way:

  • 3-4 weeks to build integrations
  • Different code for each AI platform
  • Constant maintenance and updates
  • Breaking changes affected everything

The question: Could MCP make this simpler?


What I Built

An AI-powered music assistant that lets users talk to Spotify naturally through Microsoft Copilot Studio.

What users can do:

  • “Search for Billie Eilish on Spotify”
  • “What are Taylor Swift’s top songs?”
  • “Analyze the energy and tempo of this track”
  • “Find artists similar to The Weeknd”

The AI understands these questions and automatically calls the right Spotify tools to answer them.


The Solution: Model Context Protocol

Instead of building separate integrations for each AI platform, I built one MCP server that works with any MCP-compatible AI assistant.

What is MCP? Think of it like USB-C for AI – one standard connection that works everywhere.

What I used:

  • Python + FastMCP – To build the MCP server
  • Spotify API – To get music data
  • Azure – To host the server
  • Microsoft Copilot Studio – For the AI assistant interface

The Results

Development Time: Cut from 3-4 weeks to 2 weeks
Code Simplicity: 400 lines vs. 2,000+ lines before
11 Tools Created: Search, analyze, discover music
Zero Maintenance: Automated deployment via GitHub
Works Everywhere: Any MCP-compatible AI can use it

Real Impact:

  • Users can now explore Spotify through natural conversation
  • Complex queries work automatically (the AI chains tools together)
  • Adding new features takes hours instead of days
  • Works seamlessly with Microsoft 365 ecosystem

Key Learnings

1. MCP dramatically simplifies AI integrations One server, one codebase, multiple AI platforms.

2. The right tools matter FastMCP turned what could have been complex into straightforward Python functions.

3. Followed Rafsan Huseynov and Maciek Jarka’s tutorial.


Try It Yourself

📂 GitHub: https://github.com/ifiecas/spotify-mcp
💡 Built with: Python, Azure, Spotify API, Microsoft Copilot Studio

Full technical details, architecture diagrams, and deployment guide available in the repository.



Discover more from Ivy Fiecas-Borjal

Subscribe to get the latest posts sent to your email.

Discover more from Ivy Fiecas-Borjal

Subscribe now to keep reading and get access to the full archive.

Continue reading