by js713-lab
MCP server that watches video footage and returns license-safe BGM matches, hook windows, and ffmpeg ducking specs for agents.
# Add to your Claude Code skills
git clone https://github.com/js713-lab/sonic-match-mcpGuides for using ai agents skills like sonic-match-mcp.
sonic-match-mcp is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by js713-lab. MCP server that watches video footage and returns license-safe BGM matches, hook windows, and ffmpeg ducking specs for agents. It has 153 GitHub stars.
sonic-match-mcp's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/js713-lab/sonic-match-mcp" and add it to your Claude Code skills directory (see the Installation section above).
sonic-match-mcp is primarily written in Python. It is open-source under js713-lab on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh sonic-match-mcp against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Video-native MCP server for license-safe BGM. Watches the footage — not the script — and returns a shortlist, a 12–20s hook, and an ffmpeg ducking spec.
Package / CLI: sonicmatch-mcp. A Model Context Protocol server for Claude Desktop, Cursor, Codex, and other MCP clients. Drop an Instagram Reel, YouTube Short, or TikTok-style clip. Get royalty-free / Creative Commons matches with the license printed on every row.
Video-to-BGM already exists. The wedge is not “I also match music”:
Catalog quality will kill or save this. More tools will not.
Video or URL in
→ scene / mood / pace / speech analysis
→ license-safe BGM shortlist
+ beat/cut hints
+ optional mix preview
Do not treat this as “script in → YouTube Music search out.” That already exists (mcp-bgm-recommender). Sonicmatch watches the video.
| You own | You do not own |
|---|---|
| Local file / public URL ingest | Platform music licenses |
| Mood, energy curve, speech vs silence, scene cuts | Meta/TikTok “trending audio” graph |
| CC / royalty-free catalogs + optional paid adapters | Spotify / IG official libraries |
| Ranked tracks, preview URLs, mix spec, ffmpeg | Auto-publish to Instagram |
North star: ingest_video → analyze_video_music → recommend_bgm → preview_mix → export_mix_spec
examples/user_library.example.json). Do not scrape those sites.I dropped
./clip.mp4. Analyze it for an Instagram Reel and recommend 5 instrumental BGMs. Then mix the top pick with ducking and give me the ffmpeg command.
That prompt is the product. Install below, wire Claude Desktop, Cursor, or Codex, and paste it.
Requires Python 3.10+ and ffmpeg / ffprobe on PATH. yt-dlp is optional and off by default (SONICMATCH_ALLOW_YTDLP=0) because platform extractors break and may violate ToS. Prefer a local file.
The PyPI project is sonicmatch-mcp. The console script is sonicmatch-mcp, which is what uvx and pipx run. python -m sonicmatch is the same server. The PyPI badge stays empty until the first tag is published. Install from git until then. Maintainer steps: PUBLISH.md.
uvx --from git+https://github.com/js713-lab/sonic-match-mcp.git sonicmatch-mcp
pip install git+https://github.com/js713-lab/sonic-match-mcp.git
sonicmatch-mcp --version # or: python -m sonicmatch --version
uvx sonicmatch-mcp
# or
pipx install sonicmatch-mcp
sonicmatch-mcp --version
git clone https://github.com/js713-lab/sonic-match-mcp.git
cd sonic-match-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
cp .env.example .env # optional keys
# stdio (Claude Desktop / Cursor / Codex)
sonicmatch-mcp
# streamable HTTP (web editors). No authentication. Keep it on loopback.
sonicmatch-mcp --http --port 8765
# same clone, uv
uv venv && uv pip install -e ".[dev]"
uv run sonicmatch-mcp
pytest # generates tiny color mp4s with ffmpeg
ruff check src tests
The seed catalog is about 20 Reel-editor rows (cafe, product, talking-head, travel, food, fashion, event) plus a vocal fixture and a CC-BY-NC fixture. It runs without API keys. Gemini, Jamendo, and Freesound are optional and degrade with a note in the tool response. Seed rows have no hosted audio on purpose — preview_mix synthesizes a demo bed. For real ads, point SONICMATCH_LIBRARY_PATH / EPIDEMIC_LIBRARY_PATH / ARTLIST_LIBRARY_PATH at JSON you already licensed.
| Variable | Required | What it does |
|---|---|---|
GEMINI_API_KEY |
no | Gemini video understanding for analyze_video_music |
JAMENDO_CLIENT_ID |
no | Jamendo search |
FREESOUND_API_KEY |
no | Freesound beds and loops |
SONICMATCH_LIBRARY_PATH |
no | User-owned library JSON. Also EPIDEMIC_LIBRARY_PATH, ARTLIST_LIBRARY_PATH |
SONICMATCH_ALLOW_YTDLP |
no | 1 turns on platform URL ingest. Default 0 |
SONICMATCH_MAX_DOWNLOAD_MB |
no | Download cap. Default 200 |
SONICMATCH_HTTP_HOST / SONICMATCH_HTTP_PORT |
no | --http bind. Default 127.0.0.1:8765 |
GEMINI_API_KEY is set; otherwise local ffmpeg / audio heuristics (optional Whisper, PySceneDetect, librosa).asset_id.suggest_cuts snaps scene cuts to a BPM grid and returns EDL-ish intro / peak / outro.brand_kit=… into recommend_bgm.analyze_batch (max 20) clusters mood and returns one shared mini-playlist.| Tool | What it does |
|---|---|
status |
ffmpeg / keys / seed count / day-1 risk gates |
ingest_video |
Local path or HTTPS URL → asset_id (never video bytes). Platform URLs need SONICMATCH_ALLOW_YTDLP=1 |
analyze_video_music |
Mood, energy curve, speech, scenes, hook window, BPM, search queries |
recommend_bgm |
3–7 ranked tracks + why + license + hook in/out |
search_music |
Free-text / BPM / mood over seed + optional catalogs |
get_track |
One track’s metadata, license, attribution, URLs |
preview_mix |
Hook trim, loop, optional ducking → preview files + ffmpeg + mix spec |
export_mix_spec |
Mix spec + ffmpeg + attribution (no render unless render=true) |
suggest_cuts |
Beat grid, snapped scene cuts, EDL, intro / peak / outro |
generate_bed |
Demo bed marked source=generated. Requires i_understand_not_commercially_cleared=true |
save_brand_kit |
Persist BPM / moods / no-vocals for recommend_bgm(brand_kit=…) |
analyze_batch |
Up to 20 clips → mood cluster + shared mini-playlist |
Also ships a prompt template: “Score this video like an IG music sticker.”
speech_coverage > 0.25cuts at 0.8s average, 112 BPM, warm gold hour)Prompt:
I dropped
./clip.mp4. Analyze it for an Instagram Reel and recommend 5 instrumental BGMs. Then mix the top pick with ducking and give me the ffmpeg command.
The agent should call, in order:
ingest_video with the local path. The result is an asset_id, not video bytes.analyze_video_music with platform_hint set to instagram_reel.recommend_bgm with that asset_id and max_results of 5.preview_mix on the top track with ducking, then export_mix_spec.A recommendation row carries score, reason, suggested_in_out (the hook), ducking, license_ok_for_platform, and content_id_risk (unknown or likely, never cleared). Seed fixtures include seed_golden_hour_latte (CC0-1.0) and seed_indie_porch_110 (CC-BY-4.0). They have no hosted audio. preview_mix synthesizes a demo bed. CC-BY-NC rows are searchable and are not auto-recommended.
claude_desktop_config.json. From git, no clone:
{
"mcpServers": {
"sonicmatch": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/js713-lab/sonic-match-mcp.git",
"soni