Yahoo Finance

v0.14.0
io.github.narumiruna/yfinance-mcp Checked 2 hours ago Published 3 months ago

Access Yahoo Finance stock data, news, screeners, options, financials, and charts through MCP.

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

yfinance_get_ticker_info

Retrieve comprehensive stock data including company information, financials, trading metrics and governance. Returns JSON object with fields including: - Company: symbol, longName, sector, industry, longBusinessSummary, website, city, country - Price: currentPrice, previousClose, open, dayHigh, dayLow, fiftyTwoWeekHigh, fiftyTwoWeekLow - Valuation: marketCap, enterpriseValue, trailingPE, forwardPE, priceToBook, pegRatio - Trading: volume, averageVolume, averageVolume10days, bid, ask, bidSize, askSize - Dividends: dividendRate, dividendYield, exDividendDate, payoutRatio - Financials: totalReve…

ParameterTypeDescription
symbol *stringStock ticker symbol (e.g., 'AAPL', 'GOOGL', 'MSFT')

yfinance_get_analyst_price_targets

Fetch the current price and analyst consensus price targets for a stock. Returns a JSON object with the fields supplied by Yahoo Finance: - current: Current market price - low: Lowest analyst price target - high: Highest analyst price target - mean: Mean analyst price target - median: Median analyst price target Analyst coverage and available fields vary by symbol.

ParameterTypeDescription
symbol *stringStock ticker symbol (e.g., 'AAPL', 'GOOGL', 'MSFT')

yfinance_get_analyst_estimates

Fetch consensus estimates, EPS/revenue trends, revisions, recommendations, and earnings history.

ParameterTypeDescription
symbol *stringStock ticker symbol (e.g., 'AAPL', 'GOOGL', 'MSFT')
max_rowsintegerMaximum rows per section. Use 0 to return all rows.
sectionsOptional analyst sections: recommendations, earnings_estimate, revenue_estimate, eps_trend, eps_revisions, earnings_history, and growth_estimates. Omit to return all sections.

yfinance_get_fund_data

Fetch ETF or mutual-fund composition, holdings, exposures, ratings, and operating details.

ParameterTypeDescription
symbol *stringETF or mutual fund ticker symbol (e.g., 'SPY', 'BND', 'VFIAX')
max_rowsintegerMaximum rows per tabular section. Use 0 to return all rows.
sectionsOptional fund sections: description, fund_overview, fund_operations, asset_classes, top_holdings, equity_holdings, bond_holdings, bond_ratings, and sector_weightings. Omit to return all sections.

yfinance_get_upgrades_downgrades

Fetch analyst upgrades, downgrades, initiations, and price target changes. Returns analyst actions newest first. Fields supplied by Yahoo Finance can include: - GradeDate: Date and time of the analyst action - Firm: Analyst firm name - ToGrade and FromGrade: New and previous ratings - Action: Rating action, such as upgrade, downgrade, initiation, or reiteration - priceTargetAction: Price target action, such as Raises, Lowers, or Maintains - currentPriceTarget and priorPriceTarget: New and previous price targets Available fields vary by symbol and analyst action.

ParameterTypeDescription
symbol *stringStock ticker symbol (e.g., 'AAPL', 'GOOGL', 'MSFT')
max_rowsintegerMaximum analyst actions to return, newest first. Use 0 to return all rows.

yfinance_get_ticker_news

Fetch recent news articles and press releases for a specific stock. Returns JSON array where each news item has: - id: Unique article identifier - content: Object containing: - title: Article headline - summary: Brief article summary - pubDate: Publication date (ISO 8601 format) - provider: Object with displayName (e.g., "Yahoo Finance") and url - canonicalUrl: Object with article url, site, region, lang - thumbnail: Object with image URLs and resolutions - contentType: Type of content (e.g., "STORY", "VIDEO") Use this to track company announcements, market sentim…

ParameterTypeDescription
symbol *stringStock ticker symbol (e.g., 'AAPL', 'GOOGL', 'MSFT')

yfinance_screen

Run a Yahoo Finance screener query. Supports predefined Yahoo screener keys and custom equity, mutual-fund, or ETF query trees.

ParameterTypeDescription
query *Screener query. For query_type='predefined': string key like 'day_gainers'. For query_type='equity', 'fund', or 'etf': query tree object with {operator, operands} nodes.
countRows to return for predefined queries. Yahoo maximum is 250.
offsetResult offset.
query_typestringQuery mode: 'predefined', 'equity', 'fund', or 'etf'.
sizeRows to return for custom queries. Yahoo maximum is 250.
sort_ascSort ascending if true, descending if false.
sort_fieldSort field, for example 'percentchange'.
user_idOptional Yahoo user id.
user_id_typeOptional Yahoo user id type, commonly 'guid'.

yfinance_screen_gappers

Run a custom equity screener tuned for opening-session stock gappers.

ParameterTypeDescription
min_market_capintegerMinimum intraday market cap in USD.
min_percent_changenumberMinimum percent change from prior close, for example 3.0 for +3%.
min_pricenumberMinimum current intraday price.
min_volumeintegerMinimum intraday trading volume.
offsetintegerResult offset for pagination.
regionstringYahoo screener region code, for example 'us'.
sizeintegerRows to return. Yahoo maximum is 250.
sort_ascbooleanSort by percentchange ascending if true, descending if false.

yfinance_get_top

Get top-ranked financial entities within a sector. This unified tool provides access to various rankings: - ETFs and mutual funds focused on the sector - Largest companies by market capitalization - Fastest-growing companies by revenue/earnings - Best-performing stocks by price appreciation Returns JSON data with relevant metrics for each entity type.

ParameterTypeDescription
sector *stringMarket sector (e.g., 'Technology', 'Healthcare', 'Financial Services')
top_type *stringType of entities to retrieve: 'top_etfs' (sector ETFs), 'top_mutual_funds' (sector mutual funds), 'top_companies' (largest by market cap), 'top_growth_companies' (fastest revenue/earnings growth), 'to…
top_nintegerNumber of top entities to retrieve per category/industry

yfinance_get_price_history

Fetch historical price data and optionally generate technical analysis charts. When chart_type is None, returns Markdown table with columns: - Date: Trading date (index) - Open: Opening price - High: Highest price - Low: Lowest price - Close: Closing price - Volume: Trading volume - Dividends: Dividend payments (if any) - Stock Splits: Split events (if any) When chart_type is specified, returns a chart image: - 'price_volume': Candlestick chart with volume bars - 'vwap': Price with Volume Weighted Average Price overlay - 'volume_profile': Volume distribution by price level Set prepost=True…

ParameterTypeDescription
symbol *stringStock ticker symbol (e.g., 'AAPL', 'GOOGL', 'MSFT')
chart_typeOptional visualization: 'price_volume' (candlestick chart with volume bars), 'vwap' (Volume Weighted Average Price overlay), 'volume_profile' (volume distribution by price level). Omit for tabular dat…
intervalstringData granularity: '1m'/'5m'/'15m'/'30m' (minutes), '1h' (hour), '1d'/'5d' (days), '1wk' (week), '1mo'/'3mo' (months). Short intervals require short periods (e.g., '1m' interval only works with '1d'/'5…
periodstringTime range: '1d'/'5d' (days), '1mo'/'3mo'/'6mo' (months), '1y'/'2y'/'5y'/'10y' (years), 'ytd' (year-to-date), 'max' (all available data)
prepostbooleanInclude pre-market and post-market data when available

yfinance_get_financials

Fetch financial statements (income statement, balance sheet, and cash flow) with historical data. Returns JSON with income statement, balance sheet, and cash flow data across reporting periods. Use the data to analyze trends, calculate ratios, or compare periods.

ParameterTypeDescription
symbol *stringStock ticker symbol (e.g., 'AAPL', 'GOOGL', 'MSFT')
frequencystringReporting frequency: 'annual' for yearly, 'quarterly' for quarterly, or 'ttm' for trailing twelve months

yfinance_get_option_chain

Fetch option chain data (calls and puts) for a stock with available strike prices. Returns JSON with calls and/or puts data for each expiration date. JSON fields include: - contractSymbol: Option contract identifier - strike: Strike price - lastPrice: Last traded price - bid/ask: Bid and ask prices - volume: Trading volume - openInterest: Open interest - impliedVolatility: Implied volatility (IV) - inTheMoney: Whether option is ITM - contractSize: Contract size (REGULAR) - currency: Currency (USD) Use this to analyze options pricing, IV surfaces, and strike levels.

ParameterTypeDescription
symbol *stringStock ticker symbol (e.g., 'AAPL', 'GOOGL', 'MSFT')
expiration_dateOption expiration date in YYYY-MM-DD format. Use the 'yfinance_get_option_dates' tool to find available dates, or omit to fetch all available expiration dates.
option_typestringWhich options to return: 'calls', 'puts', or 'all' (both calls and puts).

yfinance_get_option_dates

Fetch available option expiration dates for a stock. Returns JSON array of expiration dates in YYYY-MM-DD format. Use these dates with the 'yfinance_get_option_chain' tool to fetch the options chain for a specific date.

ParameterTypeDescription
symbol *stringStock ticker symbol (e.g., 'AAPL', 'GOOGL', 'MSFT')

yfinance_get_holders

Fetch major holders, institutional holders, mutual fund holders, and insider data. Returns JSON with: - major_holders: Aggregated breakdown including insider % held, institutional % held, institutional % float held, and institution count. - institutional_holders: List of institutional investors with shares held, date reported, value, and % change. - mutualfund_holders: List of mutual fund holders with same fields. - insider_transactions: Recent insider transactions including shares, value, transaction type, and date. - insider_purchases: Summary of insider buy/sell activity over the las…

ParameterTypeDescription
symbol *stringStock ticker symbol (e.g., 'AAPL', 'GOOGL', 'MSFT')
max_rowsintegerMaximum rows returned per holder section. Use 0 to return all rows.