Building a Remote Streamable HTTP MCP Server for 5-Minute On-Chain Deep Research (No API Key Required)
The Problem with Synchronous MCP Tools for Deep Research Most MCP servers wrap fast REST calls: query a DB row, list issues, read a file, return in 200 ms. On-chain due diligence doesn't fit cleanly into 200 ms: resol
The Problem with Synchronous MCP Tools for Deep Research
Most MCP servers wrap fast REST calls: query a DB row, list issues, read a file, return in 200 ms.
On-chain due diligence doesn't fit cleanly into 200 ms: resolving ambiguous tickers vs contract addresses across chains, reading contract audits & deployer history, fetching primary docs sitemaps, checking Telegram/X announcements, and verifying transaction hashes can take 30 to 240 seconds. Hold an HTTP tool call open that long behind Cloudflare and a client's 60-second timeout will drop it.
When building POPA Recon (https://poparecon.com/mcp), we solved this cleanly in the Streamable HTTP (2025-03-26) transport without inventing custom proprietary protocols.
Pattern: Bounded Wait + Receipt (research -> answer)
- The client calls
research(question=...). - Fast lookups complete inline in seconds and return the structured, cited answer immediately.
- Multi-step deep investigations run asynchronously inside an explicit budget (
deep_investigation_budget) and, if still running when the synchronous window expires, return a lightweightrequest_idreceipt. - The assistant simply calls
answer(request_id=...)to retrieve the completed report once settled.
Supporting Both Native Streamable HTTP and STDIO Clients
Modern clients connect directly to the remote endpoint:
claude mcp add --transport http popa-recon https://poparecon.com/mcp
For local STDIO-only hosts, we published a zero-dependency ~130-line Python STDIO-to-Streamable-HTTP bridge (lightsmite/popa-recon-mcp) and an installable Claude Code plugin (lightsmite/popa-recon-plugin).
Two Surprising Edge Cases We Hit Live
-
Cloudflare Error 1010 on
urllib: Python's defaultUser-Agent: Python-urllib/3.12triggers Cloudflare bot rules on strict WAF edges. Explicitly settingUser-Agent: popa-recon-mcp/0.1.0resolved it cleanly without extra dependencies. -
Browser + SSE on One URL:
/mcprenders human-readable documentation forGETrequests withoutAccept: text/event-streamand routes MCP transport otherwise — which means edge caches (s-maxage) must stay strictlyprivate, no-storeon the shared transport URL while localized docs (/ru/mcp,/uk/mcp) can be safely cached.
Full tool schemas, examples, and public guides are exposed in Markdown for AI assistants at https://poparecon.com/llms-full.txt.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.