Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Calling Clutch Scraper from MCP Agents in Python

说明与用途

MCP 代理现在可以安全、高效地调用 Clutch.co 抓取器,限制对单一工具的访问,遵守输入模式,并处理异步调用以避免超时。

问题

MCP-compatible agents need reliable, schema‑aware access to a Clutch.co scraper without custom integration layers, while respecting cost and timeout limits.

结果

Agents can now reliably call the Clutch scraper with proper schema, scoped access, and async handling, reducing hallucinations and timeout failures.

工作流

  • 1. Configure MCP server to expose only the Clutch scraper via the tools query parameter.
  • 2. Verify the scoped endpoint with a curl GET request using the Apify token.
  • 3. Map the Actor input schema to an MCP tool signature (companyUrls array, optional maxItems).
  • 4. In the agent, construct a JSON payload with explicit companyUrls and optional maxItems.
  • 5. Call the MCP tool synchronously; if the request may exceed 300 s, use the async wrapper: POST /runs, poll status, and fetch dataset items.
  • 6. Handle HTTP 408 responses by retrying or splitting the URL list.
  • 7. Consume the returned dataset items in the agent’s reasoning loop.

证据

When scoped with ?tools=crawlerbros/clutch-scraper, the MCP endpoint presents only the tool definition generated from the Actor's build metadata.

来源

Apify provides synchronous run endpoints, but they enforce a hard platform limit of 300 seconds (5 minutes).

来源

  • 记录日期: 2026-09-15T13:30:27.466Z