Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .cursor-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
"name": "cli-for-agent",
"source": "cli-for-agent",
"description": "Patterns for designing CLIs that coding agents can run reliably: flags, help with examples, pipelines, errors, idempotency, dry-run."
},
{
"name": "chartlibrary-mcp",
"source": "chartlibrary-mcp",
"description": "Historical chart pattern search engine: 24M+ embeddings, 15K+ symbols, 10 years. 19 MCP tools for pattern search, market intelligence, and trading signals."
}
]
}
30 changes: 30 additions & 0 deletions chartlibrary-mcp/.cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "chartlibrary-mcp",
"displayName": "Chart Library MCP",
"version": "1.1.0",
"description": "Historical chart pattern search engine for AI agents. 24M+ embeddings across 15K+ symbols and 10 years of data. Search by ticker+date or screenshot, get similar historical patterns with forward returns.",
"author": {
"name": "Graham McCain",
"email": "grahammccain@users.noreply.github.com"
},
"homepage": "https://chartlibrary.io",
"repository": "https://github.com/grahammccain/chart-library-mcp",
"license": "MIT",
"keywords": [
"finance",
"stocks",
"chart-patterns",
"market-data",
"trading",
"embeddings",
"historical-data"
],
"category": "data-analytics",
"tags": [
"finance",
"market-intelligence",
"mcp",
"data-analytics"
],
"mcp": "./mcp.json"
}
12 changes: 12 additions & 0 deletions chartlibrary-mcp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog

## 1.1.0 (2026-04-03)
- Added 7 market intelligence tools (anomaly, volume profile, sector rotation, etc.)
- Added 4 trading intelligence tools (regime win rates, pattern degradation, exit signals, risk-adjusted picks)
- Published to PyPI as `chartlibrary-mcp`
- Listed on Glama with A A A score

## 1.0.0 (2026-03-15)
- Initial release with 7 core search tools
- Pattern search, follow-through, fan charts, trade simulator
- Free sandbox tier (200 calls/day)
21 changes: 21 additions & 0 deletions chartlibrary-mcp/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Graham McCain

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
44 changes: 44 additions & 0 deletions chartlibrary-mcp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Chart Library MCP

Historical chart pattern search engine for AI agents. Search 24M+ embeddings across 15K+ symbols and 10 years of market data.

## What it does

- **Pattern Search**: Find the 10 most similar historical chart patterns for any ticker + date
- **Forward Returns**: See what happened 1, 3, 5, and 10 days after each historical match
- **Market Intelligence**: Anomaly detection, volume profiles, sector rotation, correlation shifts
- **Trading Intelligence**: Regime-aware win rates, pattern degradation, exit signals

## 19 MCP Tools

| Category | Tools |
|----------|-------|
| Core Search | `search_pattern`, `search_by_screenshot`, `get_follow_through`, `get_fan_chart`, `get_pattern_summary`, `get_distribution`, `get_trade_simulator` |
| Market Intelligence | `get_anomaly`, `get_volume_profile`, `get_sector_rotation`, `get_crowding`, `get_earnings_reaction`, `get_correlation_shift`, `get_scenario` |
| Trading Intelligence | `get_regime_win_rates`, `get_pattern_degradation`, `get_exit_signal`, `get_risk_adjusted_picks` |
| Utility | `get_health` |

## Installation

```bash
pip install chartlibrary-mcp
```

Or via uvx (no install needed):

```bash
uvx chartlibrary-mcp
```

## Configuration

Get a free API key (200 calls/day) at [chartlibrary.io/developers](https://chartlibrary.io/developers).

Set the `CHART_LIBRARY_API_KEY` environment variable, or the plugin will use the sandbox tier automatically.

## Links

- Website: [chartlibrary.io](https://chartlibrary.io)
- GitHub: [github.com/grahammccain/chart-library-mcp](https://github.com/grahammccain/chart-library-mcp)
- PyPI: [pypi.org/project/chartlibrary-mcp](https://pypi.org/project/chartlibrary-mcp/)
- API Docs: [chartlibrary.io/developers](https://chartlibrary.io/developers)
11 changes: 11 additions & 0 deletions chartlibrary-mcp/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"mcpServers": {
"chartlibrary": {
"command": "uvx",
"args": ["chartlibrary-mcp"],
"env": {
"CHART_LIBRARY_API_KEY": ""
}
}
}
}
27 changes: 27 additions & 0 deletions chartlibrary-mcp/skills/market-intelligence/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: market-intelligence
description: Get market intelligence including anomalies, sector rotation, and correlation shifts
tools:
- chartlibrary.get_anomaly
- chartlibrary.get_sector_rotation
- chartlibrary.get_correlation_shift
- chartlibrary.get_scenario
---

# Market Intelligence

Use Chart Library's market intelligence tools for regime-aware analysis.

## When to use

- User asks about unusual market activity or anomalies
- User wants sector rotation analysis
- User asks "what if SPY drops 3%?" type scenario questions
- User wants to know which stocks are decorrelating from the market

## Tools

- `get_anomaly(symbol)` — Detect unusual pattern activity for a stock
- `get_sector_rotation()` — Current sector ETF rankings by relative strength
- `get_correlation_shift()` — Find stocks decorrelating from SPY
- `get_scenario(condition)` — Conditional forward returns ("what if X happens?")
34 changes: 34 additions & 0 deletions chartlibrary-mcp/skills/search-patterns/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: search-patterns
description: Search for similar historical chart patterns by ticker and date
tools:
- chartlibrary.search_pattern
- chartlibrary.get_follow_through
- chartlibrary.get_pattern_summary
---

# Search Historical Chart Patterns

Use the Chart Library MCP to find historically similar chart patterns and see what happened next.

## When to use

- User asks about a stock's chart pattern
- User wants to know what happened historically after a similar setup
- User asks "what does the chart look like?" or "find similar patterns"

## Steps

1. Call `search_pattern` with the ticker symbol and date
2. Call `get_follow_through` to see 1/3/5/10-day forward returns from the matches
3. Call `get_pattern_summary` for a plain-English summary of the pattern analysis

## Example

"Find similar historical patterns to NVDA on 2026-04-01"

```
search_pattern(symbol="NVDA", date="2026-04-01")
get_follow_through(symbol="NVDA", date="2026-04-01")
get_pattern_summary(symbol="NVDA", date="2026-04-01")
```