# Kwant — Quant Intelligence for AI Agents > Kwant is quant intelligence delivered as an endpoint. A hosted Model Context > Protocol (MCP) server that lets an LLM agent reason about markets like a quant > desk — data, signals, factor scores, screens, backtests, and portfolios over > US & TSX equities. Agents query parameterized tools over Streamable HTTP and > receive structured JSON. No install, no Python. Computation runs server-side on > Cloudflare Workers. Endpoint (MCP over Streamable HTTP, JSON-RPC 2.0): https://kwant.sh/mcp Landing page: https://kwant.sh/ Health: https://kwant.sh/health ## How to connect Every /mcp request needs a valid API key (`Authorization: Bearer kwant_…`) — including the handshake. The auth gate runs before billing, so a key opens the session; only `tools/call` is additionally charged. 1. POST `initialize` to /mcp — requires a key, no charge. Returns serverInfo {name: "kwant"} + an `mcp-session-id` header. 2. POST `tools/list` — requires a key, no charge. Returns the 16 tools with JSON schemas. 3. POST `tools/call` — requires a key AND payment. Charge is drawn from a prepaid balance funded by Stripe top-up, OR paid per query with an x402 `X-Payment` header (USDC on Base mainnet). An authenticated-but-unpaid call returns HTTP 402 advertising every enabled rail (`Accept-Payment: x402, prepaid`). Capability negotiation (`initialize`, `tools/list`, `ping`) carries no charge but still requires a key. No key → HTTP 401. Keys are provisioned by Kwant. ## The three layers Kwant turns raw market data into judgment across three ascending layers: Data layer — $0.005 per query: - get_quote: latest point-in-time quote for a ticker. - get_price_history: OHLCV bars over an interval/range. - get_fundamentals: profile + key ratios (market cap, PE, sector, …). Signal layer — $0.005 per query ($0.010 for the correlation matrix): - compute_indicator: RSI, MACD, SMA, EMA, BBANDS, ATR, ADX, STOCH. - detect_signals: golden/death cross, RSI bands, MACD cross, breakout. - compute_stats: volatility, sharpe, max_drawdown, returns, beta, correlation. - compare_tickers: rank N tickers by a chosen metric. - compute_correlation_matrix: pairwise correlation across a basket ($0.010). Intelligence layer — $0.010 per query: - screen: filter a universe by fundamental/technical rules. - screen_with_scores: screen + rank with composite factor scores. - build_monthly_universe: construct a point-in-time monthly universe. - compute_universe_scores: factor scores across a whole universe. - construct_portfolio: build a weighted portfolio from a selection. - compute_portfolio_stats: portfolio-level risk/return statistics. - backtest: backtest a signal/strategy on one ticker. - run_portfolio_backtest: monthly-rebalanced multi-asset backtest. ## Tickers US symbols are bare (AAPL). TSX uses the Yahoo `.TO` form (RY.TO) or the `TSX:RY` prefix. TSX Venture uses `.V`. Indices use the caret form (^GSPC). ## Payment rails - x402 (crypto): per-query USDC settled on-chain (Base mainnet) via the CDP facilitator. Send `X-Payment`; receive tx hash in `X-Payment-Response`. - prepaid (fiat): fund a balance via Stripe Checkout (`POST /topup`), each query debits it. Read balance at `GET /balance`. ## Notes - Data is for research and analysis; not investment advice. - Prices above are authoritative and enforced server-side per tools/call.