Skip to main content
Glama

caido-screenshot-mcp

MCP-сервер, который делает форматированные скриншоты пар запрос/ответ из Caido Replay, управляя плагином Screenshot Mode.

У Caido нет API для скриншотов — Screenshot Mode — это плагин, работающий только во фронтенде, который рендерит DOM в PNG в браузере. Этот сервер обращается к нему через Chrome DevTools Protocol, нажимает собственную кнопку экспорта плагина и перехватывает полученное изображение до того, как Electron откроет диалог сохранения. На выходе — реальный результат работы плагина, записанный прямо на диск.

Требования

  • Node >= 22 (использует встроенный WebSocket; npm-зависимостей нет)

  • Caido (десктопная версия)

  • Плагин Screenshot Mode, установленный в Caido

  • Caido запущен с флагом --remote-debugging-port (см. ниже)

Related MCP server: Webshot MCP

Установка

git clone <this-repo> caido-screenshot-mcp
cd caido-screenshot-mcp
npm link            # optional: puts `caido-screenshot` on your PATH

Шаг npm install не нужен — зависимостей нет.

Запуск Caido с отладочным портом

Плагин рендерится внутри окна Caido, поэтому серверу нужно обращаться к этому окну. При обычном запуске Caido порт остаётся закрытым, и все вызовы будут завершаться ошибкой.

caido-screenshot launch          # quits nothing; starts Caido with the port open

Или вручную:

# macOS
open -a Caido --args --remote-debugging-port=9222
# Linux
caido --remote-debugging-port=9222
# Windows
"%LOCALAPPDATA%\Programs\Caido\Caido.exe" --remote-debugging-port=9222

Проверьте всё сразу:

caido-screenshot doctor

Использование с Claude Code

claude mcp add caido-screenshot --scope user -- node /absolute/path/to/caido-screenshot-mcp/src/server.mjs

Перезапустите Claude Code. Затем просто попросите: "сделай скриншот текущей сессии Caido replay".

Использование с любым MCP-клиентом

{
  "mcpServers": {
    "caido-screenshot": {
      "command": "node",
      "args": ["/absolute/path/to/caido-screenshot-mcp/src/server.mjs"]
    }
  }
}

Инструмент: caido_screenshot

Параметр

Тип

Описание

out_path

string

Куда сохранить PNG. По умолчанию ~/Downloads/caido-screenshot-<timestamp>.png

collection

string

Коллекция Replay, содержащая сессию. Раскрывается автоматически.

session

string

Сессия Replay для выбора первой, по имени в боковой панели (например, GET /login)

session_id

string

Точный ID сессии Replay. Предпочтителен, так как однозначен.

require_response

boolean

Отклонять сессии только с запросом и устаревшие превью. По умолчанию true.

inline

boolean

Также возвращать изображение в результате (большой объём). По умолчанию false

Примеры

После регистрации сервера вам не нужно называть инструмент по имени. Опишите желаемое простым языком — агент сам подберёт нужный вызов.

Просто захватить то, что на экране

сделай скриншот текущего запроса Caido replay

Агент вызывает caido_screenshot и отвечает сохранённым путём:

Saved /Users/you/Downloads/caido-screenshot-2026-08-22T13-40-11-002Z.png (438 KB)

Отправить запрос, затем захватить его

Это самый частый сценарий. Объедините его с официальным Caido MCP server, который умеет отправлять запросы — этот сервер захватывает результат.

отправь GET на https://httpbin.org/get в Caido replay и сделай скриншот

Агент отправляет запрос, сопоставляет возвращённую запись Replay с заполненной сессией и захватывает именно этот ID сессии:

Шаг

Инструмент

Сервер

1

caido_send_request

caido

2

caido_list_replay_sessions

caido

3

caido_screenshot(session_id: ...)

caido-screenshot

Сопоставьте caido_send_request.entryId с caido_list_replay_sessions[].activeEntryId. Не создавайте новую сессию из requestSourceId для доказательства ответа: Caido заполняет шаблон запроса, но не копирует завершённый ответ.

Отправить написанный вами сырой запрос

Вставьте сырой HTTP и укажите, что нужно:

отправь это в Caido replay и сделай скриншот:

POST /post HTTP/1.1
Host: httpbin.org
Content-Type: application/json

{"user":"demo","token":"abc123"}

Выбрать конкретную сессию

Сессии называются по строке запроса в боковой панели Caido, поэтому GET /, POST /login и так далее:

сделай скриншот сессии replay "POST /login"

Это превращается в caido_screenshot(session: "POST /login"). Каждый захват использует режим Side by Side.

Для надёжной автоматизации используйте ID сессии:

caido_screenshot(session_id: "67", require_response: true)

Если сессия находится в другой или свёрнутой коллекции, укажите обе:

сделай скриншот "01 admin create private conversation" из коллекции "OBS AI Assistant IDOR - Fresh Evidence"

Это превращается в caido_screenshot(collection: "OBS AI Assistant IDOR - Fresh Evidence", session: "01 admin create private conversation"). Инструмент раскрывает коллекцию перед выбором сессии и захватывает её в режиме Side by Side.

Внимание: caido_send_request автоматически называет сессии по строке запроса, поэтому несколько целей могут оказаться с именем GET /. Переименуйте сессию в Caido перед захватом, если нужно однозначно ссылаться на неё.

Сохранить в определённое место

сделай скриншот и сохрани в ~/reports/login-flow.png

Использование из Codex

Запустите интерактивную сессию и задайте вопрос так же:

codex
> screenshot the current Caido replay session

Codex запросит разрешение при первом использовании. Чтобы пропустить запрос для этого инструмента, добавьте в ~/.codex/config.toml:

[mcp_servers.caido-screenshot.tools.caido_screenshot]
approval_mode = "auto"   # auto | prompt | writes | approve

codex exec (неинтерактивный режим) не будет работать — он принудительно использует approval: never и отклоняет все вызовы MCP-инструментов, независимо от настроек для конкретного инструмента. Используйте интерактивную сессию.

CLI

caido-screenshot                                   # current session -> ~/Downloads
caido-screenshot shot.png                          # explicit path
caido-screenshot shot.png --session "GET /login"
caido-screenshot shot.png --session-id 67
caido-screenshot shot.png --collection "Fresh Evidence" --session "01 admin request"
caido-screenshot doctor
caido-screenshot launch

Окружение

Переменная

По умолчанию

Описание

CAIDO_CDP_PORT

9222

Порт удалённой отладки Caido

CAIDO_CDP_TIMEOUT_MS

45000

Таймаут вызова CDP

Известные ограничения

Это свойства плагина, а не данного сервера:

  • Длинный контент обрезается. Редакторы Caido — это CodeMirror, который рендерит только видимые строки. Всё, что выше окна Caido, отсутствует в DOM и не может быть захвачено. Очень длинные ответы могут получиться пустыми; сервер выдаёт ошибку вместо записи почти пустого файла.

  • Заголовки могут теряться. Рендер DOM-в-изображение иногда пропускает строки, с видимыми пробелами в номерах строк. Считайте такие изображения иллюстративными, а не точным доказательством — используйте собственный экспорт запросов Caido, когда важна точность.

  • Макет фиксирован на Side by Side. Сервер намеренно не предоставляет опций макета или расположения, чтобы каждый скриншот-доказательство имел одинаковый готовый к отчёту формат.

  • Скриншоты не редактируются. Всё, что на экране — Authorization, Cookie, Set-Cookie — захватывается полностью. Проверяйте перед публикацией.

  • Сессии Replay только с запросом отклоняются по умолчанию. Screenshot Mode может сохранять предыдущее превью, когда у выбранной сессии нет ответа. Используйте --allow-no-response только когда скриншот только с запросом нужен намеренно.

Устранение неполадок

Сообщение

Причина

Cannot reach Caido's debug port

Caido запущен без --remote-debugging-port. Закройте его и запустите caido-screenshot launch.

Caido is showing the instance picker

Нажмите Connect на вашем локальном экземпляре в окне Caido.

No Screenshot button in the Replay toolbar

Нет открытой сессии Replay, или плагин Screenshot Mode не установлен/не включён.

No Replay collection matching "..."

Используйте точное имя коллекции, показанное в боковой панели Replay.

No Replay session matching "..."

Инструмент раскрывает collection, если она указана, затем перечисляет видимые имена сессий, если точного совпадения нет.

has no rendered response

Выбранная сессия была создана из запроса или ещё не завершена. Захватите сессию, чей activeEntryId равен entryId результата отправки.

preview is stale

Screenshot Mode показал другой хост/путь (или конфликтующий видимый запрос). Ничего не сохранено; повторите с заполненным session_id. Схема, кодировка, порядок параметров, пропущенные метки параметров и отсутствующий разделитель ? в Screenshot Mode 0.8.1 нормализуются автоматически.

returned an empty image

Контент слишком длинный для рендера. Захватите более короткий запрос/ответ.

Лицензия

MIT

Available Tools

1 tool
caido_screenshotA

Capture a formatted screenshot of a Caido Replay request/response using the Screenshot Mode plugin. Requires Caido running with --remote-debugging-port (default 9222) and a Replay session open. Uses one consistent Side by Side layout, verifies the selected session, requires a rendered response by default, rejects stale previews, then saves a PNG and returns its path plus the verified request metadata.

ParametersJSON Schema
NameRequiredDescriptionDefault
inlineNoAlso return the image in the tool result (large). Default false.
sessionNoReplay session to select first, by the name shown in the sidebar (e.g. 'GET /login')
out_pathNoWhere to save the PNG. Defaults to ~/Downloads/caido-screenshot-<timestamp>.png
collectionNoReplay collection containing the session. The collection is expanded automatically.
session_idNoExact Replay session ID. Preferred over session name because it is unambiguous.
require_responseNoReject sessions without a rendered response to prevent stale evidence. Default true.

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of transparency. It discloses multiple behavioral traits: uses a specific layout, verifies the selected session, requires a rendered response by default, rejects stale previews, saves a PNG, and returns path plus metadata. This gives the agent a strong understanding of what happens during execution.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured, opening with the core action and then efficiently enumerating prerequisites and key behaviors. It avoids unnecessary verbosity while covering all essential aspects, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of the tool (multiple preconditions, specific layout, output behavior), the description provides sufficient context for an agent to decide when to use it. It clearly states the environment requirements, what is verified, and what is returned, without needing an output schema. The description is complete enough for operational use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides 100% coverage with detailed descriptions for each parameter, so the baseline is 3. The tool description does not add additional insight beyond the schema's parameter explanations; it merely references the default behavior of require_response without expanding on relationships or interdependencies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool captures a formatted screenshot of a Caido Replay request/response using the Screenshot Mode plugin, specifying the exact resource and action. It also distinguishes itself by mentioning the Side by Side layout and the plugin, which sets it apart from generic screenshot tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit preconditions for use (Caido running with --remote-debugging-port, Replay session open) and mentions key behaviors (requires rendered response, rejects stale previews). While it doesn't explicitly contrast with alternatives, the specific prerequisites and layout make the intended use case clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.2.1
    • First observedcaido_screenshot

TDQS

A4.4/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion between tools. The tool has a single, clearly defined purpose (capturing a screenshot of a Caido Replay session), so an agent cannot misselect it.

Naming Consistency5/5

The single tool follows a consistent snake_case naming convention (caido_screenshot), which is clear and predictable. There is no mix of styles or verbs to create inconsistency.

Tool Count3/5

The server provides only one tool, which feels thin for a typical MCP server. However, the tool targets a very specific, narrow use case (Caido Replay screenshot capture), so the count may be appropriate for that focused purpose, but it is borderline.

Completeness4/5

The tool covers the core workflow of capturing a formatted screenshot from a Replay session, including verification and metadata return. There are minor gaps (e.g., no options for custom layout or output format), but for its stated purpose, it is essentially complete.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers