MCP server that sanitizes bad broker data and compresses options chains 95% for AI trading agents.
A MCP server that sanitizes bad broker data and compresses options chains by ~95% for AI trading agents. Grounded in production-ready sanitization logic; designed to feed clean, compact data to AI agents in fintech contexts.
๐ ๏ธ Key Features
Sanitizes problematic broker data from Tradier MCP feeds
Compresses options chains dramatically for low-latency AI usage
Local run support with user-provided API keys
Grounded in battle-tested production logic
๐ Use Cases
AI trading agents requiring clean, compact MCP data streams
Local development with personal API keys
Production-style data sanitization workflows for options trading
โก Developer Benefits
Lightweight, local deployment
Clear path to hosted cloud with multi-broker failover (see readme excerpt)
Reusable sanitization logic inherited from real-world trading apps
โ ๏ธ Limitations
Open-source server runs locally; hosted cloud options require additional setup
Documentation excerpt indicates ongoing migration toward production deployments
The catalytic converter between raw broker data and your AI trading agent.
Battle-tested. Sanitization logic extracted from a production options trading app. Handles every bad tick Tradier has thrown at us in production.
ThinChain Demo
โ๏ธ Moving to production?
The open-source server runs locally with your own API keys.
For hosted infrastructure with multi-broker failover, SLA guarantees,
and webhook alerts โ join the managed cloud waitlist.
The Problem
Tradier's MCP dumps 500-row JSON chains. One bad print can corrupt an agent's reasoning. ThinChain sanitizes, compresses, and circuit-breaks that data before it reaches your model.
Sanitize: Drops ghost quotes (0.0/0.0), inverted spreads, NaN/empty/dash values, clamps deltas to [-1, 1], normalizes positive theta on long options, flags illiquid strikes.
Compress: Slices the chain to only the strikes relevant to your strategy (iron condor, straddle, etc.) โ typically 95%+ token reduction.
Circuit Break: Four-tier data quality (clean / noisy / degraded / circuit_breaker_active). When >65% of rows are anomalous, refuses to serve stale data and falls back to last known-good cache.
Real numbers from a live SPY iron condor (2026-06-19 expiration)
code
RAW TRADIER PAYLOAD THINCHAIN OUTPUT
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Rows: 482 Rows: 25
Est tokens: 38,560 Est tokens: 2,000
Token savings: 95%
Anomalous rows removed: 217
Data quality: noisy โ still safely served
ThinChain compresses 482 rows / 38,560 tokens down to 25 rows / 2,000 tokens โ and flags 217 anomalous strikes (illiquid, ghost quotes, wide spreads) that would have polluted the agent's context.