Mute the Volume
README.md
# Mute the Volume
An open-source MCP server and live editor that lets your AI agent (Claude, Claude Code, Cursor, Codex, ChatGPT…) build **TikTok slideshows (9:16)** and **Instagram carousels (4:5)** while you watch.
You describe the slideshow → the agent creates it from a template, edits it slide by slide, renders it to check its own work, and you see every change land in the browser editor in real time. Then you tweak by hand or download the PNGs.
## Quick start
```bash
git clone https://github.com/jacknemdigital/mute-the-volume && cd mute-the-volume
npm install
npm run seed # optional: starter image packs (no keys needed)
npm start # editor at http://localhost:3333, MCP at http://localhost:3333/mcp
```
Connect your agent:
```bash
# Claude Code (HTTP)
claude mcp add --transport http mute-the-volume http://localhost:3333/mcp
```
```jsonc
// Cursor / Codex / Claude Desktop / any stdio client
{
"mcpServers": {
"mute-the-volume": { "command": "npx", "args": ["tsx", "/abs/path/to/mute-the-volume/src/stdio.ts"] }
}
}
```
The stdio entry also starts the editor on :3333 (or shares it with an already-running `npm start`: both watch the same `data/` directory).
**claude.ai / ChatGPT connectors** need a public HTTPS URL. Expose the server with a tunnel (`cloudflared tunnel --url http://localhost:3333`, `ngrok http 3333`) and set `MUTE_URL` to that address so editor links resolve. There's no auth yet — don't leave a tunnel open.
Then ask:
> Use Mute the Volume to make a 7-slide TikTok slideshow about why my app beats spreadsheets. Render it and show me before you say it's done.
## MCP tools
| tool | what it does |
| --- | --- |
| `get_editor_guide` | The manual: canvases, every layer field, fonts, ops, what makes a good slideshow |
| `list_templates` | Starter templates |
| `create_slideshow` | New slideshow from a template (optionally with ops applied immediately) |
| `get_slideshow` | Full doc, or `summary` / `ids` views for large decks |
| `edit_slideshow` | Up to 40 ops, applied atomically; optional `base_revision` for optimistic concurrency |
| `list_packs` / `get_pack` | The image library: aesthetic packs, with previews the agent looks at to match photos to each slide |
| `create_pack` / `add_to_pack` | Build packs from photo search, a local folder, URLs, or (opt-in, your own Apify token) Pinterest |
| `apply_pack` | Fast path: a different photo from one pack on every slide |
| `search_images` | Image search across the web (Serper/Brave/Google with keys), stock (Pexels/Unsplash) or Openverse (no key); returns previews the agent looks at + URLs |
| `set_text_style` | One text look for the whole deck; `random` for a different one |
| `render_slideshow` | PNGs of up to 6 slides + issues: broken images, glyphs no font can draw, substituted fonts, text auto-fit shrank or that overflows |
| `export_slideshow` | Zip of full-size PNGs on disk + download URL |
| `list_slideshows`, `delete_slideshow` | Housekeeping |
## How it works
```
agent ──MCP──▶ edit_slideshow(ops) ──▶ applyOps (atomic, zod-validated) ──▶ data/slideshows/<id>.json
│ revision++
browser editor ◀── SSE "revision N" ◀── EventEmitter / fs.watch ◀──────────┘
│ GET /api/slideshows/:id/slides/:n.svg
▼
satori (layout + text) ──▶ SVG ──▶ resvg ──▶ PNG (one renderer, so what the agent sees is what you see)
```
- **Document model** (`src/model.ts`): slideshow → slides → layers. Layer types: `text`, `image`, `shape`, `fade` (gradient scrim). Pixel coordinates on a 1080-wide canvas.
- **Ops** (`src/ops.ts`): `add_slide`, `duplicate_slide`, `delete_slide`, `move_slide`, `set_slide_background`, `set_slide_layers`, `add_layer`, `update_layer`, `duplicate_layer`, `delete_layer`, `move_layer`. The editor UI uses the exact same ops as agents.
- **Templates** (`src/templates.ts`) are just pre-written op scripts. Add one by appending to the array.
- **Auto-fit** (`src/render.ts`): text is measured with the real font metrics (opentype.js) and binary-searched down until it fits its box.
- **Fonts**: TikTok Sans (TikTok's own open-source typeface), Inter, Montserrat, Poppins, Anton, Bebas Neue and Playfair Display ship via `@fontsource`; emoji render with Twemoji. Add more in `src/fonts.ts`.
- **Text styles** (`src/styles.ts`): every new slideshow gets a random deck-wide look (classic outline, native box, bold headline, yellow caption, quiet minimal, serif editorial…) that all its text inherits. Consistent within a deck, different across decks. Shuffle in the editor or with `set_text_style`.
- **TikTok-native text**: `background_style: "lines"` draws a rounded box behind each wrapped line, like TikTok's in-app text tool. Classic white-with-outline captions use `stroke`/`shadow`.
- **Image packs** (`src/library.ts`): photos grouped by aesthetic (Cozy Indoor, Dark and Moody, Gym…) in `data/library/<pack>/`. One pack per slideshow keeps every slide looking like the same post, which is the TikTok slideshow look. `npm run seed` builds 8 starter packs locally; images live in your local `data/`, never in the repo (a takedown notice on a repo disables the whole repo). Drop your own photos in with the editor's Library tab or `add_to_pack { folder }`.
- **Images**: any URL, upload, or `search_images` result. Everything is normalized with sharp (WebP/AVIF, EXIF rotation, max 2160px) and cached in `data/cache`, so slides keep rendering if a source disappears.
- **Storage**: JSON files in `data/` (override with `MUTE_DATA`). Swap `src/store.ts` for Postgres/SQLite when you need multi-user.
## Config
| env | default |
| --- | --- |
| `PORT` | `3333` |
| `MUTE_URL` | `http://localhost:$PORT`, the public base used in links |
| `MUTE_DATA` | `./data` |
| *(none)* | **No keys needed.** Image search uses DuckDuckGo images by default (the whole web, Pinterest included). It's unofficial, so if it's rate-limited or breaks, search falls back to the next source |
| `SERPER_API_KEY` | optional, Google Images (whole web incl. Pinterest), best for the TikTok look. Free credits at serper.dev |
| `BRAVE_API_KEY` | optional, Brave image search. Free tier at brave.com/search/api |
| `GOOGLE_CSE_KEY` + `GOOGLE_CSE_ID` | optional, Google Custom Search image search |
| `PEXELS_API_KEY` | optional, free at pexels.com/api, clean stock photos |
| `UNSPLASH_ACCESS_KEY` | optional, free at unsplash.com/developers |
| `IMAGE_SOURCES` | optional, provider order, default `web,serper,brave,google,pexels,unsplash,openverse` |
| `APIFY_TOKEN` | optional, enables Pinterest import into packs |
| `APIFY_PINTEREST_ACTOR` | optional, defaults to `fatihtahta/pinterest-scraper-search` |
## Development
```bash
npm run dev # server with reload
npm run typecheck
npm test # renders every template in both formats, checks atomic ops, drives the MCP server over HTTP
npx tsx test/demo.ts out/ # builds a real 4-slide photo slideshow (needs network)
npx tsx test/web-search.ts # checks keyless web image search end to end (needs network)
```
## Roadmap / good first PRs
- Auth + workspaces (API keys, OAuth for remote MCP connectors)
- Scheduling / posting (TikTok Content Posting API)
- AI image generation tool, background removal / subject cut-outs
- Brand kits (colors, fonts, logo) applied across a deck
- Font upload, non-Latin scripts
- Undo/redo history in the editor (revisions are already numbered)
## License
MIT
Bundled assets keep their own licenses: fonts are SIL Open Font License (via Fontsource), emoji graphics are Twemoji (CC-BY 4.0, © Twitter/X and contributors).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues