<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Auteo Team</title>
    <description>The latest articles on DEV Community by Auteo Team (@auteoteam).</description>
    <link>https://dev.to/auteoteam</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4260097%2Fc0b62f5a-4b45-4d62-8987-b928f0c93ea7.png</url>
      <title>DEV Community: Auteo Team</title>
      <link>https://dev.to/auteoteam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/auteoteam"/>
    <language>en</language>
    <item>
      <title>Generate a lofi track from Claude Code with an MCP server</title>
      <dc:creator>Auteo Team</dc:creator>
      <pubDate>Mon, 23 Nov 2026 08:46:10 +0000</pubDate>
      <link>https://dev.to/auteoteam/generate-a-lofi-track-from-claude-code-with-an-mcp-server-7ji</link>
      <guid>https://dev.to/auteoteam/generate-a-lofi-track-from-claude-code-with-an-mcp-server-7ji</guid>
      <description>&lt;p&gt;Most coding sessions end up with the same small distraction: you want low-key instrumental music in the background, or a quick 60-second lo-fi loop for a product demo, and suddenly you are ten tabs deep into stock audio sites checking license restrictions.&lt;/p&gt;

&lt;p&gt;If you already spend most of your day in Claude Code, you can wire up an MCP server once and generate an original instrumental track straight from your terminal. In this walkthrough, we will connect &lt;a href="https://auteo.ai/mcp" rel="noopener noreferrer"&gt;the Auteo MCP server&lt;/a&gt; to Claude Code, inspect the setup with the CLI fallback, and run a concrete lo-fi hip hop prompt through the open-source YuE2 model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why generate audio from the terminal?
&lt;/h2&gt;

&lt;p&gt;When you are building a demo video, a game prototype, or a coding stream overlay, leaving your editor to hunt for background music breaks flow. Putting music generation behind Model Context Protocol (MCP) turns it into a repeatable tool call:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Prompts stay versioned&lt;/strong&gt; alongside your project assets or video scripts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You get deterministic metadata&lt;/strong&gt; — exact prompt text, model ID, duration, and output file path.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No local GPU setup is required.&lt;/strong&gt; Open-source song models like YuE2 normally demand substantial VRAM and environment setup if you self-host them locally. Calling them over MCP lets Claude Code submit the job and return the finished MP3.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 1: Create an API key
&lt;/h2&gt;

