@tmhs/screencast-mcp 0.10.0 → 0.28.0
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.
- package/README.md +56 -11
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -1
- package/dist/prompts.d.ts +10 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +72 -0
- package/dist/prompts.js.map +1 -0
- package/dist/resources.d.ts +3 -0
- package/dist/resources.d.ts.map +1 -0
- package/dist/resources.js +71 -0
- package/dist/resources.js.map +1 -0
- package/dist/tools/assembleHighlights.d.ts.map +1 -1
- package/dist/tools/assembleHighlights.js +4 -3
- package/dist/tools/assembleHighlights.js.map +1 -1
- package/dist/tools/burnSubtitles.d.ts +3 -0
- package/dist/tools/burnSubtitles.d.ts.map +1 -0
- package/dist/tools/burnSubtitles.js +48 -0
- package/dist/tools/burnSubtitles.js.map +1 -0
- package/dist/tools/callout.d.ts +3 -0
- package/dist/tools/callout.d.ts.map +1 -0
- package/dist/tools/callout.js +106 -0
- package/dist/tools/callout.js.map +1 -0
- package/dist/tools/clip.d.ts.map +1 -1
- package/dist/tools/clip.js +4 -3
- package/dist/tools/clip.js.map +1 -1
- package/dist/tools/compress.d.ts.map +1 -1
- package/dist/tools/compress.js +4 -3
- package/dist/tools/compress.js.map +1 -1
- package/dist/tools/concat.d.ts.map +1 -1
- package/dist/tools/concat.js +6 -3
- package/dist/tools/concat.js.map +1 -1
- package/dist/tools/contactSheet.d.ts +3 -0
- package/dist/tools/contactSheet.d.ts.map +1 -0
- package/dist/tools/contactSheet.js +128 -0
- package/dist/tools/contactSheet.js.map +1 -0
- package/dist/tools/convert.d.ts.map +1 -1
- package/dist/tools/convert.js +4 -3
- package/dist/tools/convert.js.map +1 -1
- package/dist/tools/crop.d.ts.map +1 -1
- package/dist/tools/crop.js +5 -4
- package/dist/tools/crop.js.map +1 -1
- package/dist/tools/cutIdle.d.ts +3 -0
- package/dist/tools/cutIdle.d.ts.map +1 -0
- package/dist/tools/cutIdle.js +77 -0
- package/dist/tools/cutIdle.js.map +1 -0
- package/dist/tools/denoise.d.ts +3 -0
- package/dist/tools/denoise.d.ts.map +1 -0
- package/dist/tools/denoise.js +53 -0
- package/dist/tools/denoise.js.map +1 -0
- package/dist/tools/exportGif.d.ts +3 -0
- package/dist/tools/exportGif.d.ts.map +1 -0
- package/dist/tools/exportGif.js +100 -0
- package/dist/tools/exportGif.js.map +1 -0
- package/dist/tools/exportPreset.d.ts.map +1 -1
- package/dist/tools/exportPreset.js +4 -3
- package/dist/tools/exportPreset.js.map +1 -1
- package/dist/tools/extractAudio.d.ts.map +1 -1
- package/dist/tools/extractAudio.js +4 -3
- package/dist/tools/extractAudio.js.map +1 -1
- package/dist/tools/findText.d.ts +3 -0
- package/dist/tools/findText.d.ts.map +1 -0
- package/dist/tools/findText.js +120 -0
- package/dist/tools/findText.js.map +1 -0
- package/dist/tools/musicBed.d.ts.map +1 -1
- package/dist/tools/musicBed.js +4 -3
- package/dist/tools/musicBed.js.map +1 -1
- package/dist/tools/normalizeAudio.d.ts +3 -0
- package/dist/tools/normalizeAudio.d.ts.map +1 -0
- package/dist/tools/normalizeAudio.js +55 -0
- package/dist/tools/normalizeAudio.js.map +1 -0
- package/dist/tools/overlay.d.ts.map +1 -1
- package/dist/tools/overlay.js +4 -3
- package/dist/tools/overlay.js.map +1 -1
- package/dist/tools/readEvents.d.ts +6 -0
- package/dist/tools/readEvents.d.ts.map +1 -0
- package/dist/tools/readEvents.js +79 -0
- package/dist/tools/readEvents.js.map +1 -0
- package/dist/tools/redactRegion.d.ts.map +1 -1
- package/dist/tools/redactRegion.js +5 -4
- package/dist/tools/redactRegion.js.map +1 -1
- package/dist/tools/reframe.d.ts.map +1 -1
- package/dist/tools/reframe.js +4 -3
- package/dist/tools/reframe.js.map +1 -1
- package/dist/tools/sampleFrames.d.ts.map +1 -1
- package/dist/tools/sampleFrames.js +125 -12
- package/dist/tools/sampleFrames.js.map +1 -1
- package/dist/tools/scale.d.ts.map +1 -1
- package/dist/tools/scale.js +4 -3
- package/dist/tools/scale.js.map +1 -1
- package/dist/tools/screenDiff.d.ts +3 -0
- package/dist/tools/screenDiff.d.ts.map +1 -0
- package/dist/tools/screenDiff.js +72 -0
- package/dist/tools/screenDiff.js.map +1 -0
- package/dist/tools/screenshot.d.ts.map +1 -1
- package/dist/tools/screenshot.js +39 -7
- package/dist/tools/screenshot.js.map +1 -1
- package/dist/tools/speed.d.ts.map +1 -1
- package/dist/tools/speed.js +5 -4
- package/dist/tools/speed.js.map +1 -1
- package/dist/tools/startRecording.d.ts.map +1 -1
- package/dist/tools/startRecording.js +65 -3
- package/dist/tools/startRecording.js.map +1 -1
- package/dist/tools/stopRecording.d.ts.map +1 -1
- package/dist/tools/stopRecording.js +3 -0
- package/dist/tools/stopRecording.js.map +1 -1
- package/dist/tools/titleCard.d.ts.map +1 -1
- package/dist/tools/titleCard.js +5 -4
- package/dist/tools/titleCard.js.map +1 -1
- package/dist/tools/transcribe.d.ts +3 -0
- package/dist/tools/transcribe.d.ts.map +1 -0
- package/dist/tools/transcribe.js +59 -0
- package/dist/tools/transcribe.js.map +1 -0
- package/dist/tools/trim.d.ts.map +1 -1
- package/dist/tools/trim.js +8 -3
- package/dist/tools/trim.js.map +1 -1
- package/dist/tools/waitForChange.d.ts +3 -0
- package/dist/tools/waitForChange.d.ts.map +1 -0
- package/dist/tools/waitForChange.js +127 -0
- package/dist/tools/waitForChange.js.map +1 -0
- package/dist/tools/xfadeTransition.d.ts.map +1 -1
- package/dist/tools/xfadeTransition.js +4 -3
- package/dist/tools/xfadeTransition.js.map +1 -1
- package/dist/tools/zoom.d.ts +3 -0
- package/dist/tools/zoom.d.ts.map +1 -0
- package/dist/tools/zoom.js +94 -0
- package/dist/tools/zoom.js.map +1 -0
- package/dist/utils/anim.d.ts +33 -0
- package/dist/utils/anim.d.ts.map +1 -0
- package/dist/utils/anim.js +74 -0
- package/dist/utils/anim.js.map +1 -0
- package/dist/utils/audio.d.ts +49 -0
- package/dist/utils/audio.d.ts.map +1 -0
- package/dist/utils/audio.js +128 -0
- package/dist/utils/audio.js.map +1 -0
- package/dist/utils/callout.d.ts +63 -0
- package/dist/utils/callout.d.ts.map +1 -0
- package/dist/utils/callout.js +95 -0
- package/dist/utils/callout.js.map +1 -0
- package/dist/utils/captions.d.ts +26 -0
- package/dist/utils/captions.d.ts.map +1 -0
- package/dist/utils/captions.js +105 -0
- package/dist/utils/captions.js.map +1 -0
- package/dist/utils/diff.d.ts +66 -0
- package/dist/utils/diff.d.ts.map +1 -0
- package/dist/utils/diff.js +176 -0
- package/dist/utils/diff.js.map +1 -0
- package/dist/utils/errors.d.ts +17 -9
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +7 -6
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/events.d.ts +109 -0
- package/dist/utils/events.d.ts.map +1 -0
- package/dist/utils/events.js +289 -0
- package/dist/utils/events.js.map +1 -0
- package/dist/utils/ffmpeg.d.ts +14 -1
- package/dist/utils/ffmpeg.d.ts.map +1 -1
- package/dist/utils/ffmpeg.js +105 -5
- package/dist/utils/ffmpeg.js.map +1 -1
- package/dist/utils/idle.d.ts +23 -0
- package/dist/utils/idle.d.ts.map +1 -0
- package/dist/utils/idle.js +96 -0
- package/dist/utils/idle.js.map +1 -0
- package/dist/utils/images.d.ts +21 -0
- package/dist/utils/images.d.ts.map +1 -0
- package/dist/utils/images.js +55 -0
- package/dist/utils/images.js.map +1 -0
- package/dist/utils/jobs.d.ts +44 -0
- package/dist/utils/jobs.d.ts.map +1 -0
- package/dist/utils/jobs.js +135 -0
- package/dist/utils/jobs.js.map +1 -0
- package/dist/utils/lifecycle.d.ts.map +1 -1
- package/dist/utils/lifecycle.js +3 -0
- package/dist/utils/lifecycle.js.map +1 -1
- package/dist/utils/media.d.ts +35 -2
- package/dist/utils/media.d.ts.map +1 -1
- package/dist/utils/media.js +75 -3
- package/dist/utils/media.js.map +1 -1
- package/dist/utils/monitors.d.ts +18 -2
- package/dist/utils/monitors.d.ts.map +1 -1
- package/dist/utils/monitors.js +50 -12
- package/dist/utils/monitors.js.map +1 -1
- package/dist/utils/ocr.d.ts +44 -0
- package/dist/utils/ocr.d.ts.map +1 -0
- package/dist/utils/ocr.js +215 -0
- package/dist/utils/ocr.js.map +1 -0
- package/dist/utils/produce.d.ts +1 -0
- package/dist/utils/produce.d.ts.map +1 -1
- package/dist/utils/produce.js +3 -2
- package/dist/utils/produce.js.map +1 -1
- package/dist/utils/resolveTarget.d.ts +5 -1
- package/dist/utils/resolveTarget.d.ts.map +1 -1
- package/dist/utils/resolveTarget.js +4 -4
- package/dist/utils/resolveTarget.js.map +1 -1
- package/dist/utils/sessions.d.ts +33 -0
- package/dist/utils/sessions.d.ts.map +1 -1
- package/dist/utils/sessions.js +154 -15
- package/dist/utils/sessions.js.map +1 -1
- package/dist/utils/sheet.d.ts +26 -0
- package/dist/utils/sheet.d.ts.map +1 -0
- package/dist/utils/sheet.js +77 -0
- package/dist/utils/sheet.js.map +1 -0
- package/dist/utils/still.d.ts +4 -0
- package/dist/utils/still.d.ts.map +1 -0
- package/dist/utils/still.js +28 -0
- package/dist/utils/still.js.map +1 -0
- package/dist/utils/targets.d.ts +17 -0
- package/dist/utils/targets.d.ts.map +1 -1
- package/dist/utils/targets.js +35 -1
- package/dist/utils/targets.js.map +1 -1
- package/dist/utils/windows.d.ts +25 -6
- package/dist/utils/windows.d.ts.map +1 -1
- package/dist/utils/windows.js +59 -20
- package/dist/utils/windows.js.map +1 -1
- package/dist/utils/zoom.d.ts +60 -0
- package/dist/utils/zoom.d.ts.map +1 -0
- package/dist/utils/zoom.js +167 -0
- package/dist/utils/zoom.js.map +1 -0
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ Capture the desktop, a monitor, a window, or a region; sample a recording into f
|
|
|
19
19
|

