MCP 設定指南
Cursor
透過 AnyCrawl MCP 為 Cursor 新增網頁抓取和搜尋功能
在 Cursor 中使用 MCP 網頁搜尋與抓取
透過 AnyCrawl MCP 為 Cursor 新增網頁抓取和搜尋功能。
快速設定
1. 取得 API 金鑰
在 anycrawl.dev 註冊並從控制面板複製您的 API 金鑰。
2. 新增到 Cursor
開啟設定(Mac 上按 Cmd+,,Windows 上按 Ctrl+,),搜尋「MCP」,然後新增:
{
"mcpServers": {
"anycrawl": {
"command": "npx",
"args": ["-y", "anycrawl-mcp"],
"env": {
"ANYCRAWL_API_KEY": "your-api-key"
}
}
}
}將 your-api-key 替換為您實際的 AnyCrawl API 金鑰。
3. 重新啟動 Cursor
完成!現在您可以在 Cursor 中搜尋和抓取網頁了。
快速示範
在 Cursor 聊天(Cmd+K)中嘗試以下操作:
搜尋網頁:
Search for TypeScript best practices 2025抓取頁面:
Scrape anycrawl.dev and tell me what it does取得文件:
Scrape the React hooks documentation and explain useEffect爬取網站:
Crawl the blog section of example.com and summarize the articlesCursor 將自動使用 AnyCrawl 的搜尋、抓取和爬取工具。
疑難排解
伺服器無回應
- 檢查您的 API 金鑰是否有效
- 確保已安裝 Node.js 18+
- 變更設定後重新啟動 Cursor
權限錯誤
確保 npx 有執行權限。您可能需要全域安裝該套件:
npm install -g anycrawl-mcp然後更新設定以使用全域安裝的套件:
{
"mcpServers": {
"anycrawl": {
"command": "anycrawl-mcp",
"env": {
"ANYCRAWL_API_KEY": "your-api-key"
}
}
}
}