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

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

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