Music Video CLI logo

Music Video CLI

by aimusicvideogen-com

Local music video toolkit using ffmpeg: BPM, key and Camelot detection, best 15/30 s clip, beat-synced shot lists, Spotify Canvas maker and platform specs.

Install Music Video CLI

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "aimusicvideogen-com-music-video-cli": {
      "command": "npx",
      "args": [
        "-y",
        "github:aimusicvideogen-com/music-video-cli"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y github:aimusicvideogen-com/music-video-cli

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

Tools5

What Music Video CLI lets your agent do. Expand a tool for its parameters.

Self-reported~107 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

9/9 checks healthy over the last 32d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16d ago via OSV.dev · github:aimusicvideogen-com/music-video-cli (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit12d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed5Callable tools this server registers over MCP.

From the project README

aimusicvideogen: free music video tools (CLI + MCP server)

npm license

Small, local tools for musicians and AI music creators who are making a music video for a song:

  • Analyze a song: BPM, musical key, Camelot code, beat and bar length, and the most energetic 15 s and 30 s windows (usually the chorus or drop, the clip you want for TikTok, Reels and Shorts).
  • Plan beat-synced shots: a shot list where every cut lands on a bar line, with a visual idea for each section.
  • Make a Spotify Canvas: turn a video clip or a still image into a silent 1080x1920 MP4 of 3 to 8 seconds.
  • Platform specs: aspect ratio, resolution, length and format for TikTok, Instagram Reels, YouTube Shorts, YouTube and Spotify Canvas.

Everything runs on your machine with ffmpeg. No account, no API key, nothing is uploaded.

It also runs as an MCP server, so Claude, Cursor, Windsurf and other MCP clients can analyze your songs and plan videos for you.

Want the whole video made for you? AIMusicVideoGen turns a song and one photo of the singer into a lip-synced, beat-cut music video. This repo is the free, open-source toolbox that grew out of it.

Install

Requires Node.js 18+ and ffmpeg (brew install ffmpeg, winget install ffmpeg, sudo apt install ffmpeg). If ffmpeg is not on your PATH, set FFMPEG_PATH.

Terminal
npm install -g aimusicvideogen
# or run without installing
npx aimusicvideogen --help

CLI

bash
aimusicvideogen analyze song.mp3
Code
Duration    40.4 s (19 bars)
Tempo       119 BPM  (half 59.3, double 237)
Key         Bb major  (Camelot 6B, relative G minor)
Beat / bar  0.506 s / 2.025 s
Best 15 s   21.5s - 36.5s
Best 30 s   6.5s - 36.5s
bash
# Shot list from a song file, or from numbers
aimusicvideogen plan song.mp3
aimusicvideogen plan --bpm 100 --duration 200 --offset 0.4

# Spotify Canvas from a video (cut 8 s from 0:12) or from an image (slow seamless zoom)
aimusicvideogen canvas clip.mp4 --start 12 --length 8
aimusicvideogen canvas cover.jpg --length 6 --out canvas.mp4

# Specs
aimusicvideogen specs spotify-canvas
aimusicvideogen specs            # all platforms

# Any command: --json for machine-readable output

MCP server

Add it to your MCP client. For Claude Desktop (claude_desktop_config.json), Cursor (.cursor/mcp.json) and most others:

config.json
{
  "mcpServers": {
    "aimusicvideogen": {
      "command": "npx",
      "args": ["-y", "aimusicvideogen", "mcp"]
    }
  }
}

Claude Code:

Terminal
claude mcp add aimusicvideogen -- npx -y aimusicvideogen mcp

Tools

ToolWhat it does
analyze_songBPM, key, Camelot, bar length, duration, best 15 s / 30 s clip of a local audio or video file
plan_music_videoBeat-synced shot list from BPM and duration, optional song structure in bars
make_spotify_canvasSilent 1080x1920 MP4 (3-8 s) from a local video or image
video_specsUpload specs by platform
create_ai_music_videoSteps and link to generate a full lip-synced video from a song and one photo on aimusicvideogen.com

Example prompts:

  • "Analyze ~/Music/demo.mp3 and tell me which 15 seconds to use for TikTok."
  • "Plan a 16:9 music video for this song with a cut on every bar in the chorus."
  • "Make a Spotify Canvas from the first 6 seconds of ~/Videos/teaser.mov."

How it works

  • Tempo: spectral-flux onset envelope, autocorrelation, with the half and double tempo scored together and a mild preference for 120 BPM to settle octave errors. Reported between 70 and 180 BPM by default (minTempo / maxTempo to change).
  • Key: chromagram from a short-time FFT, matched against the Krumhansl-Kessler major and minor profiles.
  • Highlight: the loudest sustained window by RMS energy.

These are estimates. Check the BPM against a tap tempo if a song has tempo changes or a loose groove: free tap tempo, BPM and key finder in the browser.

Related

License

MIT

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Music Video CLI

aimusicvideogen-com/music-video-cli is an MCP server that provides local tools for analyzing songs, planning beat-synced music-video shots, creating Spotify Canvas videos, and checking platform specifications. It runs through ffmpeg on your machine, supports MCP clients such as Claude, Cursor, and Windsurf, and does not require an account, API key, or uploads.

The analyze_song tool detects a song’s BPM, musical key, Camelot code, beat and bar length, duration, and the most energetic 15-second and 30-second windows. It accepts a local audio or video file and returns estimates that can help select clips for TikTok, Instagram Reels, and YouTube Shorts.

The plan_music_video tool creates a beat-synced shot list with cuts aligned to bar lines and a visual idea for each section. It can use a local song file or supplied BPM, duration, and offset values, with optional song structure specified in bars.

Yes, the make_spotify_canvas tool creates a silent 1080x1920 MP4 lasting 3 to 8 seconds. It can use a local video clip, with a selected start time and length, or a still image with a slow seamless zoom.

Add the server with the command npx -y github:aimusicvideogen-com/music-video-cli mcp. For example, configure an MCP server named aimusicvideogen with command npx and arguments ["-y", "github:aimusicvideogen-com/music-video-cli", "mcp"], or use Claude Code’s claude mcp add command.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMusic Video CLI AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/aimusicvideogen-com-music-video-cli?style=directory)](https://allmcps.com/mcp/aimusicvideogen-com-music-video-cli)
HTML Embed
<a href="https://allmcps.com/mcp/aimusicvideogen-com-music-video-cli"><img src="https://allmcps.com/api/badge/aimusicvideogen-com-music-video-cli?style=directory" alt="Music Video CLI on AllMCPs" /></a>