MCP Market Data for AI Agents
MCP Market Data for AI Agents
FinzData runs its own MCP (Model Context Protocol) server, which lets AI agents retrieve historical bars, futures, GEX, macro series, and run server‑side backtests. The platform is designed for developers who want to embed market data into conversational agents or automated trading systems.
Overview
FinzData’s MCP server is hosted at https://api.finzdata.com/mcp. Authentication is available via OAuth sign‑in or a static API key. Once connected, the agent sees a set of tools that mirror the Python client. The MCP tools include search_datasets, describe_dataset, get_bars, get_futures, get_cot, get_gex, get_macro_vintage, get_fundamentals_pit, get_13f, run_backtest, survivorship_audit, get_strategy, fork_strategy, and list_strategies. Each time‑series tool accepts an as_of parameter in the format YYYY‑MM‑DD to pin a historical snapshot and returns snapshot identifiers that can be cited in documentation or reports.
Connecting Your Agent
In Claude, navigate to Settings > Connectors > Add custom connector and paste the MCP URL. In other MCP clients, add the URL as a remote server. Once the connector is added, the agent can issue prompts such as Backtest monthly top‑10 12‑month momentum over the top 500 US stocks since 2005 or Show SPX gamma flip and call wall for the last 20 sessions. The model picks the right tools and calls them; the backtest runs on our server.
Using the Python Client
The FinzData Python client mirrors the MCP API and is available as import finzdata as yf. Developers can use yf.download to pull historical bars, yf.gex for gamma exposure, and yf.Client() for more advanced calls such as macro or fundamentals. The client automatically handles authentication via an API key stored in the environment or passed directly. The same data that is available through MCP can be accessed programmatically, allowing for batch processing or integration into existing data pipelines.
Available Tools
- Bars and Futures: Retrieve daily or minute bars for any ticker, and futures contracts back to 2007.
- GEX: Point‑in‑time dealer gamma, gamma flip, call and put walls, and ATM IV for over 11,000 tickers since 2010.
- Macro: Access 18,000+ macro series with every vintage, including CPI, PCE, and employment data.
- Fundamentals: SEC filings, 13F holdings, and point-in-time fundamentals for any ticker.
- Backtesting: Run server‑side backtests with a JSON spec and receive a deflated Sharpe ratio.
Pricing and Limits
A free key provides 1,000 data calls and 5 backtests per day. After that, prepaid credits cover calls at $0.001 each and backtests $0.05 each. The full catalog of pricing is listed in the free account page and the shop. For example, 5 years of the whole US market (16,000+ stocks including delisted names) is $195, and 5 years of daily GEX for one ticker is $19. The MCP server also supports point‑in‑time snapshots, which are useful for reproducible research.
Advanced Features
Beyond basic data retrieval, the MCP server offers advanced capabilities such as snapshot identifiers for time‑series data, survivorship audits to evaluate strategy robustness, and a strategy hub that hosts reusable strategy definitions. Users can fork existing strategies, list them, and run backtests directly from the MCP interface. The strategy hub provides a catalog of community‑shared strategies that can be imported into a local Python environment or executed on the server.
Python example
import finzdata as yf
# Download daily bars for SPY and QQQ from 2000‑01‑01
prices = yf.download(['SPY', 'QQQ'], start='2000-01-01')
print(prices.head())
# Retrieve GEX for SPX from 2024‑01‑01
gex = yf.gex('SPX', start='2024-01-01')
print(gex.tail())
# Get macro CPI as of 2021‑03‑31
c = yf.Client()
macro = c.macro('CPIAUCSL', as_of='2021-03-31')
print(macro)
Start free
Sign up for a free account at https://api.finzdata.com/ to receive a free API key. The key grants access to the first 1,000 data calls and 5 backtests per day. For additional usage, visit the shop to buy prepaid credits or one-time data.
Frequently asked questions
What data is included in the free tier?
The free tier includes the last 12 months of daily US stock bars, COT, SEC fundamentals as filed, US macro with vintages, 13F holdings, the last 30 days of futures, and daily GEX.
How do I authenticate with the MCP server?
Authentication can be done via OAuth sign‑in or by providing a static API key in the request header. The key is issued when you create a free account.
Can I run backtests on my own strategy?
Yes. Use the run_backtest endpoint with a JSON spec that describes the strategy, data sources, and parameters. The server returns a deflated Sharpe ratio.
Is there a limit to the number of agents I can connect?
The MCP server supports multiple agents per account. Each backtest counts toward the daily limit of five server‑side backtests.
How does MCP compare to Databento?
As of October 2026, Databento offers tick‑level data and order‑book feeds, while FinzData’s MCP focuses on bar‑level research, GEX, macro, and fundamentals. For more on Databento pricing, see https://databento.com/pricing.