关于 SnapRender
SnapRender Integrations 将 AI Agent 和 MCP 客户端连接到 SnapRender Screenshot API,支持网页截图、内容提取、批量任务和相关 Webhook 管理,可使用托管或本地 MCP 服务。
主要功能
- 01将网页保存为图像或 PDF
- 02以多种格式提取网页内容
- 03批量提交最多 50 个 URL
- 04查看缓存与用量
- 05管理批量任务和配额 Webhook
适用场景
- 01截取公开网页以供视觉检查
- 02将网页提取为 Markdown 或文本
- 03对一组 URL 执行截图
- 04在批量任务完成时通知工作流
MCP 相关
通过托管 Streamable HTTP MCP 服务或使用 stdio 的本地 npm 服务提供相同的 11 种工具。托管服务支持 OAuth 2.0 或 API 密钥认证,本地服务使用 API 密钥。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
工具
11收录的工具列表 · 更新于 3 周前
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| url | string | 否 | 要截取的 URL(必须以 http:// 或 https:// 开头)。不能与 html 和 markdown 同时使用。 |
| html | string | 否 | 要渲染并截取的原始 HTML 内容(最大 2MB)。不能与 url 和 markdown 同时使用。 |
| markdown | string | 否 | 使用简洁的样式模板渲染并截取 Markdown 内容(最大 500KB)。不能与 url 和 html 同时使用。 |
| format | enum | 否 | 输出格式(默认值:png)png | jpeg | webp | pdf |
| width | integer | 否 | 视口宽度,单位为像素(默认值:1280) |
| height | integer | 否 | 视口高度,单位为像素(默认值:800) |
| full_page | boolean | 否 | 截取整个可滚动页面(默认:false) |
| quality | integer | 否 | JPEG/WebP 的图像质量,范围为 1–100(默认:90) |
| delay | integer | 否 | 页面加载后等待的毫秒数(默认:0) |
| dark_mode | boolean | 否 | 启用深色模式 CSS 模拟(默认:false) |
| block_ads | boolean | 否 | 拦截广告和跟踪器(默认:true) |
| block_cookie_banners | boolean | 否 | 移除 Cookie 同意横幅(默认:true) |
| device | enum | 否 | 用于手机/平板电脑模拟的设备预设iphone_14 | iphone_15_pro | pixel_7 | ipad_pro | macbook_pro |
| hide_selectors | string | 否 | 要在截取前隐藏的逗号分隔 CSS 选择器 |
| click_selector | string | 否 | 截取前要点击的 CSS 选择器 |
| user_agent | string | 否 | 用于请求的自定义 User-Agent 字符串 |
| cache | boolean | 否 | 如果有可用的缓存结果,则使用该结果。设为 true 可启用缓存(默认值:false) |
| cache_ttl | integer | 否 | 缓存 TTL(秒),范围为 0-2592000。会限制为您的套餐上限(默认值:86400) |
详细介绍
SnapRender 集成
为 SnapRender 截图 API提供的官方集成:让 AI Agent 拥有视觉能力。将任意公开网页捕获为 PNG、JPEG、WebP 或 PDF,或将其读取为简洁的 Markdown。
远程 MCP 服务(推荐)
SnapRender 运行着托管式 MCP 服务。无需安装任何内容,即可从任意 MCP 客户端连接:
https://app.snap-render.com/mcp
- 传输方式: Streamable HTTP
- 登录: OAuth 2.0(客户端会打开 SnapRender 登录窗口;可使用 Google、GitHub 或电子邮件),或在
Authorization: Bearer或X-API-Key标头中提供 API 密钥 - 工具(11 个): 捕获、缓存检查、用量、签名链接、内容提取、批量处理和 Webhook(完整列表见下文)
- 提示词:
screenshot_website、compare_devices - 免费套餐: 每月 200 次截图,无需信用卡
- 目录列表: Glama 上的 SnapRender(健康状态经过检查,工具质量经过评级)
Claude(claude.ai 和 Claude Desktop)
打开 Customize,然后选择 Connectors,点击 + Add,再选择 Add custom connector,并粘贴 https://app.snap-render.com/mcp。Claude 会打开 SnapRender 登录窗口;批准后即可使用这些工具。分步指南:snap-render.com/claude。
Cursor、VS Code、Windsurf 和其他客户端
每种客户端的设置页面,支持的客户端可一键安装:snap-render.com/ai-connectors。
需要使用标头而非 OAuth 的客户端:
{
"mcpServers": {
"snaprender": {
"url": "https://app.snap-render.com/mcp",
"headers": {
"Authorization": "Bearer sk_live_your_key_here"
}
}
}
}
任意 MCP 客户端(curl)
# Initialize a session
curl -X POST https://app.snap-render.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "X-API-Key: sk_live_your_key_here" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'
服务端会返回 Mcp-Session-Id 标头:在后续请求中附上该标头,即可复用会话。
Smithery
通过 Smithery 安装,即可自动为任意 MCP 客户端完成设置。
本地 MCP 服务(npm)
如果你更希望通过 stdio 传输在本地运行:
{
"mcpServers": {
"snaprender": {
"command": "npx",
"args": ["-y", "snaprender-mcp"],
"env": {
"SNAPRENDER_API_KEY": "sk_live_your_key_here"
}
}
}
}
完整文档请参阅 mcp-server/。
远程与本地对比
| 远程(托管) | 本地(npx) | |
|---|---|---|
| 安装 | 无需安装,只需 HTTPS URL | 需要 Node.js + npx |
| 传输方式 | Streamable HTTP | stdio |
| 登录 | OAuth 或 API 密钥 | API 密钥(SNAPRENDER_API_KEY) |
| 使用场景 | Claude、ChatGPT、Cursor、任意 MCP 客户端 | 仅运行本地服务的客户端 |
MCP 工具
托管服务和 npm 包提供相同的 11 个工具。参数记录在各工具的架构和 API 文档中。
| 工具 | 功能 | 费用 |
|---|---|---|
take_screenshot | 将 URL 截取为 PNG、JPEG、WebP 或 PDF:设备预设、整页截图、深色模式、移除广告和 Cookie 横幅、隐藏或点击选择器 | 1 次截图(缓存副本免费) |
check_screenshot_cache | 检查使用这些选项的截图是否已缓存 | 免费 |
get_usage | 本月已使用和剩余的截图次数、限额及重置日期 | 免费 |
sign_screenshot_url | 创建一个已签名链接,打开时即可渲染截图,无需 API 密钥 | 打开时计为 1 次截图 |
extract_content | 将网页提取为 Markdown、文本、HTML、文章、链接或元数据 | 1 次截图(失败免费) |
batch_screenshots | 在一个后台任务中截取最多 50 个 URL | 每个 URL 计为 1 次截图(失败会退还) |
get_batch_status | 查询批处理任务状态并获取下载链接 | 免费 |
list_webhooks | 列出 Webhook 订阅 | 免费 |
create_webhook | 在批处理完成、配额即将用尽或定时截图发生变化时接收通知 | 免费 |
delete_webhook | 删除 Webhook 订阅 | 免费 |
test_webhook | 向 Webhook 发送测试负载 | 免费 |
Agent 框架集成
| 框架 | 目录 | 描述 |
|---|---|---|
| LangChain Python | langchain/ | 为 LangChain / LangGraph Agent 提供由 @tool 装饰的函数(PyPI) |
| LangChain.js | langchain-js/ | 为 LangChain.js Agent 提供 StructuredTool 类(npm) |
| CrewAI | crewai/ | 为 CrewAI Agent 提供 BaseTool 子类(PyPI) |
| AutoGen | autogen/ | 为 Microsoft AutoGen Agent 提供 FunctionTool 封装(PyPI) |
| n8n | 独立仓库 | 用于 n8n 工作流的社区节点(npm) |
其他集成
| 集成 | 描述 | 设置时间 |
|---|---|---|
| OpenClaw Skill | OpenClaw AI Agent 的 Skill 文件 | 5 分钟 |
| ChatGPT Actions | 用于 Custom GPT 和 OpenAI 函数调用的 OpenAPI 规范 | 5 分钟 |
| Postman Collection | 预构建的 Postman API 请求 | 1 分钟 |
SDK
# Node.js
npm install snaprender
# Python
pip install snaprender
直接调用 API
curl "https://app.snap-render.com/v1/screenshot?url=https://example.com" \
-H "X-API-Key: sk_live_your_key_here" \
-o screenshot.png
获取 API 密钥
在 snap-render.com 免费注册:每月可截图 200 次,无需信用卡。
链接
- 文档
- 远程 MCP 服务:Streamable HTTP 端点
- Glama 上的 MCP Connector
- npm 上的 MCP 服务(
npx snaprender-mcp) - Smithery 上的 MCP 服务
- Node.js SDK(
npm install snaprender) - Python SDK(
pip install snaprender) - LangChain Python 工具(
pip install langchain-snaprender) - LangChain.js 工具(
npm install langchain-snaprender) - CrewAI 工具(
pip install crewai-snaprender) - AutoGen 工具(
pip install autogen-ext-snaprender) - n8n 社区节点(
npm install n8n-nodes-snaprender) - OpenAPI 规范
- Postman 集合
许可证
MIT
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。