18-tool financial MCP server + live SSE push: 3 fixes that cut 40K-token option chains by 90%

J_meeeeeee · reddit · 2026-12-02

The Trade IQ team shares how they connected Claude Desktop, Cursor, and Python agents to live US options/equities market data via an MCP server and Server-Sent Events push stream, and the three bottlenecks they hit. (1) Raw OPRA option chains burned 15K-40K tokens per call and broke Claude's Net GEX math — fixed by moving 100% of aggregation server-side into 18 compact pre-computed tools (>90% payload reduction). (2) Parallel cold fetches caused thundering herds — fixed with shared Redis caches (30-90s TTLs), per-worker asyncio.Semaphore(4), and per-key quotas (5,000 calls/day, 60 req/min, max 10 per JSON-RPC batch). (3) Agents polling REST in tight loops wasted quota — replaced with a dedicated SSE stream (Nginx with buffering off) reading Redis Pub/Sub plus deduplicated snapshot deltas, with channel/ticker filtering, 20s heartbeats, and 2 concurrent streams per key. Includes example MCP config.

Original post →

More from coding & agent

coding & agent channel →