ThinChain
Integrates with Polygon.io to fetch market data and options chains, providing sanitized and compressed data for AI trading agents.
ThinChain
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.

☁️ 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.
Related MCP server: TradePilot MCP Server
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.
Installation
git clone https://github.com/snipmcp/thinchain.git
cd thinchain
pip install -e ".[dev]"
cp .env.example .envOr with Docker:
docker-compose up --buildConfiguration
TRADIER_API_KEY=your_key_here
TRADIER_BASE_URL=https://api.tradier.com/v1
POLYGON_API_KEY=your_key_here
POLYGON_BASE_URL=https://api.polygon.io
DEFAULT_BROKER=tradier
CACHE_TTL_SECONDS=30
LOG_LEVEL=INFOUsage
Three example prompts to send to Claude (or any MCP-compatible agent):
Use get_compressed_chain to get an iron condor setup on SPY expiring 2026-06-19Check if SPY options data is trustworthy before I place my tradeGet me the ATM straddle strikes for AAPL expiring 2026-06-19
Run it in two terminals
# Tab 1 — start the MCP server
python -m thinchain.server# Tab 2 — call a tool from a Python shell or your MCP client
# Tool signatures:
# get_compressed_chain(symbol, expiration, strategy="raw",
# delta_range=None, broker="tradier")
# get_sanitized_quote(symbol, broker="tradier")
# get_circuit_status(symbol, expiration, broker="tradier")How it works
Three layers between raw broker output and your model:
Broker API → [Sanitize] → [Compress] → [Circuit Break] → MCP Tool → AI Agent
hygiene strategy anomaly gate
rules slicing + cacheSanitize: 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)
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 servedThinChain 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.
Roadmap
Managed cloud tier (hosted, multi-tenant, webhook alerts)
Polygon connector hardening (live SIP feed)
Webhook alerts for circuit breaker trips
Contributing
PRs welcome. Run pytest before submitting.
Available Tools
3 toolsget_circuit_statusC
Check whether live options data for a symbol is currently trustworthy.
Inputs: symbol (required), expiration (required), broker. Returns: object
get_compressed_chainC
Fetch, sanitize, and compress an options chain for AI agent use.
Inputs: symbol (required), expiration (required), strategy, delta_range, +1 more. Returns: object
get_sanitized_quoteC
Get a single underlying quote with data quality check.
Inputs: symbol (required), broker. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool targets a distinct purpose: checking data reliability, fetching compressed options chain, and getting a single quote with validation. No overlap in functionality.
All tools follow a consistent 'get_' prefix and snake_case convention, making the pattern predictable and easy to understand.
With only 3 tools, the set is compact but well-scoped for a focused domain of options data retrieval with quality checks. Slightly on the smaller side but appropriate for the narrow purpose.
The tools cover core actions (status check, compressed chain, single quote) but lack support for raw chain retrieval, individual option details, or batch operations, leaving notable gaps for comprehensive data access.
Maintenance
Related MCP Connectors
Production MCP server for US equity and options intelligence: real-time IV radar, Monte Carlo simulation, options pressure, strategy backtesting, AI prediction, pre-trade risk analysis, and automated stock research reports.
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
Hosted MCP server for Indian market quotes, option-chain Greeks and multi-broker telemetry.
Official Intrinio MCP server. US stock prices, options and fundamentals for AI agents.
Related MCP Servers
- AlicenseBqualityCmaintenanceAn MCP server that gives an LLM agent a typed, audited tool surface over quant crypto-options desk analytics: gamma exposure, vanna, skew, vol surface, options flow, technicals, portfolio greeks, scenario analysis, and live positions.222MIT
- AlicenseNot gradedqualityDmaintenanceA production-grade MCP server that integrates Polygon.io market data with an 18-layer technical analysis engine to generate actionable options trading signals and high-probability playbooks.1MIT
- AlicenseNot gradedqualityFmaintenanceMCP server for spread-only options execution on Base L2, enabling AI agents to trade options via a defined tool loop.1MIT

cpzai-mcp-serverofficial
AlicenseNot gradedqualityCmaintenanceMCP server for CPZAI platform, enabling AI agents to manage trading strategies, run backtests, route orders across brokers, and access portfolios, risk analytics, and market data through natural language.1MIT