Reference

MCP documentation

What this is

quant-swarm (1.2.0) exposes a unified default server (quant-swarm, 12 core tools) and three specialist MCP servers (48 tools in the local uvx package; 12, 16, 12 and 11 on the hosted HTTP endpoints): swarm-data-mcp (point-in-time data assembly, derived market/sentiment snapshots), swarm-warden-mcp (pre-trade invariant and leakage auditing), and swarm-gym-mcp (regime-fragility probing, symbolic formula evaluation, and the Shadow Tournament). No tool places, cancels, or routes orders, and no tool accepts provider credentials.

Authentication

Get a token at /mcp/ (free, instant). Set it in each server's environment:

SWARM_MCP_ACCESS_TOKEN=121_xxxxxxxx

Hosted endpoints accept it as a Bearer credential over streamable HTTP (or via OAuth 2.1 PKCE consent). POST /api/mcp/verify (or GET /api/mcp/verify with Authorization: Bearer) reports plan, status (active | inactive | exhausted | expired), features, quota and the rates card. A Pro token whose credit pool is empty or past its 90-day window verifies with a non-active status and the free feature set.

Plans, quotas & the credit rate card

  • Free: 250 relay data calls/month, 10 symbols/call, 365-day backfill window. All warden checkers, derived market/sentiment/regime snapshots, cache stats, offline mode, and tournament.leaderboard. No hosted compute.
  • Credit packs (Pro): one-time packs — 10,000 credits (£19) or 100,000 credits (£149), valid 90 days from purchase, no subscription and no auto-renewal. Unlocks the full tool catalog, 50 symbols/call, the full backfill window, hosted compute and the Shadow Tournament.
  • Burst limit: 60 metered calls per 60 seconds per token, durable across instances.
Metered item Credits
relay data call (/data/bars, /data/enrich) 1
hosted single-shot Pro tool (features.build, warden.optimize_portfolio, gym.evaluate_formula, gym.evaluate_graph, gym.prop_challenge_sim, gym.label_regimes, gym.estimate_cloud_run) 1
hosted gym episode (gym.probe_fragility, gym.paired_preview) — 5 regimes × per_regime × seeds (× 2 genomes for paired) 1 per episode
tournament.submit (100 paired episodes vs the live champion) 200 · 100 with contribute=true
audit.backtest_inline (hosted or local, inline CSV up to 250 KB) · audit.status · local stdio audit.backtest / preflight / quote / run / report / compare · warden.promotion_verdict · tournament.verdict · tournament.leaderboard · tournament.forward_league · warden checkers · local cache tools · any tool over local stdio 0

Hosted compute is charged before the tool runs via POST /api/mcp/meter; if the meter refuses or is unreachable the call is refused, never served unmetered. Local stdio execution is never metered.

Tool catalog (48 local stdio tools; 12 / 16 / 12 / 11 hosted HTTP)

Server Free Pro
swarm-warden-mcp (18 local · 12 hosted) audit.backtest_inline · audit.status · warden.validate_order · warden.cost_check · warden.explain_sizing · warden.validate_genome · warden.audit_features · warden.plan_rebalance · warden.promotion_verdict · warden.prop_challenge_check · warden.defensive_posture · stdio-only: audit.backtest · audit.preflight · audit.quote · audit.run · audit.report · audit.compare warden.optimize_portfolio
swarm-data-mcp (19 local · 16 hosted) market.pulse · market.sentiment · market.regime · market.climate · pit.analysis (lite: 1 symbol, top families) · stdio-only: cache.stats · cache.offline features.build · market.microstructure · volume.forecast · market.screen · market.rank · market.fundamentals_pit · market.insider_institutional_pit · market.supply_chain_pit · market.macro_nowcast · market.flow · market.transfer_entropy · pit.analysis (full: 10 symbols, every family, historical as_of) · stdio-only: cache.warm
swarm-gym-mcp (11 local & hosted) tournament.leaderboard · tournament.forward_league gym.evaluate_formula · gym.evaluate_graph · gym.prop_challenge_sim · gym.label_regimes · gym.probe_fragility · gym.paired_preview · gym.estimate_cloud_run · tournament.submit · tournament.verdict

Every response is derived-only: ratios, percentile ranks, labels, buckets, and counts. Raw provider values are never echoed. Tools accept optional caller-supplied bars for symbols the shared cache does not carry.

PIT significance verdicts (pit.analysis) & Two-Stage Alt-Data Gate

We supply our own derived point-in-time alternative-data signals only after every observation passes a two-stage validation gate:

  • Gate L0 (Within-Asset Baseline Consistency): Each incoming observation is standardized against that asset’s own trailing point-in-time distribution (available_at ≤ as_of z-scores, percentile ranks, and YoY deltas). Any series showing structural step-changes from feed/schema breaks, restatement contamination, or staleness beyond its cadence cap is quarantined as UNSCORABLE, never zero-filled.
  • Gate L1 (Forward Incremental Return Power): Every L0-clean series is tested for forward residual return power after size/sector neutralization across multiple horizons, with Newey-West overlap correction, Benjamini-Hochberg (q ≤ 0.05) across all tested families, and a shuffled-date placebo.

