Tailored music recommendations with Claude
I need to streamline my workflow for listening to early modern music.
I like asking Claude for music recommendations based on my mood, the time of day and weather, what I’m doing, and how long I have.
Could you recommend an early Baroque piece, 20-30 minutes long, that would be good to listen to while I’m refactoring some particularly ugly javascript code? It’s mid afternoon and sunny out, and I just sat down with a small cup of coffee and a slice of pie.
For your afternoon coding session with coffee and pie, I'd recommend Heinrich Biber's "Rosary Sonatas" (specifically Sonatas 1-3). This early Baroque gem features intricate violin work with basso continuo that creates a perfect balance of engaging musical patterns without being distracting.
The mathematical precision of Biber's compositions might complement your JavaScript refactoring work, while the sunny atmosphere you described pairs wonderfully with the bright, contemplative nature of these pieces.
The intricate violin techniques alongside the measured continuo create a soundscape that's both mentally stimulating and calming - ideal for the focused work of cleaning up code while enjoying your afternoon coffee and pie.
I’ve found Claude’s recommendations uniformly excellent and the accompanying commentary delightful.1
But I don’t remember to do it nearly as often as I’d like. So I wanted to explore my options for streamlining & codifying this.
Friction points
Before diving in — what actually needs streamlining here? Not much:
The context: I shouldn’t need to tell Claude the current time and weather.
Articulating my preferences: as long as I’m specific, this is unnecessary. Sometimes I don’t want to be so specific. No matter what, Claude must recommend something broadly classical, preferably early modern; must never give me Beethoven or Copland; and should usually lean toward chamber music.
The output: needing to copy + paste the recommendation into a Google or Spotify search is a little annoying.
The existence of this workflow: having to actively remember “Oh, I should ask Claude for a recommendation” creates mental overhead — especially when I'm already in the middle of starting a task and music selection is just one small part of my setup process.
Next I’ll explore a few approaches for building this: a lightweight Claude.ai project, a Model Context Protocol server, and a custom web app.
Making a Claude.ai project
On the Pro plan, Claude.ai lets you create “projects” with reusable context & project instructions. Those then inform every new conversation in the project.
Building a project for this use case is delightfully trivial.
I just need to set the project instructions: I want a music recommendation, here’s my general preferences, and please include a search link at the end.2
This works pretty fantastically well. Claude sticks to the parameters without being too rigid about it, and constructs a correct search link at the end of every reply:
And — thanks to the project-level instructions — Claude knows what I’m asking for even if I start a fresh chat with something as terse as “20 min walk”:
Unfortunately I can’t just click the links; there’s a confirmation dialog first:
But this is honestly an excellent solution, especially for the two minutes it took to get the prompt right. The only downsides are:
I still need to remember to navigate to my project and start a new chat from there, so the mental overhead isn’t gone.3
It doesn’t integrate into an existing conversation — it would be nice to just ask for a contextually-appropriate recommendation midway through a chat, without needing to include that prompt with my general parameters every time.
That confirmation dialog is extremely annoying.
I still need to give it the current date, time, and weather.
Claude will suggest one of Heinrich Biber's “Rosary Sonatas” just a little too often. Oddly, this only happens in the project version.
Installing MCP capabilities
My next step was a Model Context Protocol server for the Claude.ai desktop app. MCP seems extremely well-suited to the specific problems I was left with:
I can provide custom tools — so Claude can autonomously determine my location, look up the weather there, see the current date and time, and generate those search URLs.
I can provide prompt templates with structured inputs — so I can just use some shorthand to plug in my mood and duration & ask for a recommendation.
It’s all fully integrated into every conversation I have!
I built a simple version (available here on Github if you want to try it) … and was very disappointed: the user experience here is actually awful for my use case.
Prompt templates
The MCP spec makes sure to suggest plenty of user interfaces that client applications can implement for prompt templates — slash commands, context menu items, interactive forms, etc.
That sounds good!
Unfortunately, the Claude.ai desktop app currently seems to implement only one UI here, and it’s quite clunky. Prompt templates are treated as attachments:
Just selecting a prompt template requires — by my count — six user interactions:
For all those mouse movements and clicks, you’re rewarded with a highly structured form, containing the parameters you defined in your MCP server:
Tool use
Onto tools!
Since tools plugged in to an MCP server can execute arbitrary code and are autonomously invoked by the AI, the Claude.ai app sensibly puts in a lot of security guardrails. The first time any tool runs in any given chat, you get a warning and have to grant permission:
Unfortunately, the most permission you can grant here is still only “Allow for this chat.” Even when you’ve authored your own totally harmless tool and are running your own MCP server, you cannot give blanket permission for Claude to use the tool forever. So you’ll see a lot of confirmation dialogs!4
Also annoying: the results of a tool-use are hidden by default in a collapsed accordion:
I suppose the thinking here is that — since tool-use results are strictly speaking an input back into Claude — they should be treated as an implementation detail that you’re allowed to see but probably don’t want to. I really dislike this UI choice: it discourages the design of tools whose output is equally interesting to the human user, and it unnecessarily blurs what’s happening when the AI invokes a tool.
Keeping it simple
As an aside: through the process of building this, I realized that I actually did not need any tools at all. The entire thing could just be encapsulated in a prompt template.
When the end user invokes a prompt template and provides inputs, my MCP server can of course run arbitrary code to generate the full prompt, so it can:
Figure out my current location (or rather the MCP server’s current location, but I’m running it on my laptop so it’s all the same)
Figure out the current date and time
Look up the weather
All of that then gets injected into the prompt.
And on the output side, the prompt can just behave like my previous approach’s project instructions: tell Claude to include a search link at the end.
Because of the way the Claude.ai UI asks for permission before using tools and “collapses” tool outputs, this prompt-only approach actually makes for a much better user experience.
Not simple enough
But it’s still not good enough!
I was hoping the MCP prompt templates would be implemented in Claude.ai with some nice lightweight interfaces, integrated with Claude AI for argument extraction — like a /recommend-music 30 minutes elizabethan lute music writing a blog post
slash-command.
Instead — even after eliminating tools — the clunky and overly structured prompt input UI makes this feel like a step backwards from my project-based version.
Building a web app
After suffering through the drawbacks of MCP-in-Claude.ai, Claude and I built a quick Django app for full control over the user experience:
You can try it out here, and the code’s available on Github.
We designed it to be lightweight with minimal maintenance overhead:
Deployed to Vercel
No backend database — everything is persisted only in localStorage
Bring your own API keys
On the front end, on page load and again every five minutes, it uses Geolocation DB to fetch your IP-based approximate location, and then passes that in to OpenWeatherMap for the current weather. That (plus your local date and time from the browser) is automatically injected into a prompt template and sent to the server — which just calls the Claude API and sends back the response.
This is … fine? The UX is pretty much exactly what I want. But there are still tradeoffs:
The mental overhead of deciding to go to this chat interface instead of that one.
Now my chats aren’t all in the same place.
There’s no hope of integrating the workflow into an existing conversation on the Claude.ai interface.
Plus, it feels a little silly to be paying for the API calls here.
Wrapping up
So … which one do I pick?
The Claude project is clunky, but it’s right there.
The MCP server is robustly integrated, but the security guardrails and UI choices in Claude.ai make it totally impractical.
The web app is exactly the user experience I want, but it’s Yet Another Thing and creates a new silo.
In practice I’ve been gravitating toward the Claude project. Even with the UX drawbacks, it’s the only one that’s really habit-forming. Now if I can just polish up those rough edges…
Some other recent exchanges:
Recommend something by Haydn for 7am on a Monday when it's snowy outside, my kids are asleep, and I'm urgently trying to wrap up some work with a looming deadline while I can?
For that precise moment, I'd recommend Haydn's Piano Sonata in C Major, Hob. XVI:50, particularly the first movement (Allegro). It has this bright, purposeful energy that's perfect for focused work, but it's controlled and measured enough that it won't clash with the quiet, snowy morning atmosphere. The clear, logical structure of Haydn's writing can help organize your thoughts while you're racing against that deadline.
The piece has a forward momentum that might help with your urgency, but it's not anxious or stressful - it has that characteristic Haydn clarity and optimism. Since your kids are asleep, you'll appreciate that it doesn't have any sudden dynamic shifts that might wake them.
Could you recommend a late Baroque or early Classical piece, about 10-20 minutes long, chamber music, that would be good background music for a mid afternoon reading a chapter of A Year in Provence (Peter Mayle, 1989) on the couch on the weekend?
I'd recommend Bach's "Brandenburg Concerto No. 5 in D major, BWV 1050." This piece is perfect for your Peter Mayle reading session. The bright D major tonality has a sunny, warm quality that complements a book about Provence, and the interplay between instruments creates a pleasant atmosphere without being distracting.
The first movement has a gentle, flowing quality that evokes a lazy afternoon, while the second movement is more contemplative - perfect for those descriptive passages about Provençal landscapes and cuisine. The final movement returns to a more energetic but still refined character.
The prominent harpsichord part provides a delicate texture that won't compete with your reading focus but will enhance the ambiance of your afternoon relaxation.
My full project instructions are:
I want a music recommendation. I'll give you more details when I ask for it, but here are my preferences in general: unless I say otherwise, make sure the recommendation is broadly classical, preferably early modern; you must never give me (or even mention) Beethoven or Copland; and you should usually lean toward chamber music.
Do not repeat these general preferences in your reply -- do not say anything similar to "based on your preferences for..." or "since you don't like..." -- just engage with the substance of the request and talk about your recommendation.
At the end of your recommendation, please construct a URL to search for your chosen piece on Google Videos using this template: `https://www.google.com/search?tbm=vid&q=YOUR+QUERY`
Amusingly, I discovered that the parenthetical “(or even mention)” was important — otherwise Claude kept saying things like “Telemann's melodic style offers a refreshing alternative to Beethoven or Copland” even after the second paragraph eliminated more general over-explanation.
Richard Weiss has written a script to suppress these confirmation dialogs for a set of safe “trusted tools” that you specify. You’d need to run this script in the Developer Tools console every time you restart the Claude.ai desktop app, but then could just forget about it for as long as it’s running. I haven’t tried this yet but it seems useful!