For AI agents
Data and backtests your agent can trust
Point-in-time market data plus server-side backtests over MCP. No install — one endpoint, one key, and your agent is running its first backtest in under a minute.
https://api.finzdata.com/mcp
# streamable HTTP transport
# Authorization: Bearer <key>
Step 1
Get a key in one call
curl -X POST https://api.finzdata.com/v1/agent/keys -H 'content-type: application/json' -d '{"email":"[email protected]","agent":"my-research-agent"}'
The key is returned in the response and emailed to the owner. Every key starts with a free daily allowance of 100 data calls and 5 backtests. After that, prepaid credits: $0.001 per data call, $0.05 per backtest. Identical backtests on the same data snapshot are cached and free.
Step 2
Connect your agent
Claude Desktop / Claude Code:
{
"mcpServers": {
"finzdata": {
"url": "https://api.finzdata.com/mcp",
"headers": {"Authorization": "Bearer YOUR_KEY"}
}
}
}
Cursor:
{
"mcpServers": {
"finzdata": {
"url": "https://api.finzdata.com/mcp",
"headers": {"Authorization": "Bearer YOUR_KEY"}
}
}
}
Plain HTTP JSON-RPC (listing tools needs no key):
curl -X POST https://api.finzdata.com/mcp \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Step 3
Eleven tools, all point-in-time
Every tool takes as_of (YYYY-MM-DD): nothing after that date is ever returned.
| Tool | What it does |
|---|---|
| search_datasets | Find datasets by keyword across prices, fundamentals, macro, COT, 13F and events. |
| describe_dataset | Fields, coverage, history and update schedule for one dataset. |
| get_universe | The tradable universe on a date — point-in-time, delisted names included. |
| get_bars | OHLCV bars (daily by default) for one or many tickers, unadjusted or adjusted. |
| get_fundamentals_pit | SEC fundamentals as first reported, never restated after the fact. |
| get_macro_vintage | Macro series as published on a date, from the full vintage history. |
| get_cot | CFTC Commitments of Traders positioning by market and report type. |
| get_13f | 13F institutional holdings by manager or by stock. |
| get_events | Earnings dates, splits, dividends and insider transactions. |
| run_backtest | Run a full backtest server-side from a declarative spec. |
| compare_runs | Compare two or more backtest runs side by side. |
Step 4
Test your own idea server-side
Pass a declarative spec to run_backtest; the engine fetches point-in-time data, applies costs and returns full statistics:
{"spec":{"universe":"all","start":"2010-01-01","end":"2025-12-31","rebalance":"M","top_n":20,"costs_bps":10,"side":"long_short","blind":true,"signal":{"type":"expr","expr":"rank(ret(252)) - rank(vol(60))"}}}
Signal expressions use this formula reference:
- Windows: ret(n), logret(n), sma(n), ema(n), vol(n), rsi(n), high(n), low(n), dist_high(n), volume_avg(n), dollar_vol(n)
- Transforms: lag(x,n), rank(x), zscore(x), demean(x), abs, log, sign, clip(x,lo,hi), min, max, where(cond,a,b)
- Variables: close, open, high_px, low_px, volume, ret1
- Limits: windows up to 756 days
Why it holds up
Honest by default
Point-in-time
as_of on every call. Survivorship-free universe with delisted names, fundamentals as first reported, macro vintages as published. Your agent never sees the future.
Overfitting check
Every distinct spec your key backtests is counted. Each result includes n_trials and the deflated Sharpe ratio (Bailey & López de Prado) with a verdict: "likely real", "inconclusive" or "likely overfit".
Blind mode
"blind": true hides tickers so a language model can't lean on what it memorised about a stock's history — research shows LLM backtest alpha often comes from memorisation (arXiv:2601.13770).
Machine-readable
Discovery
- https://api.finzdata.com/.well-known/mcp.json — MCP server manifest
- https://api.finzdata.com/.well-known/agent-card.json — agent card
- https://api.finzdata.com/agents.md — this page as Markdown
- https://api.finzdata.com/openapi-agents.json — OpenAPI for the agent endpoints
- https://finzdata.com/llms.txt — site map for language models
- Python client:
pip install finzdata - Local MCP server:
pip install finzdata-mcp
FAQ
Questions agents ask
Is it real data?
Yes: survivorship-free US stocks and ETFs, SEC fundamentals, CFTC COT positioning, FRED/ALFRED macro with vintages, and 13F institutional holdings.
What does "as_of" guarantee?
That nothing published after that date is ever returned — prices, fundamentals, macro values and universes are all reconstructed as they were known on the day.
How is pricing metered?
Free daily allowance of 100 data calls and 5 backtests per key, then prepaid credits at $0.001 per data call and $0.05 per backtest. Cached reruns of an identical spec on the same data snapshot are free.
Can a human see what my agent did?
Yes. Every call is logged against the key, and the owner sees usage on the account page.
Is this investment advice?
No — historical simulation and data only. Nothing here is a recommendation to buy or sell any security.