pit.analysis reads the release-gated pit_analysis/v2 store and, per underlying, explains every (dataset|metric|horizon) family: rolling 52-week IR on a size/sector-neutralized metric vs neutralized returns, Newey-West two-sided p (lag ceil(horizon/5)), observation count, coverage and staleness. The verdict is explicit and never guessed: SIGNIFICANT (an L1 survivor of the same run: IR > 0 and Benjamini-Hochberg q ≤ 0.05, promoted into features.build), NOT_SIGNIFICANT (passes L0 hygiene but fails L1 forward power — kept inspectable so agents know which signals to avoid), NOT_JUDGED (below the 26-observation floor, stale, or diagnostic-only) or UNVERIFIED (no gate artifact / gate from another run / failed placebo). Point-in-time: release points after as_of are ignored; raw metric values are never returned.

Shadow Tournament

The swarm selects strategies by paired champion-vs-challenger replay on identical episode-seed paths across five labelled regimes, an ELO ledger, and statistical promotion gates. tournament.submit puts a genome into that arena:

  1. warden.validate_genome locally — returns the genome_hash; nothing is sent.
  2. tournament.submit(genome, contribute) → POST /api/mcp/tournament/submit. Charges 200 credits (100 with contribute=true), returns a job_id (HTTP 202). Payload: the genome parameter vector, its hash, the contribute flag — never symbols, bars or credentials. The strategy-contributor tier may additionally send a written disclosure and/or strategy_code: submitted code is never executed — it is read statically by the hosted LLM reviewer, stored as a structured explanation plus a code hash, and the raw code is discarded after review.
  3. The hosted runner replays the genome and the swarm's current champion over 5 regimes × 4 per regime × 5 seeds (100 paired episodes, above MIN_EPISODES=20) on the hosted daily-bar panel and computes: Wilcoxon paired p-value, bootstrap 95% CI of the delta, per-regime deltas, worst-regime margin, hard-constraint and lookahead violations.
  4. Outcome: CHALLENGER_BEATS_CHAMPION (p ≤ 0.05, positive mean delta, non-negative worst-regime margin, zero violations) · CHALLENGER_LOSES (any violation, or a significant negative delta) · INCONCLUSIVE. ELO updates for the challenger and the champion (K=16, start 1500).
  5. tournament.verdict(job_id) → GET /api/mcp/tournament/verdict (owner only, no charge). tournament.leaderboard → GET /api/mcp/tournament/leaderboard (12-char hash prefixes, no identities).

How the swarm selects. Two arenas. Replay: champion vs challenger on identical episode-seed paths across five labelled regimes, Wilcoxon paired test, worst-regime margin, deflated-Sharpe and PBO gates — the fast signal, and where your submission is scored. Forward league: every Sunday each league genome (champion, top-ELO challengers, contributed genomes, and a planner entrant whose weekend moves come from a learned model) seals its positions for the coming week; the commitment hash is stored before the week happens, and the next cycle settles every position against realised closes, net of that genome's own cost model, ranking the field on the identical real week and updating ELO. Each position is recorded as component moves (screen, entry, size, weekend) with decision-time state, so credit is assigned per move and regime. The league opened on 2026-09-02; the swarm runs unchanged for eight weeks to accumulate settlements. Promotion still requires the replay gates; the forward record is reported alongside.

Retention. contribute=false: the vector is deleted from the job record once scored; hash and outcome remain. contribute=true: you license the vector and outcome to the swarm's evolution loop, where it is registered as an external challenger under the same tier caps and promotion gates as the swarm's own mutants (Terms). The outcome is a tournament result, not a promotion: the promotion gate (deflated-Sharpe margin, PBO cap, monotonic trials ledger) runs inside the swarm's registry. Failed runs (panel unavailable, unscorable tier-B/C mutation) are refunded automatically.

Error codes

  • 401 — token rejected, revoked, or missing.
  • 402 — plan/quota refusal with a structured body (reason: quota_exceeded | credits_exhausted | credits_expired | plan_required | inactive) and an upgrade_url. Pro tools on free tokens return UPGRADE_REQUIRED envelopes on stdio; on the hosted endpoint a compute refusal is JSON-RPC -32003 with the same reason and the credits the call would have cost.
  • 429 — burst limit (60 calls/60s).
  • 5xx — service unavailable; provider details are never leaked to clients. A tournament dispatch failure returns 503 and refunds the charge.

Install

uvx --from quant-swarm==1.2.1 quant-swarm
uvx --from quant-swarm==1.2.1 swarm-data-mcp
uvx --from quant-swarm==1.2.1 swarm-warden-mcp
uvx --from quant-swarm==1.2.1 swarm-gym-mcp

Hosted endpoints: https://mcp.1.21initiative.com/mcp · https://mcp.1.21initiative.com/mcp/data · https://mcp.1.21initiative.com/mcp/warden · https://mcp.1.21initiative.com/mcp/gym. Source: github.com/blink1217/trading-swarm-mcp. Not investment advice — see Terms.