MCP Server Project

Music Generation MCP Server

A local MCP server that generates BGM and Japanese theme songs for webcomic videos.

MCP Server Python ACE-Step 1.5 ComfyUI NumPy Built with Claude
The Product

「セカンドチャンス」

Second Chance

Initially, I used Suno to create the theme song for Reincarnator x Regressor. While I composed the lyrics, the restrictions grated on me. As a free user, I had limited downloads, which meant limited iterations. Apparently, there's a time constraint too. I also didn't own the full song because I didn't have a paid subscription. Make no mistake, Suno is great, but for someone with a limited budget, and considering that my promise to future users was that they wouldn't require additional subscriptions, and could do all this on a single AI subscription, I decided to build a local music generation MCP server.

That would sidestep any licensing issues (even if the music isn't as good as Suno — while I was fairly satisfied with Suno's first attempt, I spent six rounds of listening across nineteen takes before finally settling on this) and additional monetary costs. But you get what you pay for...only, this time, at least you own what you produce without having to pay extra for it.

107 seconds · 150 BPM · B minor · 4/4 · generated locally. Lyrics mine; the vocal is the model's.
Lyrics — 歌詞

Japanese on top, my own English underneath — the same pairing used for the video's dual subtitles.

これは僕の人生のセカンドチャンス
This is my second chance in life.

今度こそ、もう逃さない
This time, for sure, I won't let go.

お願いだ、許してほしい
Please forgive me, I ask of you.

今度こそ償ってみせる
This time, for sure, I'll make amends.

あの時は間に合わなかった
I didn't make it in time back then.

でも、もう繰り返しはしない
But now I won't do it again.

二度と間違えたりしない
I'll never make that mistake again.

どうすればいい?教えてくれ
What should I do? Please tell me.

今度こそ、このセカンドチャンスを掴んで、
This time, for sure, I'll grab this second chance,

もう二度と、君の手を離さないからね
I'll never let go of your hand again.

世界の果てまで、君と共に旅しよう
Let's journey together to the end of the world.

ずっとそばにいて、毎日君を見守るよ
I'll always be by your side, watching over you.

これは僕の人生のセカンドチャンス
This is my second chance in life.

必ず、前世の罪を繰り返さないように
In order to never repeat the sins of my past life,

新しい道を、手を繋いで歩いて行こう
let's walk down this new path, hand in hand.

今度こそ、君を幸せにすると誓うよ
This time, for sure, I swear to make you happy.

「セカンドチャンス」 — words by Tanaka Tomoyuki.

A still from the Reincarnator x Regressor music video the theme song was written for
Background

Webcomic MCP Ecosystem

Prior to this, my ecosystem had servers and skills for producing backgrounds, characters, parallax, video and even translation. The Anime Production skill could certainly add an mp3 to the video I was creating, but he couldn't actually make one.

One of the things I considered when creating the Anime Production skill and MCP server was to avoid relying on paid subscriptions like Kling. Given that the first version of Second Chance was generated by Suno, I always wondered if it was possible for me to develop everything locally. I could do it with characters and videos, so why not music too? It will also allow free users to own the music they produced, without worrying about Suno's terms and conditions.

