Claude
ClickAPIs is an MCP server, so Claude can call every endpoint as a tool and answer market questions with computed numbers instead of guesses.
Server URL https://clickapis.com/mcp · Streamable HTTP · authenticate with your API key as a Bearer token. Calls through MCP are billed exactly like direct API calls.
Claude Code
claude mcp add --transport http clickapis https://clickapis.com/mcp \ --header "Authorization: Bearer $CLICKAPIS_KEY"
Add --scope user to make it available in every project. Then ask, for example: “Use clickapis to backtest a golden cross on SPY since 2000 with an 8% stop and summarise the trades.” Check the connection with claude mcp list or /mcp inside a session.
Claude Desktop
Claude Desktop runs local MCP servers from its config file, so use the mcp-remote bridge (needs Node.js) to reach our HTTP server with your key. Open Settings → Developer → Edit Config and add:
{
"mcpServers": {
"clickapis": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://clickapis.com/mcp",
"--header",
"Authorization:${CLICKAPIS_AUTH}"
],
"env": {
"CLICKAPIS_AUTH": "Bearer ck_live_…"
}
}
}
}Restart Claude Desktop; the ClickAPIs tools appear under the tools menu.
claude.ai custom connectors
Custom connectors on claude.ai (Settings → Connectors → Add custom connector) sign in with OAuth rather than a pasted key. Until ClickAPIs offers OAuth sign-in for connectors, use Claude Code, Claude Desktop or the API as shown here.
Claude API (MCP connector)
With the Messages API, Anthropic connects to our MCP server for you: list it in mcp_servers and enable it with an mcp_toolset tool. Both are required, together with the mcp-client-2025-11-20 beta.
# pip install anthropic
import os
import anthropic
client = anthropic.Anthropic() # reads ANTHROPIC_API_KEY
resp = client.beta.messages.create(
model="claude-opus-5-5",
max_tokens=4096,
betas=["mcp-client-2025-11-20"],
mcp_servers=[{
"type": "url",
"url": "https://clickapis.com/mcp",
"name": "clickapis",
"authorization_token": os.environ["CLICKAPIS_KEY"],
}],
tools=[{"type": "mcp_toolset", "mcp_server_name": "clickapis"}],
messages=[{
"role": "user",
"content": "Has buying QQQ after a 3-day losing streak worked over the last 10 years? "
"Compare with buying on any day.",
}],
)
for block in resp.content:
if block.type == "text":
print(block.text)curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: mcp-client-2025-11-20" \
-H "content-type: application/json" \
-d '{
"model": "claude-opus-5-5",
"max_tokens": 4096,
"mcp_servers": [{
"type": "url",
"url": "https://clickapis.com/mcp",
"name": "clickapis",
"authorization_token": "'"$CLICKAPIS_KEY"'"
}],
"tools": [{"type": "mcp_toolset", "mcp_server_name": "clickapis"}],
"messages": [{"role": "user", "content": "Which sectors lead this month, and are they overbought?"}]
}'Tools Claude gets
| Tool | What it does |
|---|---|
snapshot | Everything about one symbol today in a single call: period returns, trend, momentum, volatility regime, 52-week range, volume, one-year risk and the signals active on the latest bar. |
performance | Period returns, CAGR, volatility, Sharpe, Sortino, maximum drawdown, VaR and CVaR, skew and kurtosis, plus beta, alpha, R², tracking error and up/down capture against a benchmark. |
query | Evaluate any expressions over a symbol’s history and keep only the bars where a condition holds. Same expression language as screens, event studies and backtests. |
drawdowns | Every drawdown episode: peak, trough, depth, bars to the trough and to recovery, the current drawdown and the share of time spent under water. |
seasonality | Average, median, win rate and t-statistic for each calendar month and weekday, the best and worst years, and a year-by-month grid. |
distribution | The distribution of returns over a horizon: percentiles, skew and fat tails, a histogram, how often moves beyond given thresholds happen, and where the latest move sits. |
levels | Support and resistance levels from clustered swing highs and lows, with touches and distance from the last close, plus pivot points and the position in the range. |
correlation | Correlation matrix over a window, the most and least correlated pairs, annualised volatilities, and a rolling correlation for the first pair. |
compare | Several symbols side by side over the same dates: total return, CAGR, volatility, Sharpe, max drawdown, beta, and a growth-of-1 series for charting. |
risk | Portfolio volatility, historical and parametric VaR and CVaR (in money with a portfolio value), each holding’s share of risk, diversification ratio, beta and the worst days. |
event_study | Every time a condition was true, what happened next: forward returns at several horizons, win rate, and the edge over all other bars with t-statistics. Pool up to 100 symbols in one call. |
backtest | Rule-based backtest with entry and exit expressions, stops, targets, time limits, fees and slippage, filled at the next open with no look-ahead. Returns statistics against buy-and-hold, every trade and the equity curve. |
screen | Run a condition across a universe or your own list, add computed columns and sort. Returns the symbols that match on the latest bar. |
movers | Biggest gainers, losers, gappers, volume surges or widest ranges in a universe over the last day, five days or month. |
sectors | Sector performance across a universe: median return per sector over several periods, breadth (share above the 50-day average) and the leading sector for each period. |
peers | The instruments that behave most like a symbol: same sector and industry, ranked by a similarity score that includes one-year return correlation. |
trader_stats | How a symbol trades: the win rate of days, weeks, months and years, average and largest up and down moves, the longest winning and losing streaks, volume on up versus down days, and a year-by-year table. |
volatility | Realised volatility with five estimators (close-to-close, Parkinson, Garman-Klass, Rogers-Satchell, Yang-Zhang) over several windows, the volatility cone with today’s percentile in each window, and a regime label. |
volume_profile | Volume by price over the lookback: the point of control, the value area high and low, high- and low-volume nodes, and where the current price sits in the profile. |
unusual_volume | Every volume spike (volume at least <code>threshold</code> times its average) with the return that day and 1, 5 and 20 bars later, and what followed up-day and down-day spikes compared with all bars. |
gaps | Opening gaps up and down: how often they fill the same day and within N days, how long filling takes, open-to-close and next-five-day returns by gap size, and the recent gaps that are still open. |
streaks | Runs of consecutive up and down closes: how long they last, the current streak and how often one that long carried on, and what happened over the next bar and next five bars after an N-day up or down streak. |
candles | Seventeen candlestick patterns with stated rules (doji, hammer, engulfing, harami, piercing line, stars, three soldiers and crows, marubozu): occurrences, forward returns and win rates against all bars, the latest occurrences and the patterns on the last bar. |
signals | Twenty-three technical signals (golden and death crosses, RSI, MACD, Bollinger breaks, 52-week highs and lows, ADX, volume breakouts, SMA and stochastic crosses): which fired recently, and how each one has done on this symbol before. |
best_days | The best and worst days with dates, what buy-and-hold returned against missing the best (or the worst, or both) 5, 10, 20 or 30 days, and how closely the best days cluster around the worst ones. |
earnings_moves | How a stock reacted to every earnings report, measured on the right day for before-the-open and after-the-close reports: the gap, the day’s move, the close-to-close reaction and the 5- and 20-day drift, with move statistics, beats against misses and the next report date. |
dividends | Dividend history adjusted for splits, annual totals, 1, 3, 5 and 10-year growth, consecutive years of increases, payment frequency, trailing and forward yield, and where today’s yield sits in its own history. Stocks and ETFs. |
fibonacci | Fibonacci retracements (23.6% to 78.6%) and extensions (127.2% to 261.8%) of the dominant swing in the lookback, with prices, distances from the last close and the nearest support and resistance. |
factors | OLS of excess returns on ETF factor proxies (market, size, value, momentum, quality, low volatility, or your own long/short legs): betas, t-stats, R², annual alpha, residual volatility and a rolling 1-year market beta. |
liquidity | Average and median dollar volume (20/60/252 days), Amihud illiquidity, Roll and Corwin-Schultz spread estimates, turnover, volume variability and an optional liquidity percentile within a universe. |
range | True range and ATR with its regime percentile, inside/outside days, NR4/NR7 bars and what followed them, average range by weekday and expansion/contraction streaks. |
skew | Rolling skewness and kurtosis with their percentiles, up vs down volatility, tail ratio, 3-sigma counts and the largest down days. |
herding | Cross-sectional dispersion (CSSD, CSAD) across a universe, the Chang-Cheng-Khorana herding regression, the extreme-market-day test and a rolling CSAD series. |
attribution | Portfolio total return split into additive contributions by holding, by sector and by month (best and worst contributor), buy-and-hold or rebalanced. |
stress | Portfolio return, max drawdown and worst day through historical crises (2008, 2011, 2015, 2018, 2020, 2022, 2023) and your own windows, contributions per holding, plus beta-scaled benchmark shocks. |
zscore | Z-score of price vs its 20/50/200-bar averages and of recent returns, with how often and how fast past 2-sigma excursions reverted and the AR(1) half-life. |
regime | Each bar classified as bull/sideways/bear x low/normal/high volatility: the current regime, time in each, transition probabilities and forward returns by regime. |
price_actions | Inside-bar and NR7 breakouts, outside and key reversals, 3-bar reversals, 20-EMA pullbacks and 52-week-high retests: occurrences, forward returns and win rate vs baseline, and which are active now. |
patterns | Double tops/bottoms, head & shoulders, triangles, wedges and flags from zigzag swing points, with breakout levels, targets, status, and this symbol's history of what followed confirmed patterns. |
entry_exit | ATR, chandelier and swing stops, R-multiple and level targets, reward/risk, position size for your account and risk, and how often the stop or the 2R target was hit first in the past. |
trends | Regression channels (slope per year, R², position), trend age vs the 200-day average, ADX and DI, swing structure (higher highs/lows) and a daily/weekly/monthly trend table. |
intraday_vwap | Session VWAP with 1 and 2 standard-deviation bands, time above VWAP, current deviation, an anchored VWAP and the VWAP of previous sessions, on 1min or 5min bars. |
intraday_levels | Opening ranges (5/15/30 min) and breakouts, prior-day high/low/close, gap, floor pivots, round numbers and the distance to each, plus opening-range breakout follow-through over earlier sessions. |
pairs | Hedge ratio (static and rolling), spread and z-score, Engle-Granger cointegration with a MacKinnon p-value, half-life, correlation, z-band signals and a no-look-ahead backtest. |
signal_dashboard | A matrix of 13 scored signals per symbol (trend, momentum, RSI, MACD, Bollinger, stochastic, 52-week range, volume, volatility, MA cross, z-score, ADX) with a composite score, breadth and sorting. |
rank | Rank a list or universe by a weighted composite of z-scored metrics (momentum, volatility, Sharpe, drawdown, RSI, distance from high, liquidity) or your own expressions, with ranks and percentiles. |
symbol_search | Find tickers by name or prefix. Free. |
expression_help | Fields, operators and functions of the expression language. Free. |
Tool inputs are the same JSON bodies as the REST endpoints. Long calls wait for their job (up to about a minute) and return the result.
Prompts that work well
- “Is NVDA in an uptrend? Use the snapshot and explain the trend and momentum.”
- “What usually happens after SPY falls 3 days in a row? Use an event study since 2010.”
- “Screen the top 500 US stocks for oversold names above their 200-day average, then compare the top five.”
- “What is the one-day 99% VaR of a 60/40 portfolio worth \$1m?”
Results are statistics about the past, not advice. Claude may combine them with its own reasoning; the tool output is the source of the numbers.