chart-library-mcp

MCP.Pizza Chef: grahammccain

This server lets your AI assistant find historical stock charts that look like a pattern you specify, showing what happened next based on 10 years of data from over 19,000 stocks. You can use it in apps like Claude Desktop, ChatGPT, Cursor, and VS Code. It provides detailed statistics and features that influenced outcomes, helping you understand market patterns without guesswork. Setup requires some developer steps or can be one-click in Claude Desktop.

Data
Other
Web/Research

Use This MCP server To

Find historical stock charts matching current patterns See what happened after similar stock patterns historically Get statistical summaries of stock pattern outcomes Identify features that separated winning from losing stock patterns Check sector rotation trends in the market Analyze stock behavior under different market conditions Get position guidance based on historical analogs

README

Chart Library MCP Server

PyPI License: MIT Glama Score MCP Registry Tools

Works with: Claude Desktop | Claude Code | ChatGPT | GitHub Copilot | Cursor | VS Code | Any MCP client

Cohort intelligence engine for stock chart patterns — give your AI agent the cohort of historical analogs, the full forward-return distribution, and the features that separated winners from losers. Calibrated, methodology-honest, no overstated confidence.

📖 What is cohort intelligence? · 🛠️ Full MCP setup guide · 🤖 Build an AI trading agent with Claude

25M+ pattern embeddings. 10 years of history. 19K+ stocks. One tool call.

> "What does NVDA's chart on 2024-08-05 1h look like historically?"

NVDA · 2024-08-05 · 1h — cohort of 500 historical analogs
(485 with realized 5-day returns)

  Distribution at 5 days forward:
    median:        −1.3%
    p10 ·· p90:    −11.3% ·· +6.8%   (80% empirical band)
    win rate:      44%
    cohort_score:  0.31 (modest)

  Features that separated winners from losers:
    + credit_spread_state = tight
    + macro_state = bullish
    + pct_off_52w_low (further off)
    − vol_regime = low

  Summary: NVDA's 1-hour pattern on 2024-08-05 has 500 historical
  analogs. The cohort's 5-day distribution is bearish-leaning
  (median −1.3%, win rate 44%) — the historical record does NOT
  show this pattern typically resolving bullish. Conditioning on
  tight credit spreads and a bullish macro state would have
  separated the outperformers within the cohort.

A retrieval, not a forecast. No hallucinated predictions. No cherry-picking. Just the empirical record your agent can cite.


Quick Start

pip install chartlibrary-mcp

chart-library-mcp FAQ

Can I use this to find historical stock charts similar to a current pattern?
Yes — it lets your AI find and analyze similar past stock charts with detailed outcomes.
Can I use this to get insights on what happened after a stock pattern occurred?
Yes — it shows the historical forward returns and factors that influenced winners and losers.
Which apps can I use this with?
It works with Claude Desktop, ChatGPT, Cursor, VS Code, and GitHub Copilot.
Do I need an API key or account?
You can use a free tier with no credit card required, but an API key is available for extended use.
How hard is it to set up?
Setup is developer-level, requiring installation and configuration, though Claude Desktop offers a one-click install option.
Can I use this with ChatGPT?
Yes — in ChatGPT's developer mode, you can connect to the Chart Library server via a remote URL.