Scrapezy MCP Server
官方使用 Scrapezy 將網站轉換為資料集
文件
@scrapezy/mcp MCP 伺服器
一個用於 Scrapezy 的模型上下文協定伺服器,讓 AI 模型能從網站中提取結構化資料。
功能特色
工具
extract_structured_data- 從網站提取結構化資料- 需要 URL 和提示詞作為必要參數
- 根據提示詞從網站中提取並回傳結構化資料
- 提示詞應清楚描述要從網站中提取哪些資料
安裝
透過 Smithery 安裝
若要透過 Smithery 為 Claude Desktop 自動安裝 Scrapezy MCP 伺服器:
npx -y @smithery/cli install @Scrapezy/mcp --client claude
手動安裝
npm install -g @scrapezy/mcp
使用方式
API 金鑰設定
有兩種方式可以提供您的 Scrapezy API 金鑰:
-
環境變數:
export SCRAPEZY_API_KEY=your_api_key npx @scrapezy/mcp -
命令列參數:
npx @scrapezy/mcp --api-key=your_api_key
若要與 Claude Desktop 搭配使用,請新增伺服器設定:
在 MacOS 上:~/Library/Application Support/Claude/claude_desktop_config.json
在 Windows 上:%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"scrapezy": {
"command": "npx @scrapezy/mcp --api-key=your_api_key"
}
}
}
Claude 中的使用範例
您可以在 Claude 中使用此工具,提示詞如下:
Please extract product information from this page: https://example.com/product
Extract the product name, price, description, and available colors.
Claude 將使用 MCP 伺服器從網站中提取所請求的結構化資料。
除錯
由於 MCP 伺服器透過 stdio 進行通訊,除錯可能較為困難。我們建議使用 MCP Inspector,它可作為套件腳本使用:
npm run inspector
Inspector 會提供一個 URL,讓您在瀏覽器中存取除錯工具。
授權條款
MIT