And so, Claude Code and I went to research on what was possible...and we found ACE-Step as the music's answer to the video's LTX, characters' FLUX and backgrounds' SD1.5 (that said, backgrounds have been upgraded to FLUX now, and look much better, but that's a story for another page).

How It Works

ACE-Step, through ComfyUI

ACE-Step is the only credible open model that has vocals. MusicGen and Stable Audio Open are instrumental-only, which is fine for background music. Unfortunately, given that I composed my own lyrics, I didn't want my efforts to go to waste, so ACE-Step was my only real option. It runs through ComfyUI, which has supported it natively since v0.25, so there's nothing to install but the model weights. That made it a materially easier setup than the local video path, which needed third-party loaders.

The server takes style tags, lyrics, tempo, key, time signature and language, and returns a lossless FLAC to archive plus a 320k MP3 the Remotion pipeline can drop straight in. It also emits a beat grid, so trailer cuts land on downbeats rather than wherever the edit happened to fall. Claude Code seems to think this is a great idea for making videos come to life, so I decided to let him test that out.

This also allowed me to not worry about iterating as many times as I wanted. Not only could I iterate dozens of tracks within the same 5-hour session (admittedly, I'm currently subscribed to the Max plan of Claude Code, so I don't know if it'll burn through a Pro user's 5-hour limit), they were produced in an impressively short amount of time. I think Claude, using my MCP server, produced a 107-second song in about a minute and a half. And that's when he's working on my 6GB VRAM laptop.

What Claude Code learned

The interesting part wasn't the generation — it was working out what the controls do

These are Claude Code's observations from running the sweeps, not mine — I was the one listening and deciding, he was the one keeping track of what the settings actually did.

Why use this?

Infinite iterations...at least, as infinite as your current AI subscription allows

Music is generated locally, at no additional cost (beyond your current AI subscription), and unlimited, with the caveat that it's still constrained by your AI subscription. Obviously — you didn't think generating music wouldn't need tokens, did you?

However, this is still a game-changer. Producing almost twenty iterations of a song across a couple of hours without worrying about my 5-hour limit (again, this is on Max plan, so I can't promise anything for Pro users) or needing to subscribe to a dedicated music AI generator? I'll certainly take that.

Release Notes

What's new

v0.2.0 Beat grids without Node, and a settled theme song

August 6, 2026

  • 🥁 Changed — beat extraction is pure Python now. It was a Node script that shelled out to ffmpeg; it's now NumPy and soundfile, which bundles libsndfile, so neither dependency is needed at all. Same output schema, so it's still a Remotion drop-in. On the winning track: 268 beats, 67 downbeats, a 1.600 s bar — and 67 bars is exactly what the density arithmetic predicted for 107 seconds, which is a nice independent check on the maths above.
  • 📐 Changed — tempo comes from the recipe, not from detection. When a track was generated here, the BPM was an input. Detecting it again can only be worse.
  • 🎼 Added — reference analysis. Measures the BPM and key of any mp3/flac/wav so those parameters come from measurement rather than guesswork. It can't separate relative major/minor pairs — nothing chroma-based can — and says so when it sees one. That limitation is what proved requesting "B minor" returns D major's pitch collection.
  • ✅ Added — approve_track / forget_track. Track ids carry a timestamp so auditioning can't clobber a good take. Approving publishes the winner under a FINAL_ name, which the toolkit's "never delete an approved FINAL_" rule then covers automatically — and forget_track refuses an approved take in code. Worth having: 22 tracks were script-deleted in that same session.
  • 🔒 Fixed — a near-miss, one command before the first push. The .gitignore had an exception to preserve the track manifest — but recipes embed lyrics, and the repo is public, so it would have published my unreleased song text. The output folder is ignored wholesale now, with the reason recorded in the file.

Earlier releases

v0.1.0 First cut — and 6 GB turned out to be enough August 6, 2026
  • 🎤 Six tools — generate a track, generate variations, list and fetch tracks, extract a beat grid, check status. Plus a standalone CLI driver for sweeping settings without MCP in the way.
  • 🧠 ACE-Step 1.5 over 1.0. 1.5 is the bigger download (10.0 GB against 7.7), because it needs two text encoders rather than one. Chosen anyway: it's the only variant with an explicit language input, and Japanese vocals were the whole point. 1.0 has no way to declare a language and infers it from the lyric script.
  • 💾 6 GB is enough — verified, not assumed. The plan said "assume quantisation will be needed." No quantisation exists or is needed; ComfyUI streams the bf16 weights. Peak ~5.9 GB for a two-minute track, no OOM. --lowvram made no measurable difference either way, so it's off.
  • ⏱️ Faster than real time, which inverted the assumption that auditioning would be expensive. Five variations take about nine minutes.
  • 🎧 Both formats from one sampling pass — lossless FLAC to keep, MP3 for the video pipeline. The extra encode is free next to the sampling.
  • 🧪 28 offline checks, no GPU required.
Ecosystem

A growing Webcomic MCP network

This is the newest piece of a wider webcomic and animation toolkit: the Background Generator for backgrounds, the Character & Panel Generator for consistent characters across a webcomic, Novel Translation for translating my novel into other languages, and Anime Production for producing animated videos. In my roadmap, I still have a speech bubble server still to come.

With the Music Generator MCP server, I would like to think I have developed a self-contained, living ecosystem that allows you to do everything on a single AI client. Instead of having to subscribe to multiple AI generators, such as Midjourney, Kling and Suno, and still needing to compile all of the disparate forms of media into a single video or product, I can do it all on Claude Code (and you on your single AI client, whether it's Codex, Antigravity, Kimi or Cursor). That's the objective I set out to achieve, and as more possibilities open up in the future, I'll try to add whatever webcomic artists and web novelists might need to make online storytelling more accessible and efficient.

For everyone's use

Get the server

It's open source (MIT), like the rest of the toolkit. Ask your AI harness to clone the webcomic-toolkit repository and follow the setup docs in music-generation-mcp. You'll need ComfyUI and the ACE-Step weights; there are no custom nodes to install, and a 6 GB card is enough.

View the code on GitHub →