Access Yahoo Finance stock data, news, screeners, options, financials, and charts through MCP.
The MCP server provides access to Yahoo Finance data via Model Context Protocol. It exposes stock data and related services including news, screeners, options, financials, and charts.
๐ ๏ธ Key Features
Yahoo Finance stock data access via MCP
News retrieval
Stock screeners
Options data
Financials
Charts
๐ Use Cases
Pull Yahoo Finance news alongside stock data
Use screeners to identify stocks by Yahoo Finance criteria
Explore options and financial statements for analysis
Retrieve chart data for visualization or reporting
โก Developer Benefits
MCP integration for standardized tool access
Topics aligned with finance and MCP server usage
โ ๏ธ Limitations
Server scope is limited to Yahoo Finance content (stock data, news, screeners, options, financials, charts) as described
A Model Context Protocol (MCP) server that provides AI assistants with access to Yahoo Finance data via yfinance. Query stock information, financial news, sector rankings, and generate professional financial charts โ all from your AI chat.
Returns: JSON object with income statement, balance sheet, and cash flow data for each reporting period.
Income Statement fields: EBIT, Net Income, Tax Provision, Pretax Income, Interest Expense, Total Revenue, Operating Income, EBITDA, Normalized Income
Balance Sheet fields: Stockholders Equity, Total Debt, Cash And Cash Equivalents, Invested Capital, Net Debt, Total Assets, Total Liabilities Net Minority Interest, Net Tangible Assets, Tangible Book Value
Cash Flow fields: Operating Cash Flow, Free Cash Flow, Capital Expenditure, Net Income From Continuing Operations, Depreciation And Amortization, Change In Working Capital, Cash Dividends Paid
yfinance_get_holders
Fetch major holders, institutional holders, mutual fund holders, and insider data.
Parameter
Type
Required
Description
symbol
string
Yes
Stock ticker symbol (e.g. AAPL, MSFT)
max_rows
number
No
Maximum rows returned per holder section. Default: 10. Use 0 to return all rows
Returns: JSON object with:
major_holders โ Aggregated breakdown where each row has an index label (e.g. insidersPercentHeld, institutionsPercentHeld, institutionsFloatPercentHeld, institutionsCount) and a Value
institutional_holders โ Institutional investors; records typically include fields such as Date Reported, Holder, Shares, Value, pctChange, pctHeld
mutualfund_holders โ Mutual fund holders; records typically include fields similar to institutional holders
insider_transactions โ Recent insider trades; records typically include fields such as Shares, Value, Insider, Position, Transaction, Start Date, Ownership
insider_purchases โ Six-month summary where each row describes a category (Purchases, Sales, Net Shares, etc.); records typically include fields such as Insider Purchases Last 6m, Shares, Trans
insider_roster โ Known insiders; records typically include fields such as Name, Position, Shares Owned Directly, Most Recent Transaction, Latest Transaction Date
_metadata โ Row limit metadata with max_rows and per-section total_rows, returned_rows, and truncated
Holder sections are limited to 10 rows by default to keep responses concise. Pass max_rows: 0 when you need the complete holder datasets. Field names for holder-related datasets are provided by yfinance and may vary by ticker, data availability, and yfinance version.
yfinance_get_option_dates
Fetch available option expiration dates for a stock.
Parameter
Type
Required
Description
symbol
string
Yes
Stock ticker symbol (e.g. AAPL, MSFT)
Returns: JSON array of expiration dates in YYYY-MM-DD format.
yfinance_get_option_chain
Fetch option chain data (calls and puts) for a stock with available strike prices.
Parameter
Type
Required
Description
symbol
string
Yes
Stock ticker symbol
expiration_date
string
No
Option expiration date in YYYY-MM-DD format. Omit to fetch all dates.
option_type
string
No
"calls", "puts", or "all" (default: "all")
Returns: JSON object keyed by expiration date, with calls and/or puts data including:
Replace /path/to/yfinance-mcp with the actual path to your cloned repository.
Testing with Codex CLI
This repository includes .codex/config.toml, which registers the local yfmcp MCP server for Codex CLI using uv run yfmcp. After cloning the repository and running uv sync, open Codex CLI from the repository root and try prompts such as:
text
Show VOO ticker info
Show VOO price history for the last 5 days
Find the ticker symbol for Toyota
Get AAPL option expiration dates