Skip to main content
Glama
README.md
<div align="center">

<picture>
  <source media="(prefers-color-scheme: light)" srcset="assets/brand/banner-light.svg">
  <!-- npmjs ignores <picture>/<source> and renders this <img> directly. -->
  <img src="assets/brand/banner-dark.svg" alt="Inspiring Agent MCP — a local-first taste library for AI agents" width="100%">
</picture>

# INSPIRING AGENT MCP

### Give your AI agent taste.

![npm version](https://img.shields.io/npm/v/%40swastiksinghdev%2Finspiring-agent-mcp)
![license](https://img.shields.io/badge/license-MIT-3E6FB0)
![tools](https://img.shields.io/badge/29-MCP%20tools-E8805F)
![privacy](https://img.shields.io/badge/local--first-no%20telemetry-8A8A8A)

**Local-first · no account · no telemetry · no startup call · HTTP + stdio**

</div>

---

## 1. Before / after

Agents don't have taste. You do. Inspiring Agent MCP gives an agent a durable memory of the references you love, the folders you put them in, and *why* they matter — so its work starts from your eye.

The frame pass is a good example. Here is the **same 1:12 reference film**, read before and after the coverage-balanced key-frame change:

| | Before | After |
| :--- | :--- | :--- |
| Key-frame span | 11 frames, all from **0:06–0:13** | 11 frames spread **0:03.6–1:03.0** |
| Labels | tiny, hard to read | `#NN m:ss.s CUT\|BEAT\|CHECK` |
| Context | no overview | header + coverage timeline + legend |
| Other moments | re-run analysis to see them | `atSec` and `startSec`/`endSec` compose a sheet from cached frames |
| Fit check | eyeball the draft | measured `cutGrid` + `check_my_edit` as a hard gate |

The numbers above are the measured before/after on one real reference item (the Anthropic IPO launch), used here as an illustrative story — not a benchmark or a promise about other films. Nothing is regenerated on read: analysis artefacts are cached once, and `npm run rebuild:sheets -- --all` is the explicit way to refresh existing caches.

![Item detail with key frames and sound map](web/public/assets/screenshots/03-item.png)

---

## 2. 60-second quickstart

```bash
npx @swastiksinghdev/inspiring-agent-mcp
# dashboard    → http://localhost:4747
# MCP endpoint → http://127.0.0.1:4747/mcp
```

1. Open `http://localhost:4747`. First run walks you through choosing a library folder, naming categories, adding one reference and copying a connect snippet.
2. Connect your agent with one of the snippets below (or point it at the HTTP endpoint).
3. In a new chat, say **"Use my taste profile"** — the agent loads the `use_my_taste` prompt, which tells it to read taste first and follow the director loop.

Prefer an agent that only speaks stdio? `npx @swastiksinghdev/inspiring-agent-mcp --stdio` starts the shared server if it isn't already running, then proxies stdio to it. There is still only **one** server: it owns the library, and every bridge and agent connects to it.

![Library home](web/public/assets/screenshots/01-home.png)

---

## 3. Connect your agent

Config formats are verified only where stated. Anything marked "needs verification" is deliberately not printed as a guess — see `docs/clients.md` and the client's own documentation. This follows research note U-01.

### Preferred setup: use the bundled Editor agent as your main agent

The `editor-agent/` kit in this repository is a ready-made **primary OpenCode agent** for video work. It builds HyperFrames compositions (HTML + GSAP), starts from `templates/launch-film/`, and follows the bundled style, motion, sound and QA skills. Connect it to this MCP server and it reads your taste profile, folders and references before making anything.

Requirements: Node.js 22+, FFmpeg, and Chrome for local rendering.

```bash
cd editor-agent
bash scripts/setup.sh      # checks prerequisites and installs the official HyperFrames skills
opencode --agent editor    # or press Tab in the TUI and choose "editor"
```

Use `bash install.sh --global` instead to install the agent and skills into `~/.config/opencode/` for every project. Put footage in `assets/footage/`, audio in `assets/audio/`, fonts in `assets/fonts/` and logos in `assets/logos/`, then ask Editor for a film in plain language. Its style reference is `editor-agent/reference/style-analysis.md`.

With the MCP entry below connected, Editor can call `get_taste_profile`, `get_folder`, `get_item_image`, `get_edit_plan`, `get_item_audio`, `get_motion` and `check_my_edit` on your references. The starter template was checked with `npx hyperframes lint` (0 errors); a full render still needs Chrome on your machine. This is the recommended path — other clients below work, but this agent is built around the taste workflow.

<details open>
<summary><b>OpenCode 2.x — verified</b></summary>

Verified on OpenCode 2.3.2: MCP servers live under `mcp.servers`, and `type` is required. Local entry (auto-starts the server):

```json
{
  "mcp": {
    "servers": {
      "inspiring-agent": {
        "type": "local",
        "command": ["npx", "-y", "@swastiksinghdev/inspiring-agent-mcp", "--stdio"]
      }
    }
  }
}
```

If the server is already running, use remote HTTP instead:

```json
{
  "mcp": {
    "servers": {
      "inspiring-agent": {
        "type": "remote",
        "url": "http://127.0.0.1:4747/mcp"
      }
    }
  }
}
```

Use `127.0.0.1`, not `localhost`: some machines resolve `localhost` to IPv6 first while the server binds IPv4 only. Check registration with `opencode mcp list`. On Windows, running from this repository before publishing, spawning `npx` directly can fail — use `["node", "node_modules/tsx/dist/cli.mjs", "src/cli.ts", "--stdio"]`.

</details>

<details>
<summary><b>Claude Code — config format needs verification</b></summary>

The Claude Code MCP config shape was not verified in this pass (U-01). See `docs/clients.md` for the current snippet and confirm it against Anthropic's documentation before pasting it. The endpoint itself is the same for every client: `http://127.0.0.1:4747/mcp` (Streamable HTTP).

</details>

<details>
<summary><b>Claude Desktop — config format needs verification</b></summary>

Claude Desktop is a stdio-only client, so it uses the bridge (`npx -y @swastiksinghdev/inspiring-agent-mcp --stdio`). The exact JSON envelope and key names were not verified here (U-01); see `docs/clients.md` and the client's docs. Do not use a snippet from an older tutorial without checking it.

</details>

<details>
<summary><b>Cursor — config format needs verification</b></summary>

Cursor's MCP config shape was not verified in this pass (U-01). See `docs/clients.md`; the endpoint to connect is `http://127.0.0.1:4747/mcp`.

</details>

<details>
<summary><b>Windsurf — config format needs verification</b></summary>

Windsurf's MCP config shape was not verified in this pass (U-01). See `docs/clients.md`; the endpoint to connect is `http://127.0.0.1:4747/mcp`.

</details>

Whichever client you use, the handshake tells the agent to call `get_taste_profile` first, then `get_folder`, then `get_item`, and to log usage when it uses a reference.

---

## 4. taste.md and inheritance

Folders on disk mirror categories in the dashboard. **Every** folder, including the root, has a `taste.md`. When an agent reads a folder, the server merges the chain **root → parent → child**, labelled per level, so global rules and category-specific rules arrive together.

Copy this into any `taste.md` (these are the exact four headings):

```md
# Taste: {{folder name}}

## What I like here
-

## What I dislike
-

## Rules for the agent
-

## Keywords
```

A short **why I like it** on each item matters more than a long description — many free models cannot see images, so your words are the fallback. `item.json` sidecars keep metadata portable and readable in Finder or Explorer.

![Taste cascade: root → parent → child](docs/img/taste-cascade.svg)

![Folder view with the taste editor](web/public/assets/screenshots/02-folder.png)

---

## 5. The six-step director loop

The `use_my_taste` prompt gives agents this sequence. **Before step 1, ask the user which feeling they want** — calm and prestigious, punchy and urgent, warm and human, or mysterious. Measurements cannot tell you what a person feels.

1. **`get_taste_profile`** → global taste and the folder tree with counts.
2. **`get_folder`** → the matching category, its inherited taste chain and item summaries.
3. **`get_item_image` / `get_item_audio`** → contact sheet, key frames and sound map for vision models; frame times and the plain-language sound report for text-only models.
4. **`get_edit_plan` + `get_motion` + skills** → a short human-readable plan, tested transitions tied to sound events, and craft guides (`edit-workflow`, `sound-design`, GSAP, Three.js, shaders, assets and rights). Fetch licensed footage, sound, fonts and copy with `get_assets` / `get_audio_assets` before drawing anything in code.
5. **Draft** from real footage and tested blocks, using only media the user supplied or that was fetched with attribution. No AI-generated video clips, no gradient/neon/spinning-logo clichés, cuts on the measured beat, quiet ending.
6. **`check_my_edit`** → the final gate. `passed` means `blockers` is empty; informational notes belong in `passedChecks` or warnings. Fix the top blockers and re-check. Only then render, and report what you could not verify.

Sound is measured locally, never guessed: `get_item_audio` reports loudness, silences, an estimated beat and a plain-language reuse plan; `compareWith` measures a draft and returns differences in words. BPM is always labelled an estimate. The in-app AI panel is optional and opt-in — the library works fully without it, and nothing is sent when the app opens.

![Skill tab with editing guides](web/public/assets/screenshots/06-skill.png)

---

## 6. MCP reference

**29 tools · 3 resources · 1 prompt.** Stateless Streamable HTTP at `/mcp`, plus a stdio bridge. Lists are paginated (default 20, max 100). There are no agent rename/delete tools, and errors suggest the next step.

### Library & Taste

| Tool | Purpose |
| :--- | :--- |
| `get_taste_profile` | Root taste + folder overview. **Call this first.** |
| `list_folders` | Folder tree, optionally from a path, with depth. |
| `get_folder` | Folder details + inherited taste + item summaries. |
| `list_items` | Items in a folder with type/tag/rating filters. |
| `search_items` | Full-text search over titles, notes, tags and folder names. |
| `get_item` | Full metadata, frames, `cutGrid`, `motionCurve`, paths and usage stats. |
| `get_moodboard` | A whole board with item details. |
| `list_moodboards` | Board names and item counts. |
| `get_random_inspiration` | N random approved references to break a rut. |

### Visual Storyboarding

| Tool | Purpose |
| :--- | :--- |
| `get_item_image` | Thumbnail, contact sheet, frame or sound map; `atSec` and `startSec`/`endSec` windows from cached frames. |

### Sound Engine

| Tool | Purpose |
| :--- | :--- |
| `get_item_audio` | Sound report, reuse plan, feel narration and `compareWith` draft comparison. |
| `sound_ready` | Check/install the optional local earshot engine. |
| `sound_make` | Create a sound effect from a request (never generated in code). |
| `sound_kit` | Ready-made sound kits: launch, calm, crisp, minimal. |
| `sound_measure` | Local LUFS, peak, tempo and key measurement. |
| `sound_timeline` | Event timeline (needs optional listening models). |
| `sound_profile` | Build a taste profile from your own reference files. |
| `sound_critique` | Timestamped fixes against a profile. |

### Motion & Craft

| Tool | Purpose |
| :--- | :--- |
| `get_motion` | Tested transitions tied to sound events. |
| `list_skills` | Bundled and user craft guides. |
| `get_skill` | Full text of one guide. |
| `get_edit_plan` | Plain-language plan, feeling question and hard rules. |
| `get_assets` | Free images, fonts and copy patterns (Openverse + bundled). |
| `get_audio_assets` | Free music and sound effects with licence and credit. |

### Quality Gate & Inbox

| Tool | Purpose |
| :--- | :--- |
| `check_my_edit` | Final plain-language pass/fail and fix list before render. |
| `save_item` | Save a file, note or URL into the Inbox for approval. |
| `update_item` | Edit description / tags / why-I-like-it (marked agent-written). |
| `log_usage` | Record what a reference was used for. |
| `create_folder` | Propose a category (marked agent-created). |

**Resources:** `inspiring://taste` · `inspiring://folder/{path}/taste` · `inspiring://moodboard/{id}`
**Prompt:** `use_my_taste`

![Inbox review queue](web/public/assets/screenshots/04-inbox.png)

---

## 7. Privacy and security

Local-first means the files are yours and nothing happens in the background.

| Property | What actually happens |
| :--- | :--- |
| Network | Server binds `127.0.0.1` on fixed port `4747`; Host/Origin checks guard against DNS rebinding. |
| Storage | Plain files on disk plus `item.json` sidecars — open them in Finder or Explorer. |
| Index | `index.db` is only a rebuildable SQLite index; deleting it loses nothing. |
| Agent writes | `save_item` lands in the Inbox for human approval; auto-approve is off by default. |
| Deletes | Trash first. Permanent delete is a separate, explicit action. |
| Telemetry | No account, no analytics, no startup call, no background update check. |

**Outbound calls do exist, and all are user-triggered:** Openverse asset searches, yt-dlp link downloads, and requests to a configured AI endpoint when you send a chat message. That is why the wording is *local-first*, not "100% local". Paths are confined to the library, names are sanitised, executables are blocked, and files are never executed.

**Link downloads** are for personal reference use only. Respect each platform's terms and the copyright of the material; you are responsible for what you download. If a site changes, update the downloader in Settings or upload the file directly instead.

---

## 8. FAQ

<details>
<summary><b>Port 4747 is busy</b></summary>

The port is deliberately fixed so agents always know where to connect; the server fails clearly rather than switching. Stop the other process (`netstat -ano | findstr :4747` on Windows, `lsof -i :4747` on macOS/Linux) and retry.

</details>

<details>
<summary><b>The index looks wrong, or index.db was deleted</b></summary>

Settings → **Rescan library** rebuilds `index.db` from files and sidecars. Originals and `taste.md` files are never changed.

</details>

<details>
<summary><b>Key frames / contact sheets look old</b></summary>

They are cached artefacts. Refresh every existing video explicitly with:

```bash
npm run rebuild:sheets -- --all
```

Use `--item <id>` for one item. Only the `.analysis/` cache is replaced — originals and sidecars are untouched.

</details>

<details>
<summary><b>Listening / sound-make tools report they are unavailable</b></summary>

The earshot engine is **optional** and lives under `<home>/tools/earshot-venv`. It is installed only when you call `sound_ready({ install: true })`; listening models (~1.1 GB) are never downloaded automatically. Deterministic measurement and `sound_kit` work without it.

</details>

<details>
<summary><b>A video has no sound report</b></summary>

Open the item and choose **Retry analysis**. Videos with no audio track get an honest "no audio track" report instead of an error.

</details>

<details>
<summary><b>A download failed</b></summary>

Update the downloader in Settings and retry, or upload the file directly. Direct media URLs usually work even when the downloader cannot be fetched.

</details>

---

## 9. Contributing and roadmap

Issues and pull requests are welcome. Keep changes small, run lint, typecheck and tests, and describe what you *actually* verified. Behaviour changes should update the specs in the same change.

Deliberately **not** in v1 (future work): built-in AI descriptions, semantic/embedding search, shareable taste packs, a browser extension and a tray app.

## 10. License

MIT — see [LICENSE](LICENSE).