Two bugs surfaced deploying behind Cloudflare+Caddy at a public domain:
1. MCP streamable-HTTP DNS-rebinding protection has empty allowed_hosts by
default, so a proxied public Host returns 421 'Invalid Host header'. Added
MCP_ALLOWED_HOSTS (comma-separated; '*' disables) wiring into the FastMCP
transport_security settings; localhost added automatically.
2. The /mcp -> /mcp/ mount redirect downgraded to http:// because uvicorn
ignored X-Forwarded-Proto. Run uvicorn with --proxy-headers
--forwarded-allow-ips='*' so redirects stay https behind the proxy.
Verified locally: valid Host+token initializes (200 SSE), redirect Location is
https, spoofed Host still 421, missing token still 401.
Set MCP_ALLOWED_HOSTS=websearch.neilbantoc.dev on the deployment and redeploy.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- pipeline.search_contents: search then render+extract all results in parallel;
per-URL failures degrade to content:null + failed_urls instead of failing
the request
- REST: POST /search/contents (Tavily-like full flow with trace)
- MCP server (streamable HTTP, stateless) mounted at /mcp on the orchestrator;
tools web_search (with optional full content) and fetch_url share the exact
pipeline + caches as REST
Verified: /search/contents end-to-end with parallel scrapes; MCP tool listing
and both tool calls via the official Python MCP client.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>