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.
More from coding & agent
- RL-trained Hermes adapter lifts Inkling-2-Mini to 84% on SWE-bench Pro with 40% fewer tokens — yb2698 · 2026-12-02
- Robot-dev agent Clé lets frontier models build robots in sim, endorsed by Google's Scott Reed — NandoDF · 2026-12-02
- Indie dev gates cold emails with an evaluator Claude: all 9 plain pitches scored below 3.6 — intensityflow · 2026-12-02
- Open-source Murmuration renders Solana's long tail as live 3D flock using random matrix theory — jradoff · 2026-12-02
- Running a persistent AI agent across real businesses for 12 days: 9,109 messages, 139 jobs — OGMYT · 2026-12-02
- Developer: the cost of a line of code is approaching zero — tlakomy · 2026-12-02