Skip to main content
Glama

Local Snagit MCP Server

一个本地 MCP 服务器,能让 GitHub Copilot 使用你机器上已安装的 TechSmith Snagit 来录制演示视频。Copilot 控制录制过程,你负责其余一切——终端演示、部署,或针对已部署应用的 Playwright 会话——然后得到一个 MP4。

它通过 Snagit 自带的 SNAGIT.VideoCapture COM 自动化接口与 Snagit 交互,因此无需模拟热键、无需 UI 脚本,也无需第三方录屏工具。

环境要求

  • Windows

  • Snagit 2023 或更高版本(已安装且已启动至少一次,在 Snagit 2025、25.4.0.8498 上验证)

  • Python 3.10+

Related MCP server: snip-mcp

设置

py -3.12 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e .
.\.venv\Scripts\python.exe -m snagit_mcp --selftest

--selftest 应报告 "ready": true。如果没有,请参阅 故障排查

这个仓库自带了 .vscode/mcp.json,因此打开文件夹时 VS Code 会提示启动该服务器。要在任何工作区中使用,请将同一配置块添加到您的用户级 mcp.json,并使用绝对路径替换 ${workspaceFolder}

录制文件会写入 SNAGIT_MCP_OUTPUT_DIR(默认为工作区 recordings/ 文件夹;如果未设置,则为 %USERPROFILE%\Videos\Snagit MCP)。

环境变量

默认值

用途

SNAGIT_MCP_OUTPUT_DIR

%USERPROFILE%\Videos\Snagit MCP

MP4 文件的写入位置

SNAGIT_MCP_MAX_WAIT_SECONDS

600

wait 工具的上限

SNAGIT_MCP_ENCODE_TIMEOUT_SECONDS

300

stop_recording 等待编码完成的时间

工具

工具

作用

check_snagit_setup

Snagit 版本、COM 可达性、输出文件夹、显示器数量

list_displays

显示器及其像素边界

list_windows

可见窗口及其句柄和边界——用它来找到浏览器

focus_window

在录制前还原并将窗口置于前景

start_recording

将显示器、窗口或固定区域录制为 MP4

recording_status

录制是否正在运行,以及已运行多久

pause_recording / resume_recording

跳过无内容的时段,例如等待部署完成

stop_recording

停止录制,等待编码完成,返回 MP4 路径和时长

wait

稍作停顿,让屏幕上最后的操作清晰可读

list_recordings

输出文件夹中最新的 MP4 文件

还有一个 record_app_demo 提示词(VS Code 中的斜杠命令),它会向 Copilot 提供完整的“镜头清单优先”工作流程。

录制已部署应用的演示

Snagit 录制的是真实屏幕像素,因此浏览器必须可见——请以有头模式运行 Playwright,而不是无头模式。结合 Playwright MCP 服务器,一次会话的流程如下:

  1. Playwright MCP 在一个有头浏览器中打开您的 App Service URL 并登录。

  2. 使用 list_windows 配合 title_contains: "Edge"(或 Chrome)获取浏览器窗口句柄。

  3. 使用 target: "window" 和该句柄调用 start_recording。它会在 Snagit 倒计时结束后返回,因此下一步操作从一开始就在录制画面中。

  4. Playwright 逐步完成操作;在步骤之间夹入 wait,让视频易于跟随。

  5. stop_recording 返回 MP4 路径。

对于在 VS Code、终端、Azure 门户和浏览器之间切换的仓库演示,请使用 target: "fullscreen",并搭配 list_displays 中的 display_index,而不是单个窗口。

用自然语言提出请求即可,例如:

录制一个演示部署流程的视频:在 README 中展示前置条件,运行部署脚本,然后打开 App Service URL 并演示如何创建一条记录。使用显示器 0。

如何驱动 Snagit

这些行为是通过实验确定的,相关时间参数在 src/snagit_mcp/recorder.py 中依赖这些行为:

  • 序列是 Capture() 进入待命,等待 3 秒,然后 Start(),最后 Stop()。在 Capture() 后过早调用 Start() 会产生一个空的 2 KB MP4。

  • Snagit 在 Start() 后会播放约 3.4 秒的倒计时。start_recording 会吸收这段倒计时,只有真正开始录制后才返回。

  • 必须保持 Snagit 的录制工具栏可见。 设置 HideRecordingUI = True 会悄悄把录制截断为几秒。工具栏位于录制区域之外,因此不会出现在视频中。

  • 在此 Snagit 版本中,麦克风和系统音频无法通过 COM 设置——这些 setter 会抛出异常,一次失败的写入可能导致录音引擎卡死。因此音频会跟随 Snagit 自身采集设置中的配置。如果需要解说,请先在那里设置好。

  • RecordingDurationFrameCountAverageFrameRate 只有在 Stop() 之后才有意义;录制期间 recording_status 报告的是服务器自己的真实时钟。

  • 输出会直接写入文件。录制间隔中不会弹出 Snagit 编辑器。

在 Snagit 升级后验证

.\.venv\Scripts\python.exe tests\smoke_recording.py

通过 MCP 工具录制一段真实的 5 秒视频,并检查生成 MP4 的时长。如果未来 Snagit 版本改变了倒计时或待命行为,这个验证可以捕获到问题。

故障排查

症状

解决方法

check_snagit_setup 报 COM 错误

先启动一次 Snagit,让它注册 COM 服务器,然后重试

录制内容为空或只有几秒

捕获引擎卡住了:执行 Stop-Process -Name SnagitCapture -Force,然后重新启动 SnagitCapture.exe

Snagit did not accomplish 报错

Snagit 中已有一个捕获正在打开——取消它,然后重试

在高分辨率显示下区域坐标发生偏移

服务器在启动时设置了每显示器 DPI 感知;请确认 check_snagit_setup 中的 dpi_awareness

关于录制画面中内容的说明

Screen录制会捕捉屏幕上的任何内容,包括终端输出、令牌、门户会话和通知。在开始录制之前,请关闭或清除任何敏感内容,并在共享之前查看 MP4。

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.

  • Voice-powered bug reporting with 13 MCP tools. Record bugs by talking; let AI find and fix them.

  • Remote MCP for Copilot CLI switch gate MCP, structured receipts, audit logs, and reviewer-ready evid

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paullizer/LocalSnagitMCPServer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server