beesum-mcp
by air-catfish
README.md
# beesum-min

**Local-first CLI & MCP server for token-efficient transcript extraction and AI
summarization.** yt-dlp + WebVTT + local or cloud LLMs. Works with YouTube,
Vimeo, TED, Twitch and any other site yt-dlp supports.
[](https://github.com/air-catfish/beesum-min/actions/workflows/ci.yml)
[](https://www.nuget.org/packages/beesum-min)
[](LICENSE)
I originally wrote this for myself: download the subtitles of a lecture, clean
the noise, and turn the text into notes. It is shared in case the same trick is
useful to someone else.
Auto-generated captions are noisy: YouTube's rolling window repeats every line
two or three times and wraps words in timing tags. beesum-min strips the markup,
drops the duplicates, and only then hands the text to a model. The bundled
YouTube-style sample shrinks from **4,326 to 529 characters (87.8 %)** — about
**1,442 → 177 estimated tokens**:
| Artifact | Lines | Chars | ~Tokens |
| --- | ---: | ---: | ---: |
| Raw subtitles (`samples/demo/auto-captions.vtt`) | 61 | 4,326 | 1,442 |
| Cleaned transcript | 12 | 529 | 177 |
| **Saved** | | **87.8 %** | **87.7 %** |
`transcript-only` is the default and never sends anything anywhere. Ollama stays
local; cloud providers are opt-in. Run `--json` on your own videos to see the
same numbers.
Measured on 2026-12-04 with `--json` (yt-dlp 2026.11.23):
| Source | Video | Chars (raw → clean) | Saved | ~Tokens (raw → clean) |
| --- | --- | ---: | ---: | ---: |
| YouTube, auto captions | [$456,000 Squid Game In Real Life!](https://www.youtube.com/watch?v=0e3GPea1Tyg) (25:41) | 199,338 → 19,645 | 90.1 % | 66,446 → 6,549 |
| YouTube, manual | [Vectors, 3blue1brown](https://www.youtube.com/watch?v=fNk_zzaMoSs) (9:51) | 15,078 → 10,174 | 32.5 % | 5,026 → 3,392 |
| TED | [The danger of a single story](https://www.ted.com/talks/chimamanda_ngozi_adichie_the_danger_of_a_single_story) (18:32) | 29,678 → 15,990 | 46.1 % | 9,893 → 5,330 |
<img src="docs/demos/tui.gif" width="760" alt="beesum-min TUI: live stage spinner and token-savings table for a TED talk">
## Features
- **Any yt-dlp site** — YouTube, Vimeo, TED, Twitch, …; `--local-vtt` and
`--stdin` cover everything else.
- **Deterministic cleanup** — inline tag stripping, HTML entity decoding,
rolling-window deduplication, 15-minute markers, cue settings.
- **Interactive TUI** — rounded panels, a live stage spinner and a token-savings
table. Automatically disabled when stdout/stderr is redirected, and for
`--json`, `--jsonl` and `--batch`; `BEESUM_NO_TUI=1` forces it off.
- **MCP server** (`beesum-mcp`) — `get_transcript` with `offset`/`limit`, time
clipping and prompt-injection-aware output; `summarize_url` and
`summarize_transcript` appear when an LLM provider is configured. stdio by
default; `--http` serves the same tools over Streamable HTTP, loopback-bound and
optionally behind a bearer token.
- **Local first** — Ollama out of the box; OpenAI, Anthropic and Gemini are
opt-in and read keys from the environment or the platform secret store.
## Install
```bash
dotnet tool install -g beesum-min
dotnet tool install -g beesum-mcp # optional MCP server
```
`yt-dlp` must be available in `PATH`, in `tools/` next to the app, or via
`--yt-dlp`. `beesum-min doctor` checks the whole setup.
## Run
```bash
# Clean transcript, no model call
beesum-min "https://www.youtube.com/watch?v=..." --timestamps
# Summary with local Ollama
beesum-min "https://www.ted.com/talks/chimamanda_ngozi_adichie_the_danger_of_a_single_story" --provider ollama --ollama-model qwen3:1.7b
# JSON for scripts and agents (includes the token-savings stats)
beesum-min "https://www.youtube.com/watch?v=..." --json
```
`--from/--to`, `--save-vtt`, `--save-transcript`, `--format mindmap`, `--stdin`
and `--batch` — see [CLI docs](docs/cli.md) or `--help`.
### From a lecture to notes
Clip a talk, let local Ollama condense it, and keep the markdown:
```bash
beesum-min "https://www.ted.com/talks/chimamanda_ngozi_adichie_the_danger_of_a_single_story" \
--from 0:00 --to 4:00 --provider ollama --ollama-model qwen3:8b \
--style programmer --format markdown \
--instructions "Summarize the clip in 5 short bullet points plus one takeaway."
```
<img src="docs/demos/lecture-notes.gif" width="760" alt="beesum-min summarizing a TED talk with local Ollama, line by line">
## MCP
```json
{
"mcpServers": {
"beesum-min": {
"command": "beesum-mcp",
"env": {
"BEESUM_PROVIDER": "transcript-only"
}
}
}
}
```
`get_transcript` accepts any http(s) URL yt-dlp supports. Loopback, private and
link-local addresses are blocked by default because tool arguments are
model-controlled; set `BEESUM_ALLOW_PRIVATE_URLS=1` to opt in. See
[MCP docs](docs/mcp.md).
For clients that cannot spawn a stdio process, start the HTTP transport instead:
```bash
beesum-mcp --http --port 8080 # loopback, no token
BEESUM_HTTP_TOKEN=... beesum-mcp --http --bind 0.0.0.0 # token required
```
`POST http://127.0.0.1:8080/mcp` with `Content-Type: application/json`; see
[HTTP transport](docs/mcp.md#http-transport-streamable-http) for the curl example
and client config.
## Source
```bash
dotnet build beesum-min.slnx -c Release
dotnet run --project src/Beesum.Min.Cli -- --local-vtt samples/demo/talk.vtt
```
## Docs
- [Docs site](https://air-catfish.github.io/beesum-min/)
- [Install](docs/install.md) · [CLI](docs/cli.md) · [MCP](docs/mcp.md) · [JSON](docs/json-output.md)
- [Library](docs/embedding.md) · [Security](SECURITY.md)
## Disclaimer
The tool uses `yt-dlp` to download subtitles. You are responsible for complying
with the terms of the sites you use and with the rights of the content you
process.
## License
MIT. Report security issues through GitHub advisories.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues