Skip to main content
Glama

caido-screenshot-mcp

Caido の Replay リクエスト/レスポンスペアのフォーマット済みスクリーンショットを、Screenshot Mode プラグインを操作して取得する MCP サーバーです。

Caido にはスクリーンショット API がありません。Screenshot Mode はブラウザ内で DOM を PNG にレンダリングするフロントエンド専用プラグインです。このサーバーは Chrome DevTools Protocol 経由でプラグインにアクセスし、プラグイン自身のエクスポートをクリックし、Electron が保存ダイアログを開く前に生成された画像をインターセプトします。出力はプラグインの実際の出力であり、そのままディスクに書き込まれます。

要件

  • Node >= 22(組み込みの WebSocket を使用。npm 依存関係はありません)

  • Caido デスクトップ版

  • Caido に Screenshot Mode プラグインがインストールされていること

  • Caido を --remote-debugging-port 付きで起動していること(下記参照)

Related MCP server: screenshot-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 リプレイセッションをスクリーンショットして」と尋ねるだけです。

任意の 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

正確な Replay セッション ID。曖昧さがないため推奨されます。

require_response

boolean

リクエストのみのセッションや古いプレビューを拒否します。デフォルトは true。

inline

boolean

結果に画像も含めて返します(大きい)。デフォルトは false

例

サーバーが登録されると、ツール名を指定する必要はありません。プレーンな英語でやりたいことを説明すれば、エージェントがそれを拾います。

画面に表示されているものをキャプチャ

現在の Caido リプレイリクエストをスクリーンショットして

エージェントは caido_screenshot を呼び出し、保存されたパスを返します:

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

リクエストを送信してからキャプチャ

これは一般的なパターンです。公式の Caido MCP サーバー と組み合わせて使用します。このサーバーはリクエストを送信でき、このサーバーが結果をキャプチャします。

Caido リプレイで https://httpbin.org/get に GET を送信して、スクリーンショットを撮って

エージェントはリクエストを送信し、返された 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 リプレイで送信してスクリーンショットを撮って:

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

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

特定のセッションを選択

セッションは Caido のサイドバーのリクエスト行にちなんで名付けられるため、GET /、POST /login などになります:

「POST /login」リプレイセッションをスクリーンショットして

これは caido_screenshot(session: "POST /login") になります。すべてのキャプチャは Side by Side を使用します。

信頼性の高い自動化には、セッション ID を使用します:

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

セッションが別のコレクションや折りたたまれたコレクション内にある場合は、両方を指定します:

「OBS AI Assistant IDOR - Fresh Evidence」コレクションの「01 admin create private conversation」をスクリーンショットして

これは 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

Caido ウィンドウでローカルインスタンスの Connect をクリックしてください。

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.

Inputs: inline, session, out_path, collection, +2 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    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.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      Enables taking screenshots of web pages with support for multiple devices (desktop, mobile, tablet), custom dimensions, full-page capture, and various image formats. Built with Playwright for reliable web page rendering and screenshot generation.
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to control a local Chromium browser via CDP for page snapshots, screenshots, human-like interactions, autonomous crawling, API/GraphQL reconnaissance, authenticated differential testing, and Burp-like intercept, repeater, and intruder workflows with scope enforcement and audit logging.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to capture raw HTTP requests/responses and command executions as report-ready screenshots with preserved evidence bundles via MCP.
      7
      Apache 2.0