StockFlow MCP Server
Hosts the StockFlow MCP server code repository, allowing users to clone and access the implementation.
Provides a Python-based interface for retrieving and analyzing stock market data, supporting programmatic access to stock information, historical price data, and options analysis.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@StockFlow MCP Server show me Apple's current stock price and options chain"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
StockFlow MCP
A typed FastMCP server for stock metadata, price history, technical indicators, financial statements, calendars, and option chains through yfinance. It supports local stdio and containerized Streamable HTTP transports.
Tools
get_stock_data_v2(symbol, include_financials=False, include_analysis=False, include_calendar=False)get_historical_data_v2(symbol, period, interval='1d', prepost=False)get_options_chain_v2(symbol, expiration_date=None, include_greeks=False)
Historical downloads explicitly use unadjusted prices, repair enabled, timezone retention, a timeout, and a flat single-symbol index. Rows retain timestamps and omit the separately adjusted-close column. Volatility is annualized for every requested interval, uses 252/5 for five-day bars, and scales intraday periods for extended-hours sessions. RSI uses the canonical Wilder simple-average seed followed by recursive smoothing, with defined zero-gain/loss behavior. When requested, option Greeks are theoretical European Black-Scholes estimates per share (theta per day; vega/rho per one percentage point); risk-free-rate metadata identifies the configured fallback.
uv sync --locked
uv run python stockflow.pyThe server uses stdio. Yahoo Finance is an unofficial personal-use source and may be delayed, incomplete, rate-limited, missing fields, or structurally changed. Dividends and American-style early exercise are not modeled in Greeks. Results are not investment advice or guaranteed real-time data.
Related MCP server: MCP Yahoo Finance
Docker / Streamable HTTP
The container runs as an unprivileged user, installs the locked production dependencies, and serves MCP at http://127.0.0.1:8000/mcp. Start it with:
docker compose up --build -d
Invoke-RestMethod http://127.0.0.1:8000/healthConnect a Streamable HTTP-capable MCP client to http://127.0.0.1:8000/mcp. To avoid a port collision when running multiple servers, set MCP_HOST_PORT before starting Compose, for example $env:MCP_HOST_PORT=8003. Stop and remove the container with docker compose down.
The Compose mapping intentionally binds to localhost. The endpoint has no authentication or TLS and must not be exposed to an untrusted network without a properly configured reverse proxy and access control.
Binding to loopback alone does not make the endpoint private: a browser can still reach it through DNS rebinding, so the server validates Host and Origin headers before a request reaches an MCP session. Requests carrying a foreign Host are answered with 421 Misdirected Request and those carrying a foreign Origin with 403 Forbidden, while same-origin loopback traffic and non-browser clients that send no Origin are unaffected.
Variable | Default | Purpose |
|
|
|
|
| Interface the HTTP server binds. |
|
| Port inside the container. |
|
| Streamable HTTP endpoint path. |
|
| Host port Compose publishes on |
|
|
|
| unset | Comma-separated extra hostnames permitted in |
| unset | Comma-separated extra browser origins permitted in |
Put the reverse-proxy hostname in MCP_ALLOWED_HOSTS when fronting the container, otherwise the guard rejects the proxied Host. Running uv run python stockflow.py remains the stdio-compatible default outside Docker.
Run validation with uv lock --check, uv run ruff check ., uv run mypy ., uv run pytest, uv build, and uv run python scripts/verify_wheel.py. CI also builds the container and performs health plus MCP tool-discovery checks over Streamable HTTP. Domain/provider branch coverage is gated at 90%. Set YFINANCE_LIVE=1 to opt into live shape smoke tests.
Available Tools
3 toolsget_historical_data_v2C
Get unadjusted/repaired price history and technical indicators.
Inputs: period (required), symbol (required), prepost, interval. Returns: data, success, provider, warnings, +1 more
get_options_chain_v2B
Get an option chain and optionally add theoretical European Black-Scholes Greeks.
Inputs: symbol (required), include_greeks, expiration_date. Returns: data, success, provider, warnings, +1 more
get_stock_data_v2B
Get stock metadata and optional statements, analysis and calendar data.
Inputs: symbol (required), include_analysis, include_calendar, include_financials. Returns: data, success, provider, warnings, +1 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool targets a clearly distinct data domain: metadata/statements, historical prices/indicators, and options chains. There is no functional overlap between the three tools, so an agent can reliably select the correct one.
All tool names follow the exact same get_<resource>_v2 pattern, with consistent snake_case and a uniform version suffix. This makes the naming scheme highly predictable and easy to navigate.
Three tools is a modest but reasonable scope for a focused stock data server. The count is on the lower end, but each tool covers a substantial area, so it does not feel overly thin.
The main investment data workflows—current company data, historical prices, and options—are all covered. Minor gaps such as ticker search or news endpoints exist, but they are not critical dead ends for typical stock analysis use cases.
Maintenance
Related MCP Connectors
Financial data MCP server for Claude, ChatGPT, Cursor and Codex. Real-time stock quotes, financial statements, options flow, SEC filings, insider trades, 13F holdings, macro data and market news from gloom.sh, the open-source Bloomberg Terminal alternative.
A Model Context Protocol server exposing real-time and historical Colombo Stock Exchange (CSE) data to AI agents and LLM applications. Provides quotes and OHLCV price history, full financial statements (income, balance sheet, cash flow), pre-computed technicals (moving averages, RS ratings, volume signals), macroeconomic indicators, corporate actions, and rule-based screening across CSE stocks and sector indices, everything needed to build CSE-aware trading assistants, research tools, and market-analysis agents. This is the official MCP server of www.ceyloncharts.com
Yahoo Finance for AI agents: quotes, price history, options with Greeks, financials, news, movers.
Real-time Yahoo Finance stock/crypto quotes & options, Google Trends, News & Reddit/HN sentiment.
Related MCP Servers
- AlicenseBqualityCmaintenanceA Model Context Protocol server that enables LLMs to analyze options chains, calculate Greeks, and evaluate basic options strategies through Yahoo Finance data.141MIT
- AlicenseBqualityBmaintenanceA Model Context Protocol server that enables interaction with Yahoo Finance to retrieve stock pricing, company information, and historical financial data through natural language queries.2129MIT
- AlicenseCqualityNot gradedmaintenanceA Model Context Protocol server that provides tools for interacting with Yahoo Finance, allowing users to retrieve stock prices, company information, and perform financial data comparisons.11MIT
- AlicenseCqualityDmaintenanceA Model Context Protocol server providing comprehensive financial data from Yahoo Finance, allowing users to retrieve detailed stock information, financial statements, options data, and market news.34MIT
Appeared in Searches
- Real-Time Stock Options Data for All NASDAQ Stocks
- Yahoo Finance MCP (Model Context Protocol) Server
- A server for exploring business analysis, market research, and idea validation techniques
- A guide to investing in managed funds and equities
- A platform for live probability option trading with indicators across multiple markets