&lt;p&gt;The Auteo MCP endpoint uses Streamable HTTP with Bearer token authentication. Before adding it to Claude Code, generate an API key from your Auteo account settings (&lt;code&gt;https://auteo.ai/me/settings#api-keys&lt;/code&gt;) and export it in your shell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;AUTEO_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_api_key_here"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keeping the token in an environment variable prevents it from leaking into project-level config files if you commit &lt;code&gt;.mcp.json&lt;/code&gt; to Git.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Register the MCP server in Claude Code
&lt;/h2&gt;

&lt;p&gt;Run the built-in &lt;code&gt;claude mcp add&lt;/code&gt; command to attach the remote endpoint over HTTP:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add --transport http auteo https://auteo.ai/api/mcp \
  --header &lt;span class="s2"&gt;"Authorization: Bearer ${AUTEO_API_KEY}"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify that Claude Code sees the server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see &lt;code&gt;auteo&lt;/code&gt; listed with transport &lt;code&gt;http&lt;/code&gt; and URL &lt;code&gt;https://auteo.ai/api/mcp&lt;/code&gt;. If you prefer configuring it in &lt;code&gt;~/.claude.json&lt;/code&gt; or a project-scoped &lt;code&gt;.mcp.json&lt;/code&gt;, the equivalent entry looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"auteo"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"http"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://auteo.ai/api/mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"headers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;"Authorization"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Bearer ${AUTEO_API_KEY}"&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Optional: CLI fallback with &lt;code&gt;@auteo/cli&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;If you want to script batch generations in a Makefile or CI job outside of an interactive Claude Code session, you can install the official CLI package instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i -g @auteo/cli
auteo auth login
auteo account
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also run it one-off without a global install via &lt;code&gt;npx @auteo/cli&lt;/code&gt;, and install the companion agent skills with &lt;code&gt;npx skills add AuteoAI/skills&lt;/code&gt; so Claude Code knows the exact parameter conventions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Write a structured lo-fi prompt for YuE2
&lt;/h2&gt;

&lt;p&gt;Open-source music models respond best when you separate &lt;strong&gt;instrumentation&lt;/strong&gt;, &lt;strong&gt;groove&lt;/strong&gt;, &lt;strong&gt;texture&lt;/strong&gt;, and &lt;strong&gt;tempo&lt;/strong&gt; rather than writing vague adjectives like "chill vibes."&lt;/p&gt;

&lt;p&gt;In our 10-genre practitioner benchmark of YuE2 (you can explore the audio files and logs on the &lt;a href="https://auteo.ai/models/yue2" rel="noopener noreferrer"&gt;YuE2 model page&lt;/a&gt; or download the raw CSV and MP3s from the &lt;a href="https://huggingface.co/datasets/auteo/yue2-music-samples" rel="noopener noreferrer"&gt;open YuE2 sample dataset on Hugging Face&lt;/a&gt;), we used the following instrumental prompt titled &lt;strong&gt;"Desk Lamp"&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Instrumental lo-fi hip hop, soft electric piano chords, dusty muted drums, mellow bass, light vinyl crackle, around 78 BPM.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice three deliberate choices in that prompt:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;"Instrumental"&lt;/strong&gt; explicitly suppresses lead vocals so the track does not compete with voiceovers or your own thoughts while coding.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Specific instrument roles&lt;/strong&gt; ("soft electric piano chords", "dusty muted drums", "mellow bass") anchor the arrangement instead of leaving timbre up to chance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tempo and surface texture&lt;/strong&gt; ("light vinyl crackle, around 78 BPM") lock in the classic lo-fi pocket.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 4: Ask Claude Code to generate the track
&lt;/h2&gt;

&lt;p&gt;Start Claude Code in your workspace and pass the prompt directly in plain English:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Use the Auteo MCP server to generate an instrumental music track with the YuE2 model.
Title: Desk Lamp
Style: Instrumental lo-fi hip hop, soft electric piano chords, dusty muted drums, mellow bass, light vinyl crackle, around 78 BPM.
Instrumental: true
Save the resulting MP3 to ./assets/audio/desk-lamp-lofi.mp3.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Claude Code will discover the music generation tool exposed by the MCP server, submit the request to YuE2 (&lt;code&gt;m-a-p/yue2&lt;/code&gt;), poll until rendering completes, and download the MP3 locally.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the output actually looks like
&lt;/h2&gt;

&lt;p&gt;Here is the real run log from our benchmark execution of this exact "Desk Lamp" prompt on YuE2:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Observed Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Model&lt;/td&gt;
&lt;td&gt;YuE2 (&lt;code&gt;m-a-p/yue2&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prompt ID&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;lofi&lt;/code&gt; ("Desk Lamp")&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Instrumental&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;true&lt;/code&gt; (no lead voice)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output Duration&lt;/td&gt;
&lt;td&gt;69 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;End-to-End Time&lt;/td&gt;
&lt;td&gt;36 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output Format&lt;/td&gt;
&lt;td&gt;MP3 (&lt;code&gt;lofi.mp3&lt;/code&gt;, ~2.76 MB)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;When we reviewed the rendered audio against a three-point checklist:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;No lead voice:&lt;/strong&gt; Passed — cleanly instrumental from start to finish.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Soft keys and dusty drum groove:&lt;/strong&gt; Passed — warm Rhodes-style electric piano chords layered over a restrained, slightly swung beat.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Faint vinyl texture:&lt;/strong&gt; Passed — subtle crackle sits underneath without muddying the low end.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One practical note on latency: when the queue is clear, a ~69-second YuE2 track completes in roughly 36 seconds end-to-end. Under heavier queue load on a single self-hosted GPU, longer tracks (such as a 2-minute cinematic orchestral piece or a nearly 4-minute rock song) can take several minutes. Keeping instrumental background loops around 60–90 seconds gives the fastest turnaround for rapid iteration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tips for iterating in Claude Code
&lt;/h2&gt;

&lt;p&gt;Once the MCP server is connected, a few small habits make audio generation much smoother:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Store prompts in JSON.&lt;/strong&gt; Keeping a &lt;code&gt;prompts.json&lt;/code&gt; file in your repo lets you ask Claude Code to regenerate a track with a single tweak — for example, bumping tempo from &lt;code&gt;78 BPM&lt;/code&gt; to &lt;code&gt;84 BPM&lt;/code&gt; or swapping electric piano for acoustic guitar.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check loudness before dropping into a video.&lt;/strong&gt; Run a quick &lt;code&gt;ffmpeg&lt;/code&gt; loudness normalization pass (&lt;code&gt;-af loudnorm=I=-16:TP=-1.5:LRA=11&lt;/code&gt;) so your generated background loop sits evenly under narration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify vocals vs. instrumental flags.&lt;/strong&gt; Always specify &lt;code&gt;instrumental: true&lt;/code&gt; (and mention "Instrumental" at the start of the style description) whenever you need voiceover-safe background music.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;Wiring an MCP server into Claude Code turns background music from a manual browsing chore into a single reproducible command. With YuE2 available through the same endpoint you already use from your terminal, you can draft, audition, and save custom lo-fi tracks in under a minute without ever leaving your editor.&lt;/p&gt;

</description>
      <category>music</category>
    </item>
  </channel>
</rss>
