Dev.to AI 🤖 Ai 👁 0 📖 1 min read

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)

  1. The client calls research(question=...).
  2. Fast lookups complete inline in seconds and return the structured, cited answer immediately.
  3. Multi-step deep investigations run asynchronously inside an explicit budget (deep_investigation_budget) and, if still running when the synchronous window expires, return a lightweight request_id receipt.
  4. 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

  1. Cloudflare Error 1010 on urllib: Python's default User-Agent: Python-urllib/3.12 triggers Cloudflare bot rules on strict WAF edges. Explicitly setting User-Agent: popa-recon-mcp/0.1.0 resolved it cleanly without extra dependencies.
  2. Browser + SSE on One URL: /mcp renders human-readable documentation for GET requests without Accept: text/event-stream and routes MCP transport otherwise — which means edge caches (s-maxage) must stay strictly private, no-store on 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.

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.