登录

1. 定位配置文件

Claude Desktop 从一个 JSON 文件中读取 MCP 服务器配置。在您的编辑器中打开它:

操作系统路径
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json
Linux~/.config/Claude/claude_desktop_config.json

如果该文件尚不存在,请创建它并填入一个空的 {} 对象。

2. 添加 Crawlbase 服务器

{
  "mcpServers": {
    "crawlbase": {
      "type": "stdio",
      "command": "npx",
      "args": ["@crawlbase/mcp@latest"],
      "env": {
        "CRAWLBASE_TOKEN": "YOUR_TOKEN",
        "CRAWLBASE_JS_TOKEN": "YOUR_JS_TOKEN"
      }
    }
  }
}
// Claude Code reads the same shape from claude.json
{
  "mcpServers": {
    "crawlbase": {
      "type": "stdio",
      "command": "npx",
      "args": ["@crawlbase/mcp@latest"],
      "env": {
        "CRAWLBASE_TOKEN": "YOUR_TOKEN",
        "CRAWLBASE_JS_TOKEN": "YOUR_JS_TOKEN"
      }
    }
  }
}
已经有其他服务器了?

如果您的配置中已有 mcpServers 块,只需在其他条目旁边添加 crawlbase 条目。不要替换已有的服务器。

3. 重启 Claude Desktop

完全退出(不只是关闭窗口 - 在 macOS 上使用 Cmd+Q,或在 Windows 上右键单击系统托盘),然后重新启动。下一次对话将能够访问 Crawlbase 工具。

4. 验证是否正常工作

点击聊天输入框中的滑块/工具图标。您应该能看到 crawlbase 出现在列表中,并提供 9 个工具(3 个爬取 + 6 个存储)。试着快速测试一下:

Crawl https://anthropic.com and tell me what's in the navigation.

您会看到 Claude 调用 crawl(或 crawl_markdown),然后总结结果。如果您没看到工具调用,请检查日志:

操作系统日志路径
macOS~/Library/Logs/Claude/mcp*.log
Windows%APPDATA%\Claude\logs\mcp*.log

示例提示词

连接 Crawlbase 后立即可用的场景:

  • “对比 Stripe、Adyen 和 Square 的定价页面。制作一个包含套餐和主打费率的表格。”
  • “为这 5 个着陆页拍摄截图,并告诉我哪一个的首屏最有冲击力。”
  • “当下‘open source LLM observability’的前 3 个搜索结果是什么?分别总结一下。”
  • “关注 news.ycombinator.com,当有关于我公司的帖子登上首页时通知我。”

故障排查

工具列表中没有 “crawlbase”
配置 JSON 无效或路径错误。使用 jq . claude_desktop_config.json 进行校验。检查日志中的解析错误。
工具调用返回 401
token 错误或未粘贴到 env 中。请从您的控制台仔细核对相关值。
“npx not found”
Node 未安装或不在 Claude Desktop 的 PATH 中。请安装 Node 18+ 或使用绝对路径:"command": "/usr/local/bin/npx"