MCP-native · 25M+ indexed analogs · calibrated, never directional

Give your agent the base rates, not a guess.

A trading agent's hardest questions are empirical — what usually happens after a setup like this? Chart Library answers with the real historical analogs and their calibrated outcome distribution, in one MCP call. Base rates your agent can act on and cite — never a forecast.

For traders & researchers

See the comp set, and how often its band held.

Type a ticker and date. Get the cohort of historical analogs, their forward-return distribution clustered into outcome modes, the drivers that separated past winners from losers — and a coverage record you can audit.

NVDA · 1h · worked examplecohort
Uptrend 28%Sharp choppy 10%Sideways 44%Downtrend 18%
25M+
indexed patterns
10yr
across 19K symbols
80.8%
coverage record, held out
For AI agents & agent builders

Free for agents — no key, no signup.

The core research loop is open. Connect over the hosted MCP and call it right now — anonymously, free, no human in the loop. Paid keys exist only for volume SLAs and premium surfaces, never for the core loop.

~/agent · free, keyless
# Hosted MCP — no account requiredhttps://chartlibrary.io/mcp # or run it locally$ pip install chartlibrary-mcp # the canonical loopsearch pull_comps introspect track_record
Trust receipts · live, verifiable
80.8%
Coverage record, held out
Nominal 80% forward-return band held 80.8% across 310,592 audited cases — an audit of past predicted-vs-realized coverage, not a forward claim.
PIT / rank histogramflat across 311K+ audited cases — max deviation 0.5ppRealized outcomes land where the served distributions said they would along the entire shape, not just one band. Served as pit_histogram in the same endpoint.
Live example · NVDA · as of 2026-05-28

300 analogs from 10 years, split into 4 outcome paths.

Not a forecast. The empirical split of what historical analogs actually did over the next 5 trading days. Hover a mode to read its distribution.

Outcome moden5d medianup rate
Uptrendclean continuation84+5.2%73%
Sharp choppy uptrendvolatile, net up31+2.8%67%
Smooth sidewaysrange-bound drift132+1.1%62%
Downtrendfailed breakout53-2.1%43%
Forward-return distribution · 5d
Uptrend
n=84 · 28% of cohort · 5-day forward
UP RATE
73%
IQR (25–75)
+1.8 / +8.9%
Daily rebuild · 1-hour bars · 5-day forward window · 300 of 500 nearest analogs shownSee NVDA live

A new way to query markets

Pattern search has always been mathematical. We made it shape-based.

Old way · indicator search

Search by formulas someone wrote.

  • Define a “rising wedge” with a math expression.
  • Scan the universe for charts matching the rule.
  • You query in indicator space — the same query for everyone.
  • Limited to patterns someone bothered to formalize.
TradingView · ThinkOrSwim · Finviz · Trendspider
Chart Library · pattern search

Search by raw chart shape.

  • Take an actual chart — a real stock on a real date.
  • Get back the 500 historical days that look like it as raw shape.
  • Cluster them into 3–4 outcome modes — what they actually did next.
  • Each mode reports count, median return, up rate, and the IQR.
25M+ patterns · 19K symbols · 10 years

How a query flows

From anchor to actionable read in one MCP call.

01 / ANCHOR

Anchor

Your agent picks any (symbol, date, timeframe). NVDA · today · 1h — the chart you want to understand.

02 / MATCH

Match

The system finds the 500 historical days that look most like your subject as raw price + volume shape. No indicators. No formulas.

03 / STRATIFY

Stratify

Cluster the 500 analogs into 3–4 outcome modes by what they did next. Each reports count, median, up rate, and distinguishing features.


How the agent talks to you

We don’t script the agent. We hand it the comp set.

The MCP tool returns descriptive comp-set fields — comp strength, match quality, conditions, coverage record, and the drivers that separated past winners from losers. Your agent reads them and writes the answer in its own voice. Numbers stay in parentheses.

pull_comps returned · comp set summary
comp set
comp_strength=lowmatch_quality=looseconditions=normalcoverage=0.81
drivers
sector_laggingnarrative_passiveearnings_near
caveat_flags
soft_in_regime_sampleregime_was_derived
sample
quality=okn_in_regime=21n_total=132
CLagent reads the flags and writes in its own voice ↓

“Honestly, this one reads like a coin flip. NVDA’s in-regime analogs printed about the same as everything else — the comp set doesn’t separate up from down here.”

Of the 132 closest analogs, 21 printed under a regime like today’s. Their 5-day median was +0.09% with a 52% hit rate — small enough that the regime isn’t doing much work.

What I’d watch
  • Sector lagging hard. XLK 60-day RS is −10.4 — skews tech reads lower until it turns.
  • News without follow-through. Pulse +0.29 — looks like vol repricing, not a narrative change.
  • Earnings in 16 sessions. Pattern reads weaken this close to the print.
POST /api/v1/pull_comps · NVDA · 2026-05-11 · 1h● ~9ms retrieval · 1-3s warm call · not financial advice

Every read is grounded in the 13 canonical tools your agent can also call directly: search pull_comps cohort_introspect cohort_members cohort_groupby cohort_rerank symbol_intelligence analyze context explain portfolio track_record report_feedbackpull_comps is the front-of-house comp-set primitive (cohort_analyze remains available with its original field names).


The coverage record · held-out, symbol-disjoint
80.8%

Our nominal 80% forward-return band held 80.8% across 310,592 audited cases (5-day horizon, no same-stock leakage). It is an audit of past predicted-vs-realized coverage, not a forward claim — and it is live: call /api/v1/calibration and check it yourself.

Against an ungrounded LLM on 300 out-of-sample setups, that band matched the model’s own 80% interval on coverage (~83%) in a band 44% tighter — same honesty, half the vagueness, reproducible from the public API.

Separately, in a blind paired evaluation a judge — not told which agent held which tools — preferred the grounded reasoning on every scenario, across all six dimensions below. An agent given a research desk investigates more, so a gap is expected by construction; what the blind judge adds is that the grounded reasoning was preferred even when both agents reached the same conclusion.

Read the full methodology
Grounding in evidence+62%
Calibration+58%
Specificity+71%
Risk awareness+44%
Avoids overclaiming+53%
Actionability+49%

For developers

Drop-in chart pattern intelligence for any AI agent.

MCP-native. Works with Claude Desktop, Cursor, Hermes Agent, or any MCP-capable client. Under a minute to install.

~/agent · zsh
# Install$ pip install chartlibrary-mcp # Register with Hermes Agent$ hermes mcp add chartlibrary \    --command "chartlibrary-mcp" # Also works with Claude Desktop & Cursor 9 tools registered · ready
Free
Generous limits for experimentation
$0
Scale
Production deployments · priority support
$99/mo
Agent
Cohort session handles · decision_brief orchestrator
$299/mo
Read the API docs
13 canonical tools, calibration report, methodology
Docs

What’s next

The next ten years of markets × AI runs on grounded retrieval.

Every AI agent that talks about stocks today is making up cohort statistics. The interfaces got smarter; the grounding didn’t catch up. Chart Library is the layer.

Now

MCP-native retrieval

13 canonical tools. 25M+ patterns. Calibrated forward distributions, regime stratification, and Layer 5 memory that compounds with every query.

Soon

Live + multi-timeframe

Real-time intraday updates. One subject, simultaneous matches across 5min / 15min / 1h / 1d.

Next

Cross-asset

Crypto first — the active agent-trading market. Then futures, then international equities. Same architecture, broader universe.

Chart Library

Build an agent that knows what happened before.

Anchor a chart, pull its comp set, and let your agent reason from what the market actually did — not from what it imagined.