Skip to main content
Glama

caido-screenshot-mcp

一个 MCP 服务器,通过驱动 Screenshot Mode 插件,捕获 Caido Replay 请求/响应对的格式化截图。

Caido 没有截图 API——Screenshot Mode 是一个仅前端插件,在浏览器中将 DOM 渲染为 PNG。该服务器通过 Chrome DevTools Protocol 访问它,点击插件自身的导出按钮,并在 Electron 打开保存对话框之前拦截生成的图像。输出就是插件的真实输出,直接写入磁盘。

要求

  • Node >= 22(使用内置的 WebSocket;没有 npm 依赖)

  • Caido 桌面版

  • 在 Caido 中安装了 Screenshot Mode 插件

  • 使用 --remote-debugging-port 启动 Caido(见下文)

Related MCP server: MCP Browser Screenshot Server

安装

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

精确的 Replay 会话 ID。因为无歧义,所以优先使用。

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 配合使用,该服务器可以发送请求——本服务器截取结果。

在 Caido replay 中向 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.entryIdcaido_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 等:

截取 "POST /login" replay 会话,堆叠显示

这将变成 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 工具调用,无论每个工具的设置如何。请使用交互式会话。

命令行

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。 服务器故意不提供布局或排列选项,以便每张证据截图都具有相同的、可随时用于报告的格式。

  • 截图不会脱敏。 屏幕上的任何内容——AuthorizationCookieSet-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 显示了不同的 URL。未保存任何内容;请使用已填充的 session_id 重试。

returned an empty image

内容过长无法渲染。请截取较短的请求/响应。

许可证

MIT

Install Server
A
license - permissive license
A
quality
B
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

  • Capture screenshots, detect visual regressions between page versions, and analyze with AI.

  • Screenshots, PDFs and Markdown from any URL or HTML for AI agents, via the SnapForge API

  • Capture screenshots of webpages as images or PDFs with Screenshot Scout.

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/jayjpatel9717/Caido-Screenshot'

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