canli-mcp / Compare stocks
How do I compare several stocks' returns and correlation in Claude?
Use canli-mcp's compare_stocks prompt, or ask for the prices of each ticker. You get growth of one dollar, return and risk statistics side by side, a correlation heatmap and the number of independent bets the set adds up to.
Free and MIT-licensed. No account and no API key. Or run claude mcp add canli -- npx -y canli-mcp in Claude Code.
Ask it
Compare SPY, AAPL, NVDA, GLD and TLT over five years.
The agent finds the tool through canli-mcp's find_tool and runs it through run_tool. This is the call:
{
"calls": [
{
"name": "price_history",
"arguments": {
"symbol": "SPY",
"start": "2024-01-01",
"interval": "1Week"
}
},
{
"name": "price_history",
"arguments": {
"symbol": "GLD",
"start": "2024-01-01",
"interval": "1Week"
}
}
],
"return": "all"
}What came back
Recorded from canli-mcp 0.11.1 on 2026-10-25, with no API key set. The model read 17,676 characters.
| date | close |
|---|---|
| 2026-09-07 | 762.397 |
| 2026-09-14 | 761.69 |
| 2026-09-21 | 771.35 |
| 2026-09-28 | 769.64 |
| 2026-10-05 | 778.57 |
| 2026-10-12 | 763.25 |
| 2026-10-19 | 759.97 |
| 2026-10-23 | 759.97 |
The result price_history, call 1 sent back, in full form
{
"symbol": "SPY",
"interval": "1Week",
"adjusted": true,
"start": "2024-01-01",
"end": "2026-10-23",
"count": 148,
"change": {
"from": "2024-01-01",
"to": "2026-10-23",
"total_return": 0.677295
},
"dates": [
"2024-01-01",
"2024-01-08",
"2024-01-15",
"2024-01-22",
"2024-01-29",
"2024-02-05",
"…"
],
"open": [
457.198,
453.586,
460.2,
468.673,
472.275,
478.056,
"…"
],
"high": [
458.66,
463.434,
467.424,
473.621,
480.331,
485.754,
"…"
],
"low": [
451.65,
453.461,
454.981,
467.482,
467.559,
474.696,
"…"
],
"close": [
453.093,
461.575,
467.143,
471.965,
478.685,
485.318,
"…"
],
"volume": [
397560700,
344088200,
356549500,
356721800,
437072100,
318555200,
"…"
],
"currency": "USD",
"exchange": "NYSEArca",
"asset_class": "etf",
"name": "State Street SPDR S&P 500 ETF Trust",
"dividends": [
[
"2024-03-15",
1.595
],
[
"2024-06-21",
1.759
],
[
"2024-09-20",
1.746
],
[
"2024-12-20",
1.966
],
[
"2025-03-21",
1.696
],
[
"2025-06-20",
1.761
],
"…"
],
"splits": [],
"source": "Yahoo Finance chart data (no key)",
"limits": [
"Yahoo Finance's public chart data: unofficial, for personal use under Yahoo's terms, and it can change or stop without notice. Set ALPACA_AP…",
"Not investment advice."
]
}| date | close |
|---|---|
| 2026-09-07 | 398.77 |
| 2026-09-14 | 401.17 |
| 2026-09-21 | 393.41 |
| 2026-09-28 | 380.14 |
| 2026-10-05 | 384.58 |
| 2026-10-12 | 382.01 |
| 2026-10-19 | 366.61 |
| 2026-10-23 | 366.61 |
The result price_history, call 2 sent back, in full form
{
"symbol": "GLD",
"interval": "1Week",
"adjusted": true,
"start": "2024-01-01",
"end": "2026-10-23",
"count": 148,
"change": {
"from": "2024-01-01",
"to": "2026-10-23",
"total_return": 0.93615
},
"dates": [
"2024-01-01",
"2024-01-08",
"2024-01-15",
"2024-01-22",
"2024-01-29",
"2024-02-05",
"…"
],
"open": [
191.44,
187.21,
189.15,
187.23,
188.31,
186.88,
"…"
],
"high": [
191.89,
191.08,
189.26,
188.37,
191.36,
189.39,
"…"
],
"low": [
188.16,
186.56,
185.45,
186.32,
187.19,
186.7,
"…"
],
"close": [
189.35,
189.71,
187.93,
187.01,
188.61,
187.6,
"…"
],
"volume": [
26585800,
28821800,
25596200,
25239500,
36108000,
24865000,
"…"
],
"currency": "USD",
"exchange": "NYSEArca",
"asset_class": "etf",
"name": "SPDR Gold Shares",
"dividends": [],
"splits": [],
"source": "Yahoo Finance chart data (no key)",
"limits": [
"Yahoo Finance's public chart data: unofficial, for personal use under Yahoo's terms, and it can change or stop without notice. Set ALPACA_AP…",
"Not investment advice."
]
}Prices, filings and statistics are as the sources published them on that day; run the call again for today's. Nothing here is investment advice.
The same answer as a view
In a host that draws MCP Apps, view: true shows the person the whole result and gives the model a summary. Watch it, then try it: below the clip is canli-mcp's real view, playing a recording.
The view loads here.
The tools behind the answer
| Tool | Pack | What it does |
|---|---|---|
price_history | markets | Price bars (open, high, low, close, volume), daily to hourly, for US stocks and ETFs, stocks listed abroad (SAP.DE, 7203.T), currency pairs (EUR/USD), futures (crude oil, gold), indices and yields (S&P 500, VIX, 10 year yield) and crypto (bitcoin), by symbol or plain name. Stocks adjust for splits and dividends by default, with dividends, splits and the total return; returns: true adds daily returns. No key needed; uses the user's Alpaca or Tiingo key for US stocks when set. |
Add canli-mcp
claude mcp add canli -- npx -y canli-mcp{ "mcpServers": { "canli": { "command": "npx", "args": ["-y", "canli-mcp"] } } }https://canlicapital.com/mcp/canliEverything canli-mcp does · How it compares with other finance MCP servers
