2026.10.03 · 3 min read
Run the crawler in a subprocess.
Why scrapy-mcp starts a fresh process for every call.
Scrapy runs on Twisted. Twisted wants to own the event loop. An MCP server already has one. Putting both in the same process is a recipe for a hang you can't diagnose.
So every tool call runs scrapy runspider as a subprocess. The reactor never touches the server's loop, and a stuck crawl can simply be killed: after 30 seconds for a page, 90 for a crawl.
The other half is safety. If you hand a language model a crawler, you've handed it a way to reach private addresses. The check lives in middleware, so it runs on every redirect and every followed link, not only on the first URL.