@tmhs/screencast-mcp 0.51.0 → 0.51.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +58 -17
  2. package/dist/index.js +117 -130
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -18,13 +18,6 @@ Capture the desktop, a monitor, a window, or a region; sample a recording into f
18
18
  [![MCP Registry](https://img.shields.io/badge/MCP_Registry-listed-6E56CF)](https://registry.modelcontextprotocol.io/v0/servers?search=screencast-mcp)
19
19
  [![CI](https://github.com/TMHSDigital/screencast-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/TMHSDigital/screencast-mcp/actions/workflows/ci.yml)
20
20
  [![License: CC BY-NC-ND 4.0](https://img.shields.io/badge/license-CC--BY--NC--ND--4.0-green)](LICENSE)
21
- ![Last commit](https://img.shields.io/github/last-commit/TMHSDigital/screencast-mcp)
22
-
23
- ![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white)
24
- ![Node.js](https://img.shields.io/badge/Node.js_%E2%89%A522-339933?logo=node.js&logoColor=white)
25
- ![Model Context Protocol](https://img.shields.io/badge/MCP-stdio-6E56CF)
26
- ![ffmpeg](https://img.shields.io/badge/ffmpeg-required-007808?logo=ffmpeg&logoColor=white)
27
- ![Capture](https://img.shields.io/badge/capture-Windows_10%2F11-0078D6?logo=windows&logoColor=white)
28
21
 
29
22
  <br />
30
23
 
@@ -32,19 +25,29 @@ Capture the desktop, a monitor, a window, or a region; sample a recording into f
32
25
 
33
26
  <sub>Made with the tool: <code>start_recording</code> with <code>events: true</code>, one click, then <code>zoom { highlightClicks: true }</code> and <code>export_gif</code>. <a href="https://tmhsdigital.github.io/screencast-mcp/workflows/zoom-clicks.html">How it was made</a> · <a href="https://tmhsdigital.github.io/screencast-mcp/workflows/">more workflows</a></sub>
34
27
 
35
- [Quick start](#quick-start) · [Tools](#tools) · [Configuration](#configuration) · [More docs](#more-docs) · [Privacy](#privacy)
28
+ [Quick start](#quick-start) · [Tools](#tools) · [Configuration](#configuration) · [Troubleshooting](#troubleshooting) · [More docs](#more-docs) · [Privacy](#privacy)
36
29
 
37
30
  </div>
38
31
 
39
32
  ## Quick start
40
33
 
41
- The fastest path: `npx -y @tmhs/screencast-mcp setup` checks FFmpeg 8, OCR, and speech, offers `winget install Gyan.FFmpeg` when FFmpeg is missing, and adds the server to Claude Desktop, Claude Code, Cursor, and VS Code (backing up each config). `--dry-run` shows the changes first; `--test` records a 3-second GIF to prove it works. Or set it up by hand:
34
+ **You need** Windows 10 or 11, [Node.js](https://nodejs.org) 22+, and **FFmpeg 8 or newer** on `PATH`. Capture is Windows-only; the watch, edit, and produce tools work anywhere ffmpeg runs.
35
+
36
+ **1. Run setup.** It checks FFmpeg 8, OCR, and speech, offers `winget install Gyan.FFmpeg` when FFmpeg is missing, and adds the server to Claude Desktop, Claude Code, Cursor, and VS Code, backing up each config:
37
+
38
+ ```sh
39
+ npx -y @tmhs/screencast-mcp setup
40
+ ```
41
+
42
+ `--dry-run` shows the changes first; `--test` records a 3-second GIF to prove it works.
43
+
44
+ **2. Ask your agent:**
42
45
 
43
- **You need** Windows 10 or 11, [Node.js](https://nodejs.org) 22+, and **FFmpeg 8 or newer** on `PATH` (`winget install Gyan.FFmpeg`, the full build). Older builds run most tools, but `transcribe` (the `whisper` filter) and `backend: "wgc"` (`gfxcapture`) need FFmpeg 8, and essentials or distro builds can lack them (Ubuntu LTS `apt install ffmpeg` gives 6.x). Capture is Windows-only; the watch, edit, and produce tools work anywhere ffmpeg runs. After connecting, ask the agent to run `doctor`: it reports the ffmpeg version, the filters and devices it has, OCR, and anything missing.
46
+ > Record my VS Code window for five seconds while I reproduce the bug, then show me the frames where something changed.
44
47
 
45
- **Windows on ARM64** is supported (#246): CI builds and runs the full test suite on `windows-11-arm`. gyan.dev ships no arm64 FFmpeg, so use BtbN's `winarm64-gpl` FFmpeg 8 build; it has `gdigrab`, `gfxcapture` and `drawtext` but no `whisper` or libvpx, so `transcribe` and `.webm` output need another build. `doctor` reports `arch` and what is missing.
48
+ More in the [workflows](https://tmhsdigital.github.io/screencast-mcp/workflows/): a bug-repro GIF for a PR, a README demo, a UI verification loop, a social clip, a cheap review of a long recording, zoom toward clicks, and the whole edit in one call.
46
49
 
47
- **Add it to your client:**
50
+ ### Or add it by hand
48
51
 
49
52
  | Client | How |
50
53
  | --- | --- |
@@ -56,11 +59,7 @@ The fastest path: `npx -y @tmhs/screencast-mcp setup` checks FFmpeg 8, OCR, and
56
59
  { "mcpServers": { "screencast": { "command": "npx", "args": ["-y", "@tmhs/screencast-mcp"] } } }
57
60
  ```
58
61
 
59
- **Then ask your agent:**
60
-
61
- > Record my VS Code window for five seconds while I reproduce the bug, then show me the frames where something changed.
62
-
63
- More in the [workflows](https://tmhsdigital.github.io/screencast-mcp/workflows/): a bug-repro GIF for a PR, a README demo, a UI verification loop, a social clip, a cheap review of a long recording, zoom toward clicks, and the whole edit in one call.
62
+ For FFmpeg use the full build (`winget install Gyan.FFmpeg`). If something is missing, see [Troubleshooting](#troubleshooting).
64
63
 
65
64
  ## Why not just...
66
65
 
@@ -81,15 +80,21 @@ The core is the **watch loop**: the agent records, samples the footage into fram
81
80
 
82
81
  Always loaded, whatever `SCREENCAST_TOOLSETS` selects.
83
82
 
83
+ <details open><summary><code>get_media_info</code>, <code>doctor</code> (2)</summary>
84
+
84
85
  | Tool | What it does |
85
86
  | --- | --- |
86
87
  | [`get_media_info`](https://tmhsdigital.github.io/screencast-mcp/tools/get_media_info.html) | Probe a media file with ffprobe and return duration, resolution, frame rate, codecs, container format, and size. |
87
88
  | [`doctor`](https://tmhsdigital.github.io/screencast-mcp/tools/doctor.html) | Check the setup: ffmpeg/ffprobe (FFmpeg 8+?), optional filters, capture devices, Windows OCR, settings, and enabled toolsets; `problems` says what is missing and how to fix it. Call on first use or when a tool reports a missing feature. |
88
89
 
90
+ </details>
91
+
89
92
  ### Capture
90
93
 
91
94
  Record or screenshot the desktop, a monitor, a window, or a region. Every capture is an explicit tool call: nothing records on its own.
92
95
 
96
+ <details><summary><code>start_recording</code>, <code>stop_recording</code>, <code>delete_recording</code>, <code>pause_recording</code>, <code>resume_recording</code>, <code>save_replay</code>, <code>list_sessions</code>, <code>get_session</code>, <code>read_events</code>, <code>add_marker</code>, <code>screenshot</code>, <code>list_audio_devices</code>, <code>list_video_devices</code>, <code>list_targets</code> (14)</summary>
97
+
93
98
  | Tool | What it does |
94
99
  | --- | --- |
95
100
  | [`start_recording`](https://tmhsdigital.github.io/screencast-mcp/tools/start_recording.html) | Start a background screen recording. Returns a session id; finalize it with stop_recording. Never auto-starts. |
@@ -107,10 +112,14 @@ Record or screenshot the desktop, a monitor, a window, or a region. Every captur
107
112
  | [`list_video_devices`](https://tmhsdigital.github.io/screencast-mcp/tools/list_video_devices.html) | List DirectShow cameras for start_recording's webcam.device. |
108
113
  | [`list_targets`](https://tmhsdigital.github.io/screencast-mcp/tools/list_targets.html) | List the desktop, monitors, and visible windows (topmost first, with capturability per backend). Each entry has a `target` string to pass as-is to capture tools; use it instead of guessing a title. |
109
114
 
115
+ </details>
116
+
110
117
  ### Watch
111
118
 
112
119
  Turn footage into something a model can read: frames, contact sheets, diffs, OCR, and a searchable text timeline.
113
120
 
121
+ <details><summary><code>review_recording</code>, <code>player_frames</code>, <code>sample_frames</code>, <code>contact_sheet</code>, <code>screen_diff</code>, <code>wait_for_change</code>, <code>find_text</code>, <code>index_recording</code>, <code>search_recording</code> (9)</summary>
122
+
114
123
  | Tool | What it does |
115
124
  | --- | --- |
116
125
  | [`review_recording`](https://tmhsdigital.github.io/screencast-mcp/tools/review_recording.html) | Open a recording for a person to review: in MCP Apps clients an inline player to scrub, trim, and redact, then export; elsewhere just the video's details. |
@@ -123,10 +132,14 @@ Turn footage into something a model can read: frames, contact sheets, diffs, OCR
123
132
  | [`index_recording`](https://tmhsdigital.github.io/screencast-mcp/tools/index_recording.html) | Build a recording's text timeline (<video>.index.json: OCR per scene, events, markers, transcript) for search_recording. |
124
133
  | [`search_recording`](https://tmhsdigital.github.io/screencast-mcp/tools/search_recording.html) | Search an index_recording timeline (screen text, events, markers, transcript): timecoded hits, best first, secrets masked. No frames unless asked. No input: search all indexes. |
125
134
 
135
+ </details>
136
+
126
137
  ### Edit
127
138
 
128
139
  Cut, convert, compress, and redact. A tool that writes a file refuses to replace an existing `output` unless `overwrite: true`; default output paths are always unique.
129
140
 
141
+ <details><summary><code>trim</code>, <code>concat</code>, <code>convert</code>, <code>export_gif</code>, <code>crop</code>, <code>scale</code>, <code>speed</code>, <code>compress</code>, <code>clip</code>, <code>cut_idle</code>, <code>cut_by_transcript</code>, <code>redact_region</code>, <code>pipeline</code> (13)</summary>
142
+
130
143
  | Tool | What it does |
131
144
  | --- | --- |
132
145
  | [`trim`](https://tmhsdigital.github.io/screencast-mcp/tools/trim.html) | Cut a video down to one sub-clip by start + (end or duration). For several segments use clip; to combine with other edits use pipeline. |
@@ -143,10 +156,14 @@ Cut, convert, compress, and redact. A tool that writes a file refuses to replace
143
156
  | [`redact_region`](https://tmhsdigital.github.io/screencast-mcp/tools/redact_region.html) | Cover given rectangles in a video or screenshot (e.g. secrets on screen). Not automatic detection: find them with find_text redact: true. Off-frame regions are rejected. |
144
157
  | [`pipeline`](https://tmhsdigital.github.io/screencast-mcp/tools/pipeline.html) | Run several edits (trim, crop, scale, speed, cut_idle, redact, callout, keystroke_overlay, cursor, reframe, zoom, backdrop, audio, burn_subtitles, then optionally export_preset or export_gif) in one ffmpeg pass: one re-encode, no intermediate files. Prefer it over chaining edit tools; a recipe does the usual polish in one call. |
145
158
 
159
+ </details>
160
+
146
161
  ### Produce
147
162
 
148
163
  Annotate, frame, and assemble a finished piece. Tools that combine clips normalize each input to a common resolution, fps, and audio rate first.
149
164
 
165
+ <details><summary><code>overlay</code>, <code>compose</code>, <code>perf_overlay</code>, <code>translate_subtitles</code>, <code>callout</code>, <code>keystroke_overlay</code>, <code>cursor</code>, <code>backdrop</code>, <code>burn_subtitles</code>, <code>chapters</code>, <code>xfade_transition</code>, <code>assemble_highlights</code>, <code>title_card</code>, <code>reframe</code>, <code>zoom</code>, <code>export_preset</code>, <code>bug_report</code>, <code>step_guide</code> (18)</summary>
166
+
150
167
  | Tool | What it does |
151
168
  | --- | --- |
152
169
  | [`overlay`](https://tmhsdigital.github.io/screencast-mcp/tools/overlay.html) | Composite an image or video (logo, watermark, picture-in-picture) onto a video at a pixel position, optionally scaled and time-limited; keeps the base's audio and length. |
@@ -168,10 +185,14 @@ Annotate, frame, and assemble a finished piece. Tools that combine clips normali
168
185
  | [`bug_report`](https://tmhsdigital.github.io/screencast-mcp/tools/bug_report.html) | Package a recording as a paste-ready repro folder: secret-scanned, redacted clip and GIF, contact sheet, steps from the event log, OCR'd errors, environment, report.md for gh issue create --body-file. |
169
186
  | [`step_guide`](https://tmhsdigital.github.io/screencast-mcp/tools/step_guide.html) | Turn a recording's event log into a numbered how-to: a ringed screenshot and caption per step, marker headings; Markdown and/or one HTML file. Never includes typed text. |
170
187
 
188
+ </details>
189
+
171
190
  ### Audio
172
191
 
173
192
  Extract, clean up, level, transcribe, and score the soundtrack.
174
193
 
194
+ <details><summary><code>extract_audio</code>, <code>normalize_audio</code>, <code>denoise</code>, <code>transcribe</code>, <code>music_bed</code>, <code>narrate</code> (6)</summary>
195
+
175
196
  | Tool | What it does |
176
197
  | --- | --- |
177
198
  | [`extract_audio`](https://tmhsdigital.github.io/screencast-mcp/tools/extract_audio.html) | Extract the audio track of a media file to its own file (mp3, aac, wav, or copy). Returns the output path. |
@@ -180,6 +201,8 @@ Extract, clean up, level, transcribe, and score the soundtrack.
180
201
  | [`transcribe`](https://tmhsdigital.github.io/screencast-mcp/tools/transcribe.html) | Transcribe a recording's speech to an SRT subtitle file, locally, with FFmpeg 8's whisper filter (needs a whisper.cpp model file). Returns the SRT path and the text. Pair with burn_subtitles to caption the video. |
181
202
  | [`music_bed`](https://tmhsdigital.github.io/screencast-mcp/tools/music_bed.html) | Lay music under a video: looped or trimmed to length, faded, leveled, and mixed with any existing audio. Video is stream-copied. |
182
203
  | [`narrate`](https://tmhsdigital.github.io/screencast-mcp/tools/narrate.html) | Offline voiceover with the built-in Windows voices: speaks each line at its time or marker over the audio, plus an SRT. |
204
+
205
+ </details>
183
206
  <!-- tools:end -->
184
207
 
185
208
  > [!IMPORTANT]
@@ -203,6 +226,7 @@ Every capture tool takes one `target` string: `full`, `monitor:<index>`, `window
203
226
  | `SCREENCAST_CONFIRM_CAPTURE` | `auto` | Asks you to confirm each live capture through MCP elicitation. `auto`: ask when the client supports elicitation. `1`/`always`: ask, and refuse captures in clients that cannot. `0`/`off`: never ask |
204
227
  | `SCREENCAST_TOOLSETS` | `all` | Comma-separated toolsets to expose; the rest are not loaded, which shrinks the tool list the agent pays for on every turn (`core` is always on) |
205
228
  | `FFMPEG_PATH` / `FFPROBE_PATH` | `PATH` lookup | Explicit ffmpeg / ffprobe binaries |
229
+ | `SCREENCAST_DEBUG_JOBS` | off | `1` traces each edit job on stderr: start, a heartbeat every 30 s (bytes written, seconds since ffmpeg's last output), and the end |
206
230
 
207
231
  <!-- toolsets:start -->
208
232
  | Toolset | Tools |
@@ -215,6 +239,22 @@ Every capture tool takes one `target` string: `full`, `monitor:<index>`, `window
215
239
  | `core` (always) | `get_media_info`, `doctor` |
216
240
  <!-- toolsets:end -->
217
241
 
242
+ ## Troubleshooting
243
+
244
+ Start by asking your agent to run **`doctor`**: it reports the ffmpeg version and architecture, the filters and capture devices it found, OCR, the settings in effect, and under `problems` what is missing and how to fix it.
245
+
246
+ - **A tool says a filter is missing.** Older FFmpeg builds run most tools, but `transcribe` (the `whisper` filter) and `backend: "wgc"` (`gfxcapture`) need FFmpeg 8, and "essentials" or distro builds can lack them (Ubuntu LTS `apt install ffmpeg` gives 6.x). Install the full build: `winget install Gyan.FFmpeg`.
247
+ - **An edit seems stuck.** Set `SCREENCAST_DEBUG_JOBS=1` in the server's `env`: each edit job then logs its progress to stderr (your client's MCP log), so you can see whether ffmpeg is still working.
248
+ - **ffmpeg is installed but not found.** Put it on `PATH`, or set `FFMPEG_PATH` / `FFPROBE_PATH` in the server's `env` (see [Configuration](#configuration)).
249
+ - **Captures are refused or never start.** By default each capture asks you to confirm it through your client; see `SCREENCAST_CONFIRM_CAPTURE` under [Configuration](#configuration).
250
+
251
+ <details>
252
+ <summary><b>Windows on ARM64</b></summary>
253
+
254
+ Supported (#246): CI builds and runs the full test suite on `windows-11-arm`. gyan.dev ships no arm64 FFmpeg, so use BtbN's `winarm64-gpl` FFmpeg 8 build; it has `gdigrab`, `gfxcapture` and `drawtext` but no `whisper` or libvpx, so `transcribe` and `.webm` output need another build. `doctor` reports `arch` and what is missing.
255
+
256
+ </details>
257
+
218
258
  ## More docs
219
259
 
220
260
  - **Usage:** [workflows](https://tmhsdigital.github.io/screencast-mcp/workflows/) walk through real tool calls and outputs: a bug-repro clip, a README demo, a UI verification loop, a social clip, a long-recording review, zoom toward clicks, and the whole edit in one `pipeline` call. Each tool's parameters and results are on its [reference page](https://tmhsdigital.github.io/screencast-mcp/tools/).
@@ -236,6 +276,7 @@ Every capture tool takes one `target` string: `full`, `monitor:<index>`, `window
236
276
  - **You confirm captures.** By default, every recording, screenshot, live `find_text`, and `wait_for_change` first asks you, through your client, what will be captured. The model cannot answer that prompt for you. Clients without MCP elicitation get no prompt unless `SCREENCAST_CONFIRM_CAPTURE=1`, which refuses captures there instead.
237
277
  - **Search runs on masked text.** `index_recording` masks secret-pattern matches before writing the index, and `search_recording` (including regex queries) only sees that masked text.
238
278
  - **The event log never records typed text.** Only with `start_recording` `events: true` (or `cursor: "events"`), and only while that recording runs: clicks, scrolls, and cursor positions system-wide, and typing as bursts on a 0.5 s grid with no key names (`keys: "shortcuts"` also names Ctrl/Alt/Win chords). `focus: "app"` also logs which app is in front (its exe name); only `focus: "title"` logs window titles. `elements: true` also logs the accessible name of the control each click lands on (a button's "Save", a list item's text), never for password fields. There is no microphone capture; system audio only with `audio.source` = `system`.
279
+ - **Camera and process data only when asked.** `webcam` records a camera (video only, no sound) to `<output>.webcam.mp4`. `perf: true` samples system CPU and memory, plus the recorded window's app (its process id, exe name, CPU and memory), to `<recording>.perf.jsonl`.
239
280
  - **App logs only when you name them.** `start_recording` `logs` reads just the files you list, and only lines written while it records; they are stored next to the recording and masked for secrets before they reach an index or a bug report.
240
281
  - **Deleting data.** `delete_recording` removes a recording with its sidecars (event log, webcam, transcript, index with its screen text, markers) and registry entry, asking you first when the client supports it. Otherwise delete files under `SCREENCAST_HOME`, or set `SCREENCAST_RETENTION_DAYS`; recordings and edits are never deleted automatically.
241
282