|
|
20
20
|
|
|
21
21
|

|
|
22
|
-

|
|
23
23
|

|
|
24
24
|

|
|
25
25
|

|
|
@@ -36,31 +36,36 @@ Screencast MCP gives an agent a screen recorder it can drive and reason about. I
|
|
|
36
36
|
The design choices are deliberate rather than incidental:
|
|
37
37
|
|
|
38
38
|
- **Capture is always explicit.** A recording or screenshot happens only on a tool call — nothing auto-fires and there is no background or scheduled capture.
|
|
39
|
-
- **Footage is made viewable.** `sample_frames` turns a video into images
|
|
39
|
+
- **Footage is made viewable.** `sample_frames` turns a video into images returned straight to the model, so "watch what happened" is a first-class operation, not an afterthought.
|
|
40
40
|
- **Presets over raw flags.** Quality is `draft` / `standard` / `high`; the agent never reasons about codecs, CRF, or pixel formats.
|
|
41
41
|
- **Safe by default.** Output lands under `SCREENCAST_HOME`, never inside a project checkout, and the public repo's `.gitignore` blocks captured media from being committed.
|
|
42
42
|
- **Recordings end.** When the client disconnects (or the server gets SIGINT/SIGTERM), every active recording is finalized and the server exits. Every recording also has a `maxDurationSec` cap (default one hour). A recording interrupted by a hard crash is reconciled on the next start (orphan reaping).
|
|
43
43
|
|
|
44
44
|
## Tools
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
Thirty-seven tools across four concerns. The manifest in [`mcp-tools.json`](mcp-tools.json) is the canonical surface and is kept in sync with `src/tools/`.
|
|
47
47
|
|
|
48
48
|
### Capture
|
|
49
49
|
|
|
50
50
|
| Tool | Purpose |
|
|
51
51
|
| --- | --- |
|
|
52
|
-
| `start_recording` | Start a background recording. `target` = `full` \| `monitor:<index>` \| `window:<title>` \| `region:<x>,<y>,<w>,<h>`; optional `fps`, `quality`, `audio` (set `audio.source` = `system` to also capture loopback audio),
|
|
52
|
+
| `start_recording` | Start a background recording. `target` = `full` \| `monitor:<index>` \| `window:<title>` \| `region:<x>,<y>,<w>,<h>`; optional `fps`, `quality`, `audio` (set `audio.source` = `system` to also capture loopback audio), `maxDurationSec` (auto-stop cap, default 3600; `0` = none), and `events` (log clicks, scroll, cursor, and key presses to `<recording>.events.jsonl`; `keys` = `masked` by default or `shortcuts`). Returns a session id and output path. |
|
|
53
53
|
| `stop_recording` | Stop a session by id. Sends ffmpeg a graceful quit so the file is **finalized, not truncated**. Returns the final path and duration. |
|
|
54
54
|
| `list_sessions` | List active and finished sessions. |
|
|
55
55
|
| `get_session` | Inspect a single session by id. |
|
|
56
|
-
| `
|
|
56
|
+
| `read_events` | Read a recording's input event log (clicks, scroll, cursor, key presses) on the video's clock. Opt in with `start_recording` `events: true`. |
|
|
57
|
+
| `screenshot` | Capture a single PNG of a `target`, and return it inline as an image the model can view. |
|
|
57
58
|
| `list_audio_devices` | List the DirectShow audio devices ffmpeg can see and flag a likely system-audio loopback device for `start_recording`. |
|
|
58
59
|
|
|
59
60
|
### Watch
|
|
60
61
|
|
|
61
62
|
| Tool | Purpose |
|
|
62
63
|
| --- | --- |
|
|
63
|
-
| `sample_frames` | Extract frames from a video — at a fixed `fps
|
|
64
|
+
| `sample_frames` | Extract frames from a video — at a fixed `fps`, at explicit `timestamps`, or only where the screen changed (`mode: "scenes"`) — so the agent can view what happened. Returns the frame paths, with the first few frames inline as images. |
|
|
65
|
+
| `contact_sheet` | Tile timestamped frames into **one** image (evenly spaced, or at the scene changes) so the agent sees a whole recording in a single look; returned inline. `poster: true` writes one representative frame instead. |
|
|
66
|
+
| `screen_diff` | Compare two screenshots/frames: SSIM score, share changed, and **bounding boxes of what changed**, with the changes outlined in an inline image. Verify a UI change happened, and only where expected. |
|
|
67
|
+
| `wait_for_change` | Watch a target and return when it **changes** (a dialog opened) or **settles** (a build or page finished), instead of guessing a sleep. Reports elapsed time, changed regions, and the final state inline. |
|
|
68
|
+
| `find_text` | **Read text** on screen or in a frame with the OCR engine built into Windows (no install): every line and match with its bounding box. Locate a button by its label, check what the screen says, or find secrets (`regex: "sk-|ghp_"`) and get `redact_region` rectangles with `redact: true`. Best-effort; review before relying on it. |
|
|
64
69
|
| `get_media_info` | ffprobe wrapper: duration, resolution, fps, codecs, container format, and size. |
|
|
65
70
|
|
|
66
71
|
### Minimal edit
|
|
@@ -70,6 +75,7 @@ Twenty-five tools across four concerns. The manifest in [`mcp-tools.json`](mcp-t
|
|
|
70
75
|
| `trim` | Cut a sub-clip by `start` + (`end` or `duration`). Stream-copy for speed. |
|
|
71
76
|
| `concat` | Join two or more videos into one. |
|
|
72
77
|
| `convert` | Convert between `mp4`, `gif`, and `webm`. |
|
|
78
|
+
| `export_gif` | Animated **GIF or WebP that fits a size budget** (default: GitHub's 10 MB image limit) for PRs, issues, and READMEs. Two-stage palette for GIF; steps fps, width, and palette/quality down until it fits, and reports the settings used. |
|
|
73
79
|
|
|
74
80
|
### Edit surface
|
|
75
81
|
|
|
@@ -81,9 +87,15 @@ These tools re-encode (a filter rewrites pixels, so stream copy does not apply).
|
|
|
81
87
|
| `scale` | Resize to a `width` and/or `height`. One side keeps the aspect ratio; both set an exact size. |
|
|
82
88
|
| `speed` | Change playback speed by a `factor` (>1 faster, <1 slower). Audio is retempo'd when present. |
|
|
83
89
|
| `overlay` | Composite a logo, watermark, or picture-in-picture onto a base video at a position, optionally scaled and time-limited. |
|
|
90
|
+
| `callout` | **Timed annotations**: boxes, text labels, and arrows at any angle, each shown between two timestamps. Mark the bug, point at the button, caption a step. |
|
|
84
91
|
| `compress` | Re-encode smaller with a `light`/`medium`/`heavy` CRF ladder and an optional `maxWidth` that only downscales. |
|
|
85
92
|
| `extract_audio` | Write the audio track to its own file (`mp3`, `aac`, `wav`, or `copy`). |
|
|
93
|
+
| `normalize_audio` | **Loudness to a delivery target** (two-pass EBU R128 `loudnorm`): `youtube` −14 LUFS, `podcast` −16, `broadcast` −23, or any LUFS value. Video is copied; reports loudness before and after. |
|
|
94
|
+
| `denoise` | Reduce **steady** background noise (fan, hum, hiss) with `afftdn`, tuned to the file's measured noise floor. Video is copied. |
|
|
95
|
+
| `transcribe` | **Speech to an SRT file, locally**, with FFmpeg 8's `whisper` filter (needs a whisper.cpp model: pass `model` or set `SCREENCAST_WHISPER_MODEL`). Cues are renumbered and de-overlapped. |
|
|
96
|
+
| `burn_subtitles` | Burn an SRT/ASS into the video in the bundled font: `clean` (outlined line) or `social` (big bold text on a dark box, for muted autoplay). |
|
|
86
97
|
| `clip` | Extract one or more frame-accurate sub-segments to separate files. Unlike `trim`, it re-encodes so cuts land exactly on the given times. |
|
|
98
|
+
| `cut_idle` | **Remove dead air**: cut stretches where the screen is frozen and (when there is audio) silent, keeping a short pad at each edge. `dryRun` reports first; speech over a still screen is kept unless `useAudio: false`. |
|
|
87
99
|
|
|
88
100
|
### Redact
|
|
89
101
|
|
|
@@ -105,6 +117,7 @@ The production layer turns raw clips into a finished piece. Tools that combine c
|
|
|
105
117
|
| `title_card` | Generate a standalone title card (centered text on a solid background, with a silent track so it composes). Text uses a bundled font, so no system font is needed. |
|
|
106
118
|
| `music_bed` | Lay a music track under a video: looped/trimmed to length, faded in and out, leveled, and mixed with any existing audio (optionally ducked). |
|
|
107
119
|
| `reframe` | Re-aspect to `16:9`, `9:16`, `1:1`, or `4:5` with `pad` (letterbox, no content lost) or `crop` (fill, trims overflow). |
|
|
120
|
+
| `zoom` | **Smooth zoom-and-pan** (Screen Studio style) into where the action is and back out. Give keyframes (rectangles by time), or let it plan them from where the screen changes; `dryRun` returns the plan to adjust. |
|
|
108
121
|
| `export_preset` | Encode a platform-ready file (`youtube`, `instagram_reel`, `tiktok`, `x`, `square`): reframes, caps fps, and encodes H.264 at the platform bitrate with faststart. |
|
|
109
122
|
|
|
110
123
|
### Targets
|
|
@@ -118,10 +131,14 @@ Every capture tool takes a single `target` string, so an agent never has to jugg
|
|
|
118
131
|
| `window:<title>` | The on-screen rectangle a window occupies (case-insensitive exact title, else substring; topmost wins) |
|
|
119
132
|
| `region:<x>,<y>,<w>,<h>` | An absolute pixel rectangle |
|
|
120
133
|
|
|
134
|
+
For `window:` targets, `screenshot` and `start_recording` both report `matchedWindow`, `matchCount`, `matchKind` (`exact` or `substring`), and the captured `region`. When the title matched only as a substring, or several windows matched, the result carries a `windowWarning` listing the candidate titles, so a generic title like `window:Code` cannot quietly record a different window. Pass `exactTitle: true` to refuse the substring fallback entirely.
|
|
135
|
+
|
|
121
136
|
Set `SCREENCAST_MAX_RECORDING_SEC` to change the default recording cap (`0` disables it).
|
|
122
137
|
|
|
123
138
|
Output is written under `SCREENCAST_HOME` (default `<homedir>/.screencast-mcp`) into `recordings/`, `frames/`, `screenshots/`, and `edits/`. Any tool also accepts an explicit output path.
|
|
124
139
|
|
|
140
|
+
Edit and produce tools write to a `<name>.partial.<ext>` file next to the output and rename it into place only when ffmpeg succeeds, so a failed, timed-out, or cancelled job never leaves a truncated file at `output`. The job timeout scales with the media's length (at least 10 minutes, or 4x the duration); set `SCREENCAST_JOB_TIMEOUT_MS` to override it. Clients that send a progress token get `notifications/progress` updates while a job runs, and cancelling the request stops ffmpeg.
|
|
141
|
+
|
|
125
142
|
## Prerequisites
|
|
126
143
|
|
|
127
144
|
`ffmpeg` and `ffprobe` are external dependencies and must be on `PATH` (or pointed at via the `FFMPEG_PATH` / `FFPROBE_PATH` environment variables). The server detects them per call and returns a clear error with an install hint if either is missing.
|
|
@@ -134,6 +151,10 @@ Output is written under `SCREENCAST_HOME` (default `<homedir>/.screencast-mcp`)
|
|
|
134
151
|
|
|
135
152
|
## Installation
|
|
136
153
|
|
|
154
|
+
**Claude Desktop (one click):** download `screencast-mcp-<version>.mcpb` from the [latest release](https://github.com/TMHSDigital/screencast-mcp/releases/latest) and open it, or drag it into Settings > Extensions. Claude Desktop installs it with its own Node runtime. You can optionally pick an output folder, and point at `ffmpeg.exe` / `ffprobe.exe` if they are not on `PATH`.
|
|
155
|
+
|
|
156
|
+
**Any MCP client (npm):**
|
|
157
|
+
|
|
137
158
|
```bash
|
|
138
159
|
npm install -g @tmhs/screencast-mcp
|
|
139
160
|
```
|
|
@@ -165,6 +186,8 @@ npm run build # produces dist/index.js, the server entry point
|
|
|
165
186
|
|
|
166
187
|
## Usage
|
|
167
188
|
|
|
189
|
+
**Workflows:** copy-paste recipes with the tool calls and real outputs are on the docs site: [bug-repro clip for a PR](https://tmhsdigital.github.io/screencast-mcp/workflows/bug-repro.html), [README demo GIF](https://tmhsdigital.github.io/screencast-mcp/workflows/demo-gif.html), [agent UI verification loop](https://tmhsdigital.github.io/screencast-mcp/workflows/verify-ui.html), [social clip](https://tmhsdigital.github.io/screencast-mcp/workflows/social-clip.html), and [reviewing a long recording](https://tmhsdigital.github.io/screencast-mcp/workflows/review-recording.html). Setup for Claude Code, Claude Desktop, Cursor, and VS Code: [Connect your client](https://tmhsdigital.github.io/screencast-mcp/connect.html).
|
|
190
|
+
|
|
168
191
|
A typical watch loop — record, sample, look:
|
|
169
192
|
|
|
170
193
|
```jsonc
|
|
@@ -176,17 +199,37 @@ start_recording { "target": "region:0,0,1280,720", "quality": "draft" }
|
|
|
176
199
|
stop_recording { "sessionId": "rec-…" }
|
|
177
200
|
// -> { "durationSec": 4.2, "finalizedGracefully": true }
|
|
178
201
|
|
|
179
|
-
// 3.
|
|
202
|
+
// 3. look at it: the frames come back inline, so the model sees them directly
|
|
180
203
|
sample_frames { "input": "…/recordings/rec-….mp4", "timestamps": [0.5, 2, 3.5] }
|
|
181
|
-
// -> { "frames": ["…/frames/…/frame_000_0.5s.png", …] }
|
|
204
|
+
// -> { "frames": ["…/frames/…/frame_000_0.5s.png", …], "inlineImages": 3 }
|
|
205
|
+
// + 3 image blocks the client shows to the model
|
|
182
206
|
```
|
|
183
207
|
|
|
184
|
-
`
|
|
208
|
+
Don't know where to look? `sample_frames { "input": "…", "mode": "scenes" }` returns only the frames where the screen actually changed (plus the opening frame), with their `frameTimes`. Screen recordings are mostly static, so this is usually far cheaper than a fixed rate. `sceneThreshold` (default 0.1) sets how big a change counts, and in `fps` mode `dedupe: true` drops near-identical frames.
|
|
209
|
+
|
|
210
|
+
`screenshot { "target": "window:My App" }` is the one-shot equivalent for a still, and also returns the image inline.
|
|
211
|
+
|
|
212
|
+
Inline images are downscaled JPEGs (`maxImageWidth`, default 1280) and capped per call (`maxInlineImages`, default 8, max 20); the full-resolution PNGs stay on disk. Pass `returnImage: false` / `returnImages: false` to get paths only.
|
|
213
|
+
|
|
214
|
+
`sample_frames` writes at most `maxFrames` frames per call (default 100, max 1000). In `fps` mode it probes the video first; if the rate would exceed the cap, it samples at a lower rate so the frames still span the whole video, and the result's `capNote` says what it did.
|
|
215
|
+
|
|
216
|
+
## Prompts and resources
|
|
217
|
+
|
|
218
|
+
Beyond tools, the server offers **prompts**: ready-made workflows that clients such as Claude Code and VS Code show as slash commands.
|
|
219
|
+
|
|
220
|
+
| Prompt | What it does |
|
|
221
|
+
| --- | --- |
|
|
222
|
+
| `bug-repro-clip` | Record, find the bug moment, check for secrets, trim, annotate, and export a GIF for an issue. |
|
|
223
|
+
| `demo-gif` | Record a feature walkthrough and export a GIF small enough for a README or PR. |
|
|
224
|
+
| `verify-ui-change` | Screenshot before, make the change, wait for the screen to settle, diff, and confirm the text. |
|
|
225
|
+
| `review-recording` | Summarize what happens in a recording, with timestamps. |
|
|
226
|
+
|
|
227
|
+
It also offers **resources**, so a client can list and attach recordings without a filesystem tool: `screencast://sessions` (every session), `screencast://sessions/{id}` (one session), and `screencast://sessions/{id}/poster` (a JPEG preview frame). Clients are notified when a recording starts or stops.
|
|
185
228
|
|
|
186
229
|
## Windows notes
|
|
187
230
|
|
|
188
231
|
- **Multi-monitor offsets.** `gdigrab` has no "capture monitor N" selector, so a monitor target captures the whole virtual desktop and crops to that display's pixel bounds (from `System.Windows.Forms.Screen.AllScreens`). `monitor:1` grabs the second display at its real offset; `monitor:0` is always primary.
|
|
189
|
-
- **Window capture** resolves the window to the on-screen **rectangle** it occupies and captures that, rather than the window's own surface — `gdigrab`'s native `title=` grab returns a blank frame for GPU- or DirectComposition-composited windows (Chrome, Electron, UWP). The window must be **visible, on top, and not minimized** (a minimized window is rejected with a clear error), the capture includes anything drawn over that rectangle, and for `start_recording` the rectangle is fixed **once at start**.
|
|
232
|
+
- **Window capture** resolves the window to the on-screen **rectangle** it occupies and captures that, rather than the window's own surface — `gdigrab`'s native `title=` grab returns a blank frame for GPU- or DirectComposition-composited windows (Chrome, Electron, UWP). The window must be **visible, on top, and not minimized** (a minimized window is rejected with a clear error), the capture includes anything drawn over that rectangle, and for `start_recording` the rectangle is fixed **once at start**. For stills, `backend: "wgc"` on `screenshot` and `find_text` captures the window's **own surface** through Windows Graphics Capture (FFmpeg 8+ `gfxcapture`, by window handle), even when other windows cover it. It takes 1-2 s instead of ~0.2 s, so it is opt-in. Recordings stay on the rectangle path: `gfxcapture` only emits a frame when the window repaints, so recording a static window stalls ffmpeg and ignores the graceful stop.
|
|
190
233
|
- **Fullscreen-exclusive apps** often produce black frames under `gdigrab`; run the source in borderless-windowed mode for reliable capture.
|
|
191
234
|
- **System audio needs a loopback device.** `gdigrab` is video-only, so `start_recording` with `audio.source` = `system` captures from a separate dshow input. Windows has no native loopback, so this needs a virtual-audio device (enable Stereo Mix, or install a driver such as screen-capture-recorder's `virtual-audio-capturer` or VB-CABLE). Run `list_audio_devices` to find it. Microphone capture is intentionally not supported.
|
|
192
235
|
|
|
@@ -199,7 +242,8 @@ sample_frames { "input": "…/recordings/rec-….mp4", "timestamps": [0.5, 2, 3.
|
|
|
199
242
|
- **Output stays local.** Files are written to the local filesystem only — never uploaded, streamed, or transmitted anywhere.
|
|
200
243
|
- **Public repo, private captures.** The `.gitignore` blocks recordings, frames, screenshots, and common video/image output so test media cannot be committed by accident.
|
|
201
244
|
- **Review before sharing.** Sample frames or inspect a recording before handing a file to another tool or person, so you know what it contains.
|
|
202
|
-
- **Redaction
|
|
245
|
+
- **Redaction covers what you declare.** `redact_region` covers only the rectangles you specify. `find_text` can help find them: OCR with a query such as `regex: "sk-|ghp_|api.?key"` and `redact: true` returns ready-made rectangles. But OCR is best-effort; it can miss small or stylised text, so treat it as an aid, not a guarantee. Use the default `box` style for a solid irreversible fill, and still review the output before sharing.
|
|
246
|
+
- **The input event log never records what you type.** `start_recording` `events: true` hooks mouse and keyboard input for that recording only, in a helper that exits with it (or with the server). Keys are `masked` by default: the log says a key went down, not which. `keys: "shortcuts"` also names chords held with Ctrl, Alt, or Win (`Ctrl+S`); plain typing, Shift+letter, and AltGr characters stay masked, and no mode records text. Cursor positions and clicks still reveal what you pointed at, so treat `.events.jsonl` like the recording beside it.
|
|
203
247
|
- **System audio is sensitive too.** When `audio.source` = `system`, the recording captures everything playing on the machine (call audio, notifications, media). Treat audio-bearing recordings with the same care as the video.
|
|
204
248
|
|
|
205
249
|
## Project structure
|
|
@@ -214,6 +258,7 @@ sample_frames { "input": "…/recordings/rec-….mp4", "timestamps": [0.5, 2, 3.
|
|
|
214
258
|
│ └── __tests__/ # vitest unit tests + guarded local-capture harness
|
|
215
259
|
├── docs/ # GitHub Pages documentation site
|
|
216
260
|
├── mcp-tools.json # canonical tool manifest (kept in sync with src/tools)
|
|
261
|
+
├── server.json # MCP Registry listing (name matches package.json mcpName)
|
|
217
262
|
├── .github/workflows/ # CI, release, npm publish, Pages, ecosystem drift check
|
|
218
263
|
├── ROADMAP.md · CONTRIBUTING.md · SECURITY.md · LICENSE
|
|
219
264
|
└── package.json
|
package/dist/index.js
CHANGED
|
@@ -18,19 +18,31 @@ import { register as registerStartRecording } from "./tools/startRecording.js";
|
|
|
18
18
|
import { register as registerStopRecording } from "./tools/stopRecording.js";
|
|
19
19
|
import { register as registerListSessions } from "./tools/listSessions.js";
|
|
20
20
|
import { register as registerGetSession } from "./tools/getSession.js";
|
|
21
|
+
import { register as registerReadEvents } from "./tools/readEvents.js";
|
|
21
22
|
import { register as registerScreenshot } from "./tools/screenshot.js";
|
|
22
23
|
import { register as registerSampleFrames } from "./tools/sampleFrames.js";
|
|
24
|
+
import { register as registerContactSheet } from "./tools/contactSheet.js";
|
|
25
|
+
import { register as registerScreenDiff } from "./tools/screenDiff.js";
|
|
26
|
+
import { register as registerWaitForChange } from "./tools/waitForChange.js";
|
|
27
|
+
import { register as registerFindText } from "./tools/findText.js";
|
|
23
28
|
import { register as registerGetMediaInfo } from "./tools/getMediaInfo.js";
|
|
24
29
|
import { register as registerTrim } from "./tools/trim.js";
|
|
25
30
|
import { register as registerConcat } from "./tools/concat.js";
|
|
26
31
|
import { register as registerConvert } from "./tools/convert.js";
|
|
32
|
+
import { register as registerExportGif } from "./tools/exportGif.js";
|
|
27
33
|
import { register as registerCrop } from "./tools/crop.js";
|
|
28
34
|
import { register as registerScale } from "./tools/scale.js";
|
|
29
35
|
import { register as registerSpeed } from "./tools/speed.js";
|
|
30
36
|
import { register as registerOverlay } from "./tools/overlay.js";
|
|
37
|
+
import { register as registerCallout } from "./tools/callout.js";
|
|
31
38
|
import { register as registerCompress } from "./tools/compress.js";
|
|
32
39
|
import { register as registerExtractAudio } from "./tools/extractAudio.js";
|
|
40
|
+
import { register as registerNormalizeAudio } from "./tools/normalizeAudio.js";
|
|
41
|
+
import { register as registerDenoise } from "./tools/denoise.js";
|
|
42
|
+
import { register as registerTranscribe } from "./tools/transcribe.js";
|
|
43
|
+
import { register as registerBurnSubtitles } from "./tools/burnSubtitles.js";
|
|
33
44
|
import { register as registerClip } from "./tools/clip.js";
|
|
45
|
+
import { register as registerCutIdle } from "./tools/cutIdle.js";
|
|
34
46
|
import { register as registerRedactRegion } from "./tools/redactRegion.js";
|
|
35
47
|
import { register as registerListAudioDevices } from "./tools/listAudioDevices.js";
|
|
36
48
|
import { register as registerXfadeTransition } from "./tools/xfadeTransition.js";
|
|
@@ -38,7 +50,10 @@ import { register as registerAssembleHighlights } from "./tools/assembleHighligh
|
|
|
38
50
|
import { register as registerTitleCard } from "./tools/titleCard.js";
|
|
39
51
|
import { register as registerMusicBed } from "./tools/musicBed.js";
|
|
40
52
|
import { register as registerReframe } from "./tools/reframe.js";
|
|
53
|
+
import { register as registerZoom } from "./tools/zoom.js";
|
|
41
54
|
import { register as registerExportPreset } from "./tools/exportPreset.js";
|
|
55
|
+
import { registerResources } from "./resources.js";
|
|
56
|
+
import { registerPrompts } from "./prompts.js";
|
|
42
57
|
// Resolves from src/ in dev and dist/ in the published package alike; keeps
|
|
43
58
|
// the advertised version from drifting from package.json (the hardcoded
|
|
44
59
|
// string here had already fallen behind twice).
|
|
@@ -51,19 +66,31 @@ registerStartRecording(server);
|
|
|
51
66
|
registerStopRecording(server);
|
|
52
67
|
registerListSessions(server);
|
|
53
68
|
registerGetSession(server);
|
|
69
|
+
registerReadEvents(server);
|
|
54
70
|
registerScreenshot(server);
|
|
55
71
|
registerSampleFrames(server);
|
|
72
|
+
registerContactSheet(server);
|
|
73
|
+
registerScreenDiff(server);
|
|
74
|
+
registerWaitForChange(server);
|
|
75
|
+
registerFindText(server);
|
|
56
76
|
registerGetMediaInfo(server);
|
|
57
77
|
registerTrim(server);
|
|
58
78
|
registerConcat(server);
|
|
59
79
|
registerConvert(server);
|
|
80
|
+
registerExportGif(server);
|
|
60
81
|
registerCrop(server);
|
|
61
82
|
registerScale(server);
|
|
62
83
|
registerSpeed(server);
|
|
63
84
|
registerOverlay(server);
|
|
85
|
+
registerCallout(server);
|
|
64
86
|
registerCompress(server);
|
|
65
87
|
registerExtractAudio(server);
|
|
88
|
+
registerNormalizeAudio(server);
|
|
89
|
+
registerDenoise(server);
|
|
90
|
+
registerTranscribe(server);
|
|
91
|
+
registerBurnSubtitles(server);
|
|
66
92
|
registerClip(server);
|
|
93
|
+
registerCutIdle(server);
|
|
67
94
|
registerRedactRegion(server);
|
|
68
95
|
registerListAudioDevices(server);
|
|
69
96
|
registerXfadeTransition(server);
|
|
@@ -71,7 +98,10 @@ registerAssembleHighlights(server);
|
|
|
71
98
|
registerTitleCard(server);
|
|
72
99
|
registerMusicBed(server);
|
|
73
100
|
registerReframe(server);
|
|
101
|
+
registerZoom(server);
|
|
74
102
|
registerExportPreset(server);
|
|
103
|
+
registerResources(server);
|
|
104
|
+
registerPrompts(server);
|
|
75
105
|
async function main() {
|
|
76
106
|
// Reconcile any sessions interrupted by a previous crash and kill ffmpeg
|
|
77
107
|
// children that outlived the last run, so no zombie capture survives.
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
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AAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAC/D,CAAC;YACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,MAAM,cAAc,OAAO,CAAC,MAAM,kBAAkB,CAAC,CAAC;QAC1F,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,4BAA4B,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CACjF,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,gBAAgB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAC3E,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
/** The workflow texts, exported so tests can check they name real tools. */
|
|
3
|
+
export declare const PROMPT_TEXT: {
|
|
4
|
+
bugReproClip: (target: string, notes: string) => string;
|
|
5
|
+
demoGif: (target: string, maxMB: string) => string;
|
|
6
|
+
verifyUiChange: (target: string, expectation: string) => string;
|
|
7
|
+
reviewRecording: (path: string) => string;
|
|
8
|
+
};
|
|
9
|
+
export declare function registerPrompts(server: McpServer): void;
|
|
10
|
+
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,4EAA4E;AAC5E,eAAO,MAAM,WAAW;2BACC,MAAM,SAAS,MAAM;sBAU1B,MAAM,SAAS,MAAM;6BASd,MAAM,eAAe,MAAM;4BAU5B,MAAM;CAQ/B,CAAC;AAEF,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAiDvD"}
|
package/dist/prompts.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP prompts (#126): ready-made workflows that clients surface as slash
|
|
3
|
+
* commands, so a user can run a whole job without knowing the tools. Each
|
|
4
|
+
* prompt returns one user message spelling out the tool sequence.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
const message = (text) => ({ messages: [{ role: "user", content: { type: "text", text } }] });
|
|
8
|
+
/** The workflow texts, exported so tests can check they name real tools. */
|
|
9
|
+
export const PROMPT_TEXT = {
|
|
10
|
+
bugReproClip: (target, notes) => `Record a short bug-reproduction clip of ${target}.${notes ? ` The bug: ${notes}.` : ""}
|
|
11
|
+
|
|
12
|
+
1. start_recording { target: "${target}", quality: "standard" }, then tell me to reproduce the bug (or reproduce it yourself if you can drive the app), and stop_recording when done.
|
|
13
|
+
2. sample_frames { input: <recording>, mode: "scenes" } to see what happened, and describe the moment the bug appears.
|
|
14
|
+
3. find_text { input: <recording>, timestamp: <a frame that shows it>, query: "sk-|ghp_|api.?key|token|password", regex: true, redact: true }. If anything sensitive is visible, redact_region it before sharing.
|
|
15
|
+
4. trim (or clip) to the few seconds around the bug, and callout to box or point at it.
|
|
16
|
+
5. export_gif { input: <clip>, maxBytes: 10000000 } so it can be pasted into an issue or PR.
|
|
17
|
+
Report the final file path, what the clip shows, and anything you redacted.`,
|
|
18
|
+
demoGif: (target, maxMB) => `Make a demo GIF of ${target} for a README or PR, under ${maxMB} MB.
|
|
19
|
+
|
|
20
|
+
1. start_recording { target: "${target}" }, walk through the feature (or ask me to), then stop_recording.
|
|
21
|
+
2. contact_sheet { input: <recording>, mode: "scenes" } to see the whole run at a glance and pick the best stretch.
|
|
22
|
+
3. trim to that stretch (skip any audio steps: a GIF has no sound).
|
|
23
|
+
4. export_gif { input: <clip>, maxBytes: ${Math.round(Number(maxMB) * 1_000_000) || 10_000_000} }. If it does not fit, try format: "webp" or a shorter clip.
|
|
24
|
+
Report the file path, its size, and the settings export_gif chose.`,
|
|
25
|
+
verifyUiChange: (target, expectation) => `Verify a UI change in ${target}. Expected: ${expectation || "(describe what should change)"}.
|
|
26
|
+
|
|
27
|
+
1. screenshot { target: "${target}" } as the "before" image.
|
|
28
|
+
2. Make the change (run the action, reload, or ask me to).
|
|
29
|
+
3. wait_for_change { target: "${target}", mode: "settle" } so you check after the screen has finished updating, not mid-render.
|
|
30
|
+
4. screen_diff { a: <before>, b: <after> } and look at where it changed.
|
|
31
|
+
5. If the expectation mentions text, find_text { target: "${target}", query: <that text> } to confirm it is really on screen.
|
|
32
|
+
Say whether the change happened, whether anything changed that should not have, and show the evidence.`,
|
|
33
|
+
reviewRecording: (path) => `Review the recording at ${path} and tell me what happens in it.
|
|
34
|
+
|
|
35
|
+
1. get_media_info { input: "${path}" } for length and resolution.
|
|
36
|
+
2. contact_sheet { input: "${path}" } for an overview of the whole recording in one image.
|
|
37
|
+
3. sample_frames { input: "${path}", mode: "scenes" } to look closely at each change.
|
|
38
|
+
4. If there is on-screen text worth quoting, find_text on the relevant frame.
|
|
39
|
+
Give a timestamped summary of the main steps and anything that looks wrong.`,
|
|
40
|
+
};
|
|
41
|
+
export function registerPrompts(server) {
|
|
42
|
+
server.registerPrompt("bug-repro-clip", {
|
|
43
|
+
title: "Record a bug reproduction",
|
|
44
|
+
description: "Record a target, find the bug moment, redact secrets, trim, annotate, and export a GIF for an issue.",
|
|
45
|
+
argsSchema: {
|
|
46
|
+
target: z.string().optional().describe("What to record, e.g. window:My App (default: full)."),
|
|
47
|
+
notes: z.string().optional().describe("What the bug is."),
|
|
48
|
+
},
|
|
49
|
+
}, ({ target, notes }) => message(PROMPT_TEXT.bugReproClip(target || "full", notes ?? "")));
|
|
50
|
+
server.registerPrompt("demo-gif", {
|
|
51
|
+
title: "Make a demo GIF",
|
|
52
|
+
description: "Record a feature walkthrough and export a GIF small enough for a README or PR.",
|
|
53
|
+
argsSchema: {
|
|
54
|
+
target: z.string().optional().describe("What to record (default: full)."),
|
|
55
|
+
maxMB: z.string().optional().describe("Size budget in MB (default 10)."),
|
|
56
|
+
},
|
|
57
|
+
}, ({ target, maxMB }) => message(PROMPT_TEXT.demoGif(target || "full", maxMB || "10")));
|
|
58
|
+
server.registerPrompt("verify-ui-change", {
|
|
59
|
+
title: "Verify a UI change",
|
|
60
|
+
description: "Screenshot before, make the change, wait for the screen to settle, diff, and check the text.",
|
|
61
|
+
argsSchema: {
|
|
62
|
+
target: z.string().optional().describe("What to watch (default: full)."),
|
|
63
|
+
expectation: z.string().optional().describe("What should change."),
|
|
64
|
+
},
|
|
65
|
+
}, ({ target, expectation }) => message(PROMPT_TEXT.verifyUiChange(target || "full", expectation ?? "")));
|
|
66
|
+
server.registerPrompt("review-recording", {
|
|
67
|
+
title: "Review a recording",
|
|
68
|
+
description: "Summarize what happens in a recording, with timestamps, using a contact sheet and scene frames.",
|
|
69
|
+
argsSchema: { path: z.string().describe("Path to the recording.") },
|
|
70
|
+
}, ({ path }) => message(PROMPT_TEXT.reviewRecording(path)));
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC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CAAC,wBAAwB,CAAC,EAAE;KACpE,EACD,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CACzD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../src/resources.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAoB,MAAM,yCAAyC,CAAC;AAiBtF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA0DzD"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP resources (#126): recording sessions as resources a client can list,
|
|
3
|
+
* read, and attach, without a filesystem tool.
|
|
4
|
+
*
|
|
5
|
+
* screencast://sessions every session (JSON)
|
|
6
|
+
* screencast://sessions/{id} one session's record (JSON)
|
|
7
|
+
* screencast://sessions/{id}/poster a JPEG preview frame of its recording
|
|
8
|
+
*
|
|
9
|
+
* Clients are told when the list changes (a recording starts or stops).
|
|
10
|
+
*/
|
|
11
|
+
import { existsSync, rmSync } from "node:fs";
|
|
12
|
+
import { ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
13
|
+
import { getStore } from "./context.js";
|
|
14
|
+
import { ScreencastError } from "./utils/errors.js";
|
|
15
|
+
import { runFfmpeg, probeMedia } from "./utils/ffmpeg.js";
|
|
16
|
+
import { encodeInlineImages } from "./utils/images.js";
|
|
17
|
+
import { tempPath } from "./utils/paths.js";
|
|
18
|
+
const json = (uri, value) => ({
|
|
19
|
+
contents: [{ uri, mimeType: "application/json", text: JSON.stringify(value, null, 2) }],
|
|
20
|
+
});
|
|
21
|
+
function sessionOrThrow(id) {
|
|
22
|
+
const s = getStore().get(id);
|
|
23
|
+
if (!s)
|
|
24
|
+
throw new ScreencastError(`No session with id ${id}.`);
|
|
25
|
+
return s;
|
|
26
|
+
}
|
|
27
|
+
export function registerResources(server) {
|
|
28
|
+
server.registerResource("sessions", "screencast://sessions", {
|
|
29
|
+
title: "Recording sessions",
|
|
30
|
+
description: "Every recording session (active and finished), newest first.",
|
|
31
|
+
mimeType: "application/json",
|
|
32
|
+
}, (uri) => json(uri.href, getStore().list()));
|
|
33
|
+
server.registerResource("session", new ResourceTemplate("screencast://sessions/{id}", {
|
|
34
|
+
list: () => ({
|
|
35
|
+
resources: getStore().list().map((s) => ({
|
|
36
|
+
uri: `screencast://sessions/${s.id}`,
|
|
37
|
+
name: s.id,
|
|
38
|
+
title: `${s.status}: ${s.target}`,
|
|
39
|
+
description: `${s.target} -> ${s.outputPath}`,
|
|
40
|
+
mimeType: "application/json",
|
|
41
|
+
})),
|
|
42
|
+
}),
|
|
43
|
+
}), { title: "Recording session", description: "One session's record.", mimeType: "application/json" }, (uri, { id }) => {
|
|
44
|
+
const s = sessionOrThrow(String(id));
|
|
45
|
+
return json(uri.href, { ...s, fileExists: existsSync(s.outputPath) });
|
|
46
|
+
});
|
|
47
|
+
server.registerResource("session-poster", new ResourceTemplate("screencast://sessions/{id}/poster", { list: undefined }), {
|
|
48
|
+
title: "Recording preview",
|
|
49
|
+
description: "A JPEG frame from the middle of a session's recording.",
|
|
50
|
+
mimeType: "image/jpeg",
|
|
51
|
+
}, async (uri, { id }) => {
|
|
52
|
+
const s = sessionOrThrow(String(id));
|
|
53
|
+
if (!existsSync(s.outputPath))
|
|
54
|
+
throw new ScreencastError(`Recording file not found: ${s.outputPath}`);
|
|
55
|
+
const { durationSec } = await probeMedia(s.outputPath);
|
|
56
|
+
const frame = tempPath(".png");
|
|
57
|
+
try {
|
|
58
|
+
await runFfmpeg(["-y", "-v", "error", "-ss", String((durationSec ?? 0) / 2), "-i", s.outputPath, "-frames:v", "1", frame], 30_000);
|
|
59
|
+
const [image] = (await encodeInlineImages([frame], 960, 1)).images;
|
|
60
|
+
return { contents: [{ uri: uri.href, mimeType: image.mimeType, blob: image.data }] };
|
|
61
|
+
}
|
|
62
|
+
finally {
|
|
63
|
+
rmSync(frame, { force: true });
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
getStore().onChange(() => {
|
|
67
|
+
if (server.isConnected())
|
|
68
|
+
server.sendResourceListChanged();
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../src/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAa,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE,KAAc,EAAE,EAAE,CAAC,CAAC;IAC7C,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,kBAAkB,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;CACxF,CAAC,CAAC;AAEH,SAAS,cAAc,CAAC,EAAU;IAChC,MAAM,CAAC,GAAG,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC7B,IAAI,CAAC,CAAC;QAAE,MAAM,IAAI,eAAe,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;IAC/D,OAAO,CAAC,CAAC;AACX,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAAiB;I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AC,CACF,CAAC;IAEF,QAAQ,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE;QACvB,IAAI,MAAM,CAAC,WAAW,EAAE;YAAE,MAAM,CAAC,uBAAuB,EAAE,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembleHighlights.d.ts","sourceRoot":"","sources":["../../src/tools/assembleHighlights.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"assembleHighlights.d.ts","sourceRoot":"","sources":["../../src/tools/assembleHighlights.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA4BzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA+ChD"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import { errorResponse, okResponse, ScreencastError } from "../utils/errors.js";
|
|
4
|
-
import { requireFfmpeg,
|
|
4
|
+
import { requireFfmpeg, probeMedia } from "../utils/ffmpeg.js";
|
|
5
|
+
import { runEditJob } from "../utils/jobs.js";
|
|
5
6
|
import { buildAssembleArgs, DEFAULT_TRANSITION_DUR } from "../utils/produce.js";
|
|
6
7
|
import { resolveOutput, subdir, stamp, rand } from "../utils/paths.js";
|
|
7
8
|
const inputSchema = {
|
|
@@ -27,7 +28,7 @@ const inputSchema = {
|
|
|
27
28
|
export function register(server) {
|
|
28
29
|
server.tool("assemble_highlights", "Stitch two or more clips into a single video, with hard cuts or an xfade " +
|
|
29
30
|
"transition between each. Clips are auto-normalized to a common " +
|
|
30
|
-
"resolution, fps, and audio rate, so they need not match.", inputSchema, async (args) => {
|
|
31
|
+
"resolution, fps, and audio rate, so they need not match.", inputSchema, async (args, extra) => {
|
|
31
32
|
try {
|
|
32
33
|
requireFfmpeg();
|
|
33
34
|
for (const f of args.clips) {
|
|
@@ -45,7 +46,7 @@ export function register(server) {
|
|
|
45
46
|
height: args.height,
|
|
46
47
|
fps: args.fps,
|
|
47
48
|
}, clipHasAudio);
|
|
48
|
-
await
|
|
49
|
+
await runEditJob(ffArgs, { output, durationSec: durations.reduce((a, d) => a + d, 0) || null, extra });
|
|
49
50
|
return okResponse({
|
|
50
51
|
outputPath: output,
|
|
51
52
|
clips: args.clips.length,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembleHighlights.js","sourceRoot":"","sources":["../../src/tools/assembleHighlights.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"assembleHighlights.js","sourceRoot":"","sources":["../../src/tools/assembleHighlights.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEvE,MAAM,WAAW,GAAG;IAClB,KAAK,EAAE,CAAC;SACL,KAAK,CAAC,CAAC,CAAC,MAAM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K,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;gBACxB,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,KAAK;gBACpC,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC;aAClC,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"burnSubtitles.d.ts","sourceRoot":"","sources":["../../src/tools/burnSubtitles.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAmBzE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA8BhD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { dirname, extname } from "node:path";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { errorResponse, okResponse, ScreencastError } from "../utils/errors.js";
|
|
5
|
+
import { requireFfmpeg, probeMedia, hasFilter } from "../utils/ffmpeg.js";
|
|
6
|
+
import { runEditJob } from "../utils/jobs.js";
|
|
7
|
+
import { buildBurnSubtitlesArgs } from "../utils/captions.js";
|
|
8
|
+
import { bundledFontPath } from "../utils/fonts.js";
|
|
9
|
+
import { resolveOutput, subdir, stamp, rand } from "../utils/paths.js";
|
|
10
|
+
const inputSchema = {
|
|
11
|
+
input: z.string().min(1).describe("Path to the source video."),
|
|
12
|
+
subtitles: z.string().min(1).describe("Path to an .srt (e.g. from transcribe) or .ass subtitle file."),
|
|
13
|
+
style: z
|
|
14
|
+
.enum(["clean", "social"])
|
|
15
|
+
.optional()
|
|
16
|
+
.describe("'clean' (default): a modest outlined line. 'social': large bold text on a dark box, for muted autoplay."),
|
|
17
|
+
output: z.string().optional().describe("Optional output path. Defaults under SCREENCAST_HOME/edits."),
|
|
18
|
+
overwrite: z.boolean().optional().describe("Allow replacing an existing file at the output path (default false)."),
|
|
19
|
+
};
|
|
20
|
+
export function register(server) {
|
|
21
|
+
server.tool("burn_subtitles", "Burn subtitles (an SRT from transcribe, or any SRT/ASS) permanently into a video, in " +
|
|
22
|
+
"the bundled font, in a clean or social-media style. Returns the output path.", inputSchema, async (args, extra) => {
|
|
23
|
+
try {
|
|
24
|
+
requireFfmpeg();
|
|
25
|
+
for (const f of [args.input, args.subtitles]) {
|
|
26
|
+
if (!existsSync(f))
|
|
27
|
+
throw new ScreencastError(`File not found: ${f}`);
|
|
28
|
+
}
|
|
29
|
+
if (!hasFilter("subtitles")) {
|
|
30
|
+
throw new ScreencastError("This ffmpeg has no subtitles filter (it needs libass).", "Install a full ffmpeg build, e.g. `winget install Gyan.FFmpeg`.");
|
|
31
|
+
}
|
|
32
|
+
const ext = extname(args.input) || ".mp4";
|
|
33
|
+
const output = resolveOutput(args.output, subdir("edits"), `subtitled-${stamp()}-${rand()}${ext}`, args.overwrite);
|
|
34
|
+
const fontsDir = dirname(bundledFontPath("regular"));
|
|
35
|
+
const style = args.style ?? "clean";
|
|
36
|
+
await runEditJob(buildBurnSubtitlesArgs(args.input, args.subtitles, output, fontsDir, style), {
|
|
37
|
+
output,
|
|
38
|
+
durationSec: (await probeMedia(args.input)).durationSec,
|
|
39
|
+
extra,
|
|
40
|
+
});
|
|
41
|
+
return okResponse({ outputPath: output, style });
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
return errorResponse(error);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=burnSubtitles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"burnSubtitles.js","sourceRoot":"","sources":["../../src/tools/burnSubtitles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OA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