AnyCrawl
MCP 設定指南

Claude Code

透過 AnyCrawl MCP 為 Claude Code 新增網頁抓取和搜尋功能

透過 AnyCrawl MCP 為 Claude Code 新增網頁抓取和搜尋功能。

快速設定

1. 取得 API 金鑰

anycrawl.dev 註冊並從控制面板複製您的 API 金鑰。

2. 新增 AnyCrawl MCP 伺服器

在終端中執行以下命令:

claude mcp add anycrawl -e ANYCRAWL_API_KEY=your-api-key -- npx -y anycrawl-mcp

your-api-key 替換為您實際的 AnyCrawl API 金鑰。

完成!現在您可以在 Claude Code 中搜尋和抓取網頁了。

快速示範

在 Claude Code 中嘗試以下操作:

搜尋網頁:

Search for the latest Next.js 15 features

抓取頁面:

Scrape anycrawl.dev and tell me what it does

取得文件:

Find and scrape the Stripe API docs for payment intents

爬取網站:

Crawl the blog section of example.com and summarize the articles

Claude 將自動使用 AnyCrawl 的搜尋、抓取和爬取工具來取得資訊。

可用工具

設定完成後,Claude Code 將可以使用以下工具:

  • anycrawl_scrape - 抓取單個 URL 並擷取內容
  • anycrawl_crawl - 爬取網站的多個頁面
  • anycrawl_search - 搜尋網頁並可選擇抓取結果
  • anycrawl_crawl_status - 檢查爬取任務狀態
  • anycrawl_crawl_results - 取得爬取任務的結果
  • anycrawl_cancel_crawl - 取消正在執行的爬取任務

驗證安裝

要驗證 MCP 伺服器是否設定正確:

claude mcp list

您應該會在已設定的 MCP 伺服器清單中看到 anycrawl

疑難排解

伺服器無回應

  1. 檢查您的 API 金鑰是否有效
  2. 確保已安裝 Node.js 18+
  3. 嘗試移除並重新新增伺服器:
claude mcp remove anycrawl
claude mcp add anycrawl -e ANYCRAWL_API_KEY=your-api-key -- npx -y anycrawl-mcp

權限錯誤

確保 npx 有執行權限。您可能需要執行:

npm install -g anycrawl-mcp

然後使用全域安裝的套件進行設定:

claude mcp add anycrawl -e ANYCRAWL_API_KEY=your-api-key -- anycrawl-mcp

下一步