mcp-screenshot
mcp-screenshot
Русская версия ниже / Russian version below
一个小型模型上下文协议 (MCP) 服务器,让 LLM 能够查看您的桌面,而无需消耗大量上下文。它可以进行单次截图、裁剪鼠标光标周围的区域,并运行定时流式传输会话,将帧保存到磁盘,仅在明确请求时才返回图像字节。
为什么需要它
大多数需要“查看屏幕”的 LLM 工作流要么:
每次调用都将全分辨率 PNG 放入模型上下文中 —— 这会迅速消耗 token 并拖慢对话速度。
运行一个模型无法直接查询的独立视觉管道。
该服务器采取了折中方案。捕获的内容会持久化到磁盘;MCP 工具返回小的元数据块 (filePath、bytes、尺寸、光标信息),仅在您要求 includeBase64=true 或调用 stream_latest 时才返回图像。流式传输会话在内存中保留一个有限的近期帧环形缓冲区,因此以 1 fps 进行的 5 分钟捕获会话也不会耗尽内存。
它还公开了鼠标光标位置和光标下方窗口的标题,因此模型可以进行基础分析(“您正在查看屏幕右上角标题为 X 的窗口”),而无需猜测。
Related MCP server: Webcam MCP
工具
工具 | 功能 |
| 单次捕获。可选光标区域裁剪、格式、质量、调整大小。 |
| 光标坐标 + 前台窗口 + 光标下方的窗口。 |
| 启动定时周期性捕获(间隔 + 持续时间)。 |
| 会话快照:帧数、剩余时间、近期帧。 |
| 从磁盘读取最新帧并以 base64 格式返回。 |
| 提前停止正在运行的会话。磁盘上已有的帧会被保留。 |
| 列出所有已知会话。 |
| 遗忘已完成的会话(释放其内存中的环形缓冲区)。 |
默认值针对 4K 显示器上的易读性进行了调整:
单次截图 — JPEG,质量 82,最长边 2400px。
流式传输 — JPEG,质量 72,最长边 1920px。
当
cursorRadius>0时,光标裁剪保持原始分辨率(不调整大小),除非您明确覆盖maxEdge。
传递 maxEdge: 0 可完全禁用调整大小;传递任何正值可覆盖默认值。
git clone https://github.com/beekamai/mcp-screenshot.git
cd mcp-screenshot
npm install
npm run build通过将 stdio 指向 node dist/index.js,将其连接到任何支持 MCP 的客户端。大多数基于 CLI 的客户端都有一个 mcp add 子命令:
your-mcp-client mcp add screenshot --scope user -- node /absolute/path/to/mcp-screenshot/dist/index.js平台说明
Windows: 通过 PowerShell 使用
System.Drawing。不提供原生二进制文件。光标探测和屏幕捕获均无需管理员权限即可工作。通过display参数支持多显示器选择(0 = 第一个显示器,省略 = 整个虚拟屏幕)。macOS / Linux: 如果已安装,捕获将回退到
screenshot-desktop。目前在 Windows 之外,光标探测仅报告x = -1, y = -1;欢迎贡献代码。
隐私
一切都在本地。服务器作为 stdio 进程运行,捕获的内容默认保存在包旁边的 ./captures/ 目录下,除非您的 MCP 客户端传输这些字节,否则不会通过网络发送任何内容。完成后删除 captures/ 目录即可。
许可证
MIT。
mcp-screenshot (RU)
Небольшой MCP-сервер, который даёт языковой модели возможность видеть рабочий стол, не съедая контекст. Он умеет делать одиночные скриншоты, вырезать область вокруг курсора и запускать сессии покадрового стриминга, которые пишут кадры на диск и возвращают пиксели только тогда, когда модель явно их запросила.
Зачем это нужно
Стандартные подходы к "смотри на экран":
Передавать модели каждый раз PNG в полный размер — токены кончаются быстро, и диалог становится тормозным.
Использовать отдельный vision-конвейер, к которому модель не имеет прямого доступа.
Этот сервер идёт средним путём: каждый снимок сохраняется на диск, а MCP-тулы
возвращают компактный JSON (filePath, размер файла, разрешение,
информация о курсоре). Изображение приходит в ответе только если в screenshot
передан includeBase64=true или если позже вызван stream_latest. У стримов
есть ограниченное кольцо последних кадров в памяти, так что пятиминутная
сессия с частотой 1 fps не разнесёт RAM.
Дополнительно сервер сообщает координаты курсора и заголовок окна под ним — модель может опираться на это, не угадывая ("ты сейчас смотришь на окно X в правом верхнем углу").
Тулы
Тул | Что делает |
| Одиночный снимок. Опционально — обрезка вокруг курсора, формат, качество. |
| Координаты курсора, активное окно и окно под курсором. |
| Запуск таймера с периодической съёмкой (интервал + длительность). |
| Снимок состояния сессии: число кадров, остаток времени, последние кадры. |
| Прочитать последний кадр с диска и вернуть base64. |
| Прервать сессию досрочно. Кадры на диске сохраняются. |
| Список всех сессий. |
| Забыть завершённую сессию (освобождает кольцо в памяти, файлы остаются). |
Дефолты подобраны под 4K-мониторы — текст на интерфейсах остаётся читаемым:
Одиночные снимки — JPEG, качество 82, длинная сторона 2400px.
Стримы — JPEG, качество 72, длинная сторона 1920px.
При
cursorRadius>0обрезка вокруг курсора сохраняется в нативном разрешении (без ресайза), если явно не заданmaxEdge.
maxEdge: 0 полностью отключает уменьшение, любое положительное значение —
переопределяет дефолт.
Установка
git clone https://github.com/beekamai/mcp-screenshot.git
cd mcp-screenshot
npm install
npm run buildПодключение к любому MCP-клиенту — указать запуск node dist/index.js
через stdio. У большинства CLI-клиентов есть подкоманда mcp add:
your-mcp-client mcp add screenshot --scope user -- node /абсолютный/путь/к/mcp-screenshot/dist/index.jsПлатформы
Windows: захват через
System.Drawing(вызов из PowerShell), без бандленных нативных бинарей. Курсорный пробник и скриншоты работают без прав администратора. Мульти-мониторный выбор — параметрdisplay(0— первый монитор, без аргумента — весь виртуальный экран).macOS / Linux: захват — fallback на
screenshot-desktop. Курсорный пробник сейчас возвращаетx = -1, y = -1вне Windows; PR приветствуются.
Приватность
Всё локально. Сервер крутится как stdio-процесс, кадры лежат в ./captures/
рядом с пакетом, ничего не уходит в сеть, пока ваш MCP-клиент сам не передаст
байты дальше. После работы — просто удалите каталог captures/.
Лицензия
MIT.
Available Tools
8 toolscursor_infoA
Return the current mouse cursor position, the foreground window title, and the title of the window directly under the cursor (Windows only; other platforms report position only when available).
Inputs: no named parameters.
screenshotA
Capture a single screenshot of the desktop. Persists the file to disk and optionally returns a base64 payload. Set cursorRadius>0 to crop a square region around the mouse cursor instead of the full screen.
Inputs: cursorRadius, format, quality, maxEdge, +2 more.
stream_dropA
Forget a finished stream session (frees its in-memory ring; on-disk files are preserved).
Inputs: id (required).
stream_latestA
Read the most recent frame of a stream from disk and return it as base64. Use sparingly - this is the path that actually puts pixels into the LLM context.
Inputs: id (required).
stream_listA
List active and completed stream sessions known to this process.
Inputs: no named parameters.
stream_startA
Start a periodic capture session. Saves frames to disk every intervalSeconds for at most durationSeconds, keeping the last ringCapacity frames in memory. Returns a session id used by stream_status / stream_latest / stream_stop. Streams default to disk-only to keep LLM context lean - call stream_latest with includeBase64=true when you actually want to look at a frame.
Inputs: intervalSeconds (required), durationSeconds (required), cursorRadius, format, +3 more.
stream_statusB
Snapshot of a running or finished stream session - frame count, time remaining, last frames metadata.
Inputs: id (required), lastN.
stream_stopA
Stop a running stream early. Frames already on disk remain.
Inputs: id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct role: cursor info, single screenshot, and streaming session management. The streaming tools are all prefixed with 'stream_' and have specific verbs (start, stop, status, etc.), avoiding any overlap with each other or with the non-streaming tools.
The naming is mostly consistent: streaming tools follow a clear 'stream_<verb>' pattern, and 'cursor_info' uses snake_case for a compound name. However, 'screenshot' as a single verb stands out, and the pattern varies slightly (noun_info vs. verb). Overall predictable, with minor deviations.
With 8 tools, the server provides a well-scoped set for screenshot capture: one-off capture, cursor info, and a full streaming lifecycle. The count is neither too high nor too low, fitting the domain nicely.
The tool set covers all major operations: capture a single screenshot, start a stream, monitor its status, retrieve frames, stop early, and clean up memory. There are no obvious gaps for the stated purpose of taking screenshots and streaming screen content.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
Hosted Screenshots MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Related MCP Servers
- FlicenseAqualityDmaintenanceA lightweight Model Context Protocol (MCP) server that enables your LLM to capture screenshots of any specified URL and return only the access URL for the captured image. This tool simplifies the process of generating and sharing webpage snapshots, making it perfect for integrating visual capture ca12-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides LLM agents with direct access to webcam hardware for capturing high-resolution photos and recording video sequences. It enables autonomous agents to monitor environments and interact with the physical world through standard Model Context Protocol tools.6MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that gives any AI assistant eyes and hands on your desktop — screenshots, clicking, typing, OCR, window management, accessibility-tree queries, workflow recording.5Apache 2.0
- AlicenseNot gradedqualityDmaintenanceStandalone MCP server that gives AI agents full GUI control over macOS — screenshots, mouse, keyboard, apps, clipboard, and multi-display — with zero private dependencies.20MIT