面向 AI 智能体的托管网页抓取 MCP 服务器
将你的智能体连接到 https://mcp.spicrawl.com/mcp,它就能把任意 URL 读取为 Markdown 或 JSON、运行批量任务、复用登录会话并检查自己的用量,而无需你编写抓取代码。
Spicrawl MCP 服务器的作用
该服务器让 AI 智能体把 Spicrawl 当作原生工具使用。它托管在 https://mcp.spicrawl.com/mcp,使用 MCP Streamable HTTP,并以你自己的 API key 作为 bearer token 进行认证。每次工具调用都在该 key 下运行,与你亲自调用 API 完全一样:限制相同,积分相同。
一条命令完成设置
Spicrawl CLI 会把 MCP 服务器和 Spicrawl 智能体技能添加到你的客户端,并在应用前显示更改:
npm install -g @spicrawl/cli
spicrawl init --client claude # or: --client cursor, --client codex或者手动添加。把 key 保存在 SPICRAWL_API_KEY 环境变量中,并在配置中引用它,这样 key 就不会写入会被提交的文件:
claude mcp add --transport http spicrawl https://mcp.spicrawl.com/mcp \
--header "Authorization: Bearer $SPICRAWL_API_KEY"
# Or, for a team, commit .mcp.json (each person's own key is used):
{
"mcpServers": {
"spicrawl": {
"type": "http",
"url": "https://mcp.spicrawl.com/mcp",
"headers": { "Authorization": "Bearer ${SPICRAWL_API_KEY}" }
}
}
}// .cursor/mcp.json (or ~/.cursor/mcp.json for every project)
{
"mcpServers": {
"spicrawl": {
"url": "https://mcp.spicrawl.com/mcp",
"headers": { "Authorization": "Bearer ${env:SPICRAWL_API_KEY}" }
}
}
}// .vscode/mcp.json: VS Code asks for the key once and stores it securely
{
"inputs": [
{ "type": "promptString", "id": "spicrawl-api-key", "description": "Spicrawl API key", "password": true }
],
"servers": {
"spicrawl": {
"type": "http",
"url": "https://mcp.spicrawl.com/mcp",
"headers": { "Authorization": "Bearer ${input:spicrawl-api-key}" }
}
}
}codex mcp add spicrawl --url https://mcp.spicrawl.com/mcp --bearer-token-env-var SPICRAWL_API_KEY
# Equivalent ~/.codex/config.toml:
[mcp_servers.spicrawl]
url = "https://mcp.spicrawl.com/mcp"
bearer_token_env_var = "SPICRAWL_API_KEY"// claude_desktop_config.json: bridges to the hosted server with mcp-remote (needs Node.js)
{
"mcpServers": {
"spicrawl": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.spicrawl.com/mcp", "--header", "Authorization:${SPICRAWL_AUTH}"],
"env": { "SPICRAWL_AUTH": "Bearer spicrawl_live_..." }
}
}
}用 claude mcp list、codex mcp list 或客户端的 MCP 设置检查连接。你应该能看到 25 个 spicrawl_* 工具。
按任务分组的工具
| 任务 | 工具 |
|---|---|
| 读取一个页面 | spicrawl_scrape:Markdown(默认)、文本、HTML 或 JSON,可选渲染、标签过滤、提取和浏览器操作 |
| 多个 URL | spicrawl_batch_submit, _status, _list, _results, _task_content, _add_items, _close, _retry, _cancel |
| 登录后的页面 | spicrawl_session_create, _list, _get, _context, _release, _delete |
| 调试失败 | spicrawl_requests_list, spicrawl_request_get |
| 积分与用量 | spicrawl_usage、_summary、_reconciliation(需要 read 权限范围) |
| 查资料 | spicrawl_docs_search, spicrawl_docs_read, spicrawl_docs_index |
用于通过 CDP 连接远程浏览器的工具已列出,但即将推出。
可以先试的第一个任务
Use Spicrawl to read https://example.com/pricing as markdown.
List each plan with its monthly price. If the page comes back empty,
retry with rendering.智能体用 URL 和 format: "markdown" 调用 spicrawl_scrape,仅当第一个结果为空时才加上 render: true。完整的操作流程见 如何用 Claude Code 抓取网站。
让智能体既省钱又安全
- 先用最便宜的。 普通请求 1 积分,JavaScript 渲染 3,完整浏览器渲染 8。智能体应逐级升级,并在第一个有效的层级停下。
- 为每次调用设置上限。 设置
max_cost后,可能超出预算的请求会在运行前被拒绝。 - 失败免费。 错误和被拦截的页面费用为 0 积分。
- 无需花费即可测试。
spicrawl_test_key 在沙盒中运行,绝不会消耗真实积分。 - 限制 key 能做什么。 key 默认拥有
scrape、batch和sessions权限范围;只有在智能体需要查看用量时,才授予read。
它不做什么
- 不支持爬取。 Spicrawl 不会跟随链接或发现 URL。请把 URL 或站点地图中的列表交给智能体,页面较多时使用批量任务。
- 即将推出: 托管代理、隐身模式、远程浏览器连接,以及基于自然语言提示词的提取。目前你可以自带代理,无附加费用,并使用 CSS 选择器或 JSON Schema 提取数据。
它与其他抓取 MCP 服务器的对比
如今大多数抓取 API 都附带 MCP 服务器。以下是各家提供的内容,来自我们的对比页面,这些页面引用了各厂商自己的文档:
| 提供商 | 他们的 MCP 服务器 |
|---|---|
| Firecrawl | 无需 key 即可使用的托管 MCP 服务器,支持 OAuth 登录或 API key。 |
| ZenRows | 托管 MCP 服务器,另有面向 Claude Code、Cursor 和 Codex 的技能与插件智能体工具包。 |
| Context.dev | 使用 OAuth 而非 API key 登录的托管 MCP 服务器,另有一个智能体技能。 |
| ScrapingBee | 托管 MCP 服务器,提供抓取页面、文本、截图、搜索结果和用量的工具。 |
| Bright Data | MIT 许可的 MCP 服务器,可托管使用,也可在本地运行。免费的默认模式把页面抓取为 Markdown 并搜索网络;Pro 模式增加了 60+ 个工具。 |
| Jina Reader | 托管 MCP 服务器,提供读取 URL、截图和搜索的工具。读取无需 key。 |
| Apify | 官方 MCP 服务器,让智能体可以发现并运行现成的抓取器(Actor)。 |
| Browserbase | 基于 Stagehand 构建的托管 MCP 服务器,用自然语言命令控制云浏览器。 |
当你的智能体主要读取已有 URL 的页面,并且你想要干净的 Markdown、用于登录页面的会话,以及失败不收费时,请选择 Spicrawl 的服务器。当智能体需要先找到页面时,请选择能爬取或搜索的服务器。
常见问题
什么是网页抓取 MCP 服务器?
它是一个 Model Context Protocol 服务器,为 AI 智能体提供抓取网页的工具。智能体无需编写 HTTP 代码,只需用 URL 调用 spicrawl_scrape 之类的工具,即可得到 Markdown、文本、HTML 或 JSON 格式的页面。
它适用于哪些 AI 智能体和编辑器?
任何能通过 Streamable HTTP 连接远程服务器并发送 Authorization 请求头的 MCP 客户端,包括 Claude Code、Cursor、VS Code 和 Codex CLI。Claude Desktop 可通过 mcp-remote 桥接连接。
Spicrawl MCP 服务器免费吗?
Spicrawl 公测期间免费,无需信用卡。工具调用使用与 API 相同的积分:普通请求 1,JavaScript 渲染 3,完整浏览器渲染 8。失败和被拦截的请求费用为 0。
MCP 服务器能爬取整个网站吗?
不能。Spicrawl 不会发现 URL,也不会跟随链接。请把你想要的 URL,或从站点地图得到的列表交给智能体,并对大量页面使用批量任务。
如何保管好我的 API key?
Keep the key in the SPICRAWL_API_KEY environment variable and reference it from your client configuration, for example ${SPICRAWL_API_KEY} in Claude Code’s .mcp.json or ${env:SPICRAWL_API_KEY} in Cursor. Never commit the key itself, and revoke it in the dashboard if it leaks.
它适用于登录后的页面吗?
可以,用于你自己拥有或有权使用的账号。用 spicrawl_session_create 创建会话,用浏览器操作登录,然后在之后的抓取中传入会话 ID,使 cookie 和浏览器存储得以延续。