yfinance-mcp

v0.1.2
yfinance-mcp Checked 1 day ago Published 10 months ago

MCP Server for Yahoo Finance API - AI-friendly financial data tools

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_ticker_info

Get basic information about a stock/ETF/fund. Args: symbol: Ticker symbol (e.g., AAPL, MSFT, 600519.SS for Chinese stocks) fast: If True, return only fast-loading key metrics; if False, return full info Returns: Dictionary containing company info such as name, sector, industry, market cap, PE ratio, etc.

ParameterTypeDescription
symbol *string
fastboolean

get_price_history

Get historical price data for a stock. Args: symbol: Ticker symbol (e.g., AAPL, MSFT) period: Data period - 1d,5d,1mo,3mo,6mo,1y,2y,5y,10y,ytd,max interval: Data interval - 1m,2m,5m,15m,30m,60m,90m,1h,1d,5d,1wk,1mo,3mo start: Start date in YYYY-MM-DD format (overrides period) end: End date in YYYY-MM-DD format include_actions: Include dividends and stock splits in the data Returns: Historical OHLCV (Open, High, Low, Close, Volume) data

ParameterTypeDescription
symbol *string
end
include_actionsboolean
intervalstring
periodstring
start

get_financials

Get financial statements for a company. Args: symbol: Ticker symbol (e.g., AAPL, MSFT) statement: Type of financial statement - income: Income statement (revenue, expenses, net income) - balance: Balance sheet (assets, liabilities, equity) - cashflow: Cash flow statement (operating, investing, financing) period: Time period - yearly: Annual financial statements - quarterly: Quarterly financial statements - ttm: Trailing twelve months (not availabl…

ParameterTypeDescription
symbol *string
periodstring
statementstring

get_holders

Get shareholder information for a stock. Args: symbol: Ticker symbol (e.g., AAPL, MSFT) holder_type: Type of holders to retrieve - major: Major holders (% breakdown) - institutional: Institutional holders (hedge funds, etc.) - mutualfund: Mutual fund holders - insider_purchases: Recent insider purchase activity - insider_transactions: All insider transactions - insider_roster: List of insiders with their holdings Returns:…

ParameterTypeDescription
symbol *string
holder_typestring

get_earnings

Get earnings data for a stock. Args: symbol: Ticker symbol (e.g., AAPL, MSFT) period: Time period - yearly or quarterly include_dates: If True, include upcoming/past earnings dates Returns: Earnings data including revenue, earnings, and optional earnings dates

ParameterTypeDescription
symbol *string
include_datesboolean
periodstring

get_analyst_data

Get analyst-related data for a stock. Args: symbol: Ticker symbol (e.g., AAPL, MSFT) data_type: Type of analyst data to retrieve - recommendations: Buy/Hold/Sell recommendations summary - price_targets: Target price from analysts (current, low, high, mean) - estimates: Earnings and revenue estimates - eps_trend: EPS trend over different periods - growth: Growth estimates (stock vs industry/sector) - upgrades_downgrades: Recent rating changes…

ParameterTypeDescription
symbol *string
data_typestring

get_options

Get options chain data for a stock. Args: symbol: Ticker symbol (e.g., AAPL, MSFT) expiration_date: Options expiration date (YYYY-MM-DD format). If not provided, returns list of available expiration dates. Returns: If expiration_date provided: calls and puts options data If not provided: list of available expiration dates

ParameterTypeDescription
symbol *string
expiration_date

get_dividends_splits

Get dividend and stock split history. Args: symbol: Ticker symbol (e.g., AAPL, MSFT) data_type: Type of data to retrieve - dividends: Historical dividend payments - splits: Historical stock splits - capital_gains: Capital gains distributions (for funds) - actions: Combined dividends and splits Returns: Historical data for the selected type

ParameterTypeDescription
symbol *string
data_typestring

get_sustainability

Get ESG (Environmental, Social, Governance) sustainability data. Args: symbol: Ticker symbol (e.g., AAPL, MSFT) Returns: ESG scores and sustainability metrics including environment score, social score, governance score, and controversy level

ParameterTypeDescription
symbol *string

get_ticker_calendar

Get calendar events, news, or SEC filings for a stock. Args: symbol: Ticker symbol (e.g., AAPL, MSFT) data_type: Type of data to retrieve - calendar: Upcoming events (earnings, dividends, splits) - news: Recent news articles - sec_filings: SEC filing documents Returns: Calendar events, news articles, or SEC filings

ParameterTypeDescription
symbol *string
data_typestring

download

Download historical price data for multiple stocks at once. This is more efficient than calling get_price_history multiple times when you need data for many stocks. Args: symbols: List of ticker symbols (e.g., ["AAPL", "MSFT", "GOOGL"]) period: Data period - 1d,5d,1mo,3mo,6mo,1y,2y,5y,10y,ytd,max interval: Data interval - 1m,2m,5m,15m,30m,60m,90m,1h,1d,5d,1wk,1mo,3mo start: Start date in YYYY-MM-DD format (overrides period) end: End date in YYYY-MM-DD format group_by: How to group…

ParameterTypeDescription
symbols *array
end
group_bystring
intervalstring
periodstring
start

get_tickers_info

Get basic information for multiple stocks at once. Args: symbols: List of ticker symbols (e.g., ["AAPL", "MSFT", "GOOGL"]) Returns: Dictionary with symbol as key and info dict as value

ParameterTypeDescription
symbols *array

lookup

Look up financial instruments by type. This is more specific than search() as it filters by instrument type. Args: query: Search query (company name or ticker symbol) instrument_type: Type of financial instrument to search for - all: All types - stock: Stocks/equities - etf: Exchange-traded funds - mutualfund: Mutual funds - index: Market indices - future: Futures contracts - currency: Forex currencies - crypto…

ParameterTypeDescription
query *string
countinteger
instrument_typestring

get_market_calendar

Get market calendar events (earnings, IPOs, economic events, splits). Args: calendar_type: Type of calendar to retrieve - earnings: Upcoming earnings announcements - ipo: Upcoming IPO dates - economic: Economic events (FOMC, jobs report, etc.) - splits: Stock split dates start: Start date in YYYY-MM-DD format (default: today) end: End date in YYYY-MM-DD format (default: 7 days from start) limit: Maximum number of results (default 25) Returns:…

ParameterTypeDescription
calendar_typestring
end
limitinteger
start

screen_stocks

Screen stocks using predefined filters. Args: query_type: Predefined screening query - most_actives: Most actively traded stocks today - day_gainers: Biggest gainers today - day_losers: Biggest losers today - undervalued_growth: Undervalued stocks with growth potential - aggressive_small_caps: Small cap growth stocks - growth_tech: Technology growth stocks - undervalued_large_caps: Undervalued large cap stocks - most_shorted_stocks: Most h…

ParameterTypeDescription
countinteger
query_typestring

get_sector_data

Get data for a market sector. Args: sector_key: Sector identifier (e.g., "technology", "healthcare", "financial-services", "consumer-cyclical", "industrials", "communication-services", "consumer-defensive", "energy", "basic-materials", "real-estate", "utilities") data_type: Type of data to retrieve - industries: List of industries in this sector - top_etfs: Top ETFs for this sector - top_funds: Top mutual funds for this sector Return…

ParameterTypeDescription
sector_key *string
data_typestring

get_industry_data

Get data for a specific industry. Args: industry_key: Industry identifier (e.g., "software-infrastructure", "semiconductors", "internet-retail", "banks-regional") data_type: Type of data to retrieve - top_companies: Top companies in this industry - top_etfs: Top ETFs for this industry - top_funds: Top mutual funds for this industry Returns: Industry data based on the selected type

ParameterTypeDescription
industry_key *string
data_typestring