Skip to content
Leslie Paul Ajayi
Note 002
All writing

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.

Contact

Based in Accra, Ghana

Have a problem worth solving?

I'm interested in engineering roles, product collaborations and well-scoped builds. Email is the fastest way to reach me.

  • GitHub

    Leslie-23 · 171 public repositories

  • LinkedIn

    /in/leslie-paul-ajayi

  • X

    @_iam_leslie

  • npm

    npm-git-helper, v3.0.0

© 2026 Leslie Paul Ajayi--:-- in Accra

Where I am from, and where I build

That is why I am building for Africa.