MCP.so
登录

Yahoo Finance MCP Server

@danchev

基本信息

分类

金融与商务

传输方式

stdio

作者

danchev

提交者

Dobri Danchev

关于 Yahoo Finance MCP Server

A Model Context Protocol (MCP) server for agentic retrieval of financial data from Yahoo Finance. This server leverages YFinance to provide a simple and efficient way to access historical stock prices, dividends, stock splits, company information, and other financial metrics.

Yahoo Finance MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "yfinance": {
      "command": "uvx",
      "args": [
        "mcp-server-yfinance@latest"
      ]
    }
  }
}

Yahoo Finance MCP Server 工具

127

Retrieve analyst recommendations for a given ticker. Args: ticker (str): The symbol of the security. Returns: Any: Analyst recommendations data from the repository.

Retrieve earnings estimates for a given ticker. Args: ticker (str): The symbol of the security. Returns: Any: Earnings estimates data from the repository.

Retrieve EPS (Earnings Per Share) trends for a given ticker. Args: ticker (str): The symbol of the security. Returns: Any: EPS trends data from the repository.

Retrieve a full analysis report for a given ticker, aggregating all available analysis data. Args: ticker (str): The symbol of the security. Returns: FullAnalysis: All analysis data for the ticker.

Retrieve growth estimates for a given ticker. Args: ticker (str): The symbol of the security. Returns: Any: Growth estimates data from the repository.

Retrieve price targets for a given ticker. Args: ticker (str): The symbol of the security. Returns: Any: Price targets data from the repository.

Retrieve changes in analyst recommendations for a given ticker. Args: ticker (str): The symbol of the security. Returns: Any: Recommendation changes data from the repository.

Retrieve revenue estimates for a given ticker. Args: ticker (str): The symbol of the security. Returns: Any: Revenue estimates data from the repository.

Retrieve current prices for major agricultural grains (Wheat, Corn, Soybeans, Coffee, Sugar).

Retrieve historical price timeseries for a physical commodity or future.

Retrieve the latest price quote for a physical commodity or futures contract.

Retrieve current prices for benchmark energy commodities (WTI Crude, Brent, Natural Gas, Gasoline, Heating Oil).

Retrieve Green Markets North American Fertilizer Price Index timeseries. Benchmark weekly index published by Green Markets / Bloomberg / Dow Jones tracking raw agricultural input costs. Returns: FertilizerIndexSeries with latest price index and historical observations.

Retrieve current snapshot prices for livestock commodities (Live Cattle, Feeder Cattle, Lean Hogs).

Retrieve current prices for precious and industrial metals (Gold, Silver, Copper, Platinum, Palladium).

Retrieve current snapshot prices for soft commodities (Coffee, Sugar, Cocoa, Cotton).

Retrieve a proxy value for the crypto fear and greed index. Args: tickers (list[str] | None, optional): List of crypto tickers to include. If None, uses a default set. Returns: CryptoSentiment: Sentiment proxy and supporting per-asset data.

Retrieve historical price data for a cryptocurrency. Args: ticker (str): The symbol of the cryptocurrency. period (str, optional): Time period for history. Valid periods: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max. Defaults to '1y'. interval (str, optional): Data interval. Valid intervals: 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo. Defaults to '1d'. Returns: list[CryptoHistory]: List of historical data points.

Retrieve fast information for a specific cryptocurrency. Args: ticker (str): The symbol of the cryptocurrency (e.g., 'BTC'). Returns: CryptoFastInfo: Fast info data for the given ticker.

Retrieve quotes for the configured major-cryptocurrency watchlist. Args: count (int, optional): Number of top cryptocurrencies to fetch. Defaults to 10. Returns: list[CryptoFastInfo]: List of top cryptocurrencies.

Retrieve the balance sheet for a given ticker. Args: ticker (str): The symbol of the security. Returns: list[BalanceSheetEntry]: List of balance sheet entries.

Retrieve curated essential financial performance and solvency snapshot (15 metrics). Optimized for LLM reasoning to avoid context window bloat. Args: ticker (str): The symbol of the security. Returns: CuratedFinancialSummary: Core financial metrics for fundamental analysis.

Retrieve EPS (Earnings Per Share) history for a given ticker. Args: ticker (str): The symbol of the security. Returns: list[EPSHistoryEntry]: List of EPS history entries.

Retrieve the financial calendar for a given ticker. Args: ticker (str): The symbol of the security. Returns: FinancialCalendar: Financial calendar data.

Retrieve a full set of financial data for a given ticker, aggregating all available financial statements and records. Args: ticker (str): The symbol of the security. Returns: FullFinancials: All financial data for the ticker.

Retrieve the income statement for a given ticker. Args: ticker (str): The symbol of the security. Returns: list[IncomeStatementEntry]: List of income statement entries.

Retrieve SEC filings for a given ticker. Args: ticker (str): The symbol of the security. Returns: list[SecFilingRecord]: List of SEC filing records.

Retrieve the trailing twelve months (TTM) cash flow statement for a given ticker. Args: ticker (str): The symbol of the security. Returns: list[TTMCashFlowStatementEntry]: List of TTM cash flow statement entries.

Retrieve the trailing twelve months (TTM) income statement for a given ticker. Args: ticker (str): The symbol of the security. Returns: list[TTMIncomeStatementEntry]: List of TTM income statement entries.

Retrieve benchmark 10-year sovereign bond yields across major global economies. Compares benchmark 10-year government bond yields for the United States, Germany (Bund), United Kingdom (Gilt), and Japan (JGB), including calculated spreads against the US 10-Year Treasury. Returns: Snapshot of global 10-year sovereign benchmark yields and yield differentials.

Retrieve the complete US Treasury yield curve snapshot across all benchmark maturities (1M to 30Y). Includes calculated 2Y/10Y and 3M/10Y basis point spreads and yield curve inversion status.

Retrieve historical yield timeseries for a specific Treasury or sovereign benchmark maturity.

Fetch current US Dollar Index (DXY) quote. The US Dollar Index measures the value of the US dollar relative to a basket of major foreign currencies. Returns: Current DXY index quote.

Fetch historical timeseries exchange rate bars for a currency pair. Args: pair: Currency pair symbol (e.g. ``EURUSD``, ``USDJPY``). timeframe: Timespan duration (e.g. ``D7``, ``P1M``, ``P3M``, ``P1Y``, ``P5Y``, ``all``). step: Bar step frequency (e.g. ``P1D``, ``PT1M``). Returns: Historical OHLC exchange rate bars.

Fetch current or latest foreign exchange quote for a currency pair. Args: pair: Currency pair symbol (e.g. ``EURUSD``, ``USDJPY``, ``GBPUSD``, ``AUDUSD``, ``USDCAD``, ``USDCHF``). Returns: Real-time or latest exchange rate with timestamp and currency breakdown.

Fetch real-time snapshot quotes for all major global currency pairs. Covers EUR/USD, USD/JPY, GBP/USD, AUD/USD, USD/CAD, USD/CHF, USD/CNY, USD/MXN, and USD/INR. Returns: List of major currency pair quotes.

Retrieve asset class holdings for a specific fund. Args: ticker (str): The symbol of the fund. Returns: FundAssetClassHolding | None: Asset class holdings data or None if unavailable.

Retrieve the bond holdings for a specific fund. Args: ticker (str): The symbol of the fund. Returns: list[FundBondHolding]: List of bond holdings in the fund.

Retrieve the equity holdings for a specific fund. Args: ticker (str): The symbol of the fund. Returns: list[FundEquityHolding]: List of equity holdings in the fund.

Retrieve general information for a specific fund. Args: ticker (str): The symbol of the fund. Returns: FundInfo: Information about the fund.

Retrieve operations data for a specific fund. Args: ticker (str): The symbol of the fund. Returns: FundOperations | None: Operations data or None if unavailable.

Retrieve an overview for a specific fund. Args: ticker (str): The symbol of the fund. Returns: FundOverview | None: Overview data or None if unavailable.

Retrieve sector weighting data for a specific fund. Args: ticker (str): The symbol of the fund. Returns: FundSectorWeighting | None: Sector weighting data or None if unavailable.

Retrieve the top holdings for a specific fund. Args: ticker (str): The symbol of the fund. Returns: list[FundTopHolding]: List of top holdings in the fund.

Retrieve a full set of holdings data for a given ticker, aggregating all available holdings information. Args: ticker (str): The symbol of the security. Returns: FullHoldings: All holdings data for the ticker.

Retrieve insider purchases for a given ticker. Args: ticker (str): The symbol of the security. Returns: list[InsiderPurchase]: Insider purchase activity.

Retrieve the insider roster for a given ticker. Args: ticker (str): The symbol of the security. Returns: list[InsiderRosterHolder]: Insiders and their holdings.

Retrieve institutional holdings for a given ticker. Args: ticker (str): The symbol of the security. Returns: Any: Institutional holdings data from the repository.

Retrieve major holders for a given ticker. Args: ticker (str): The symbol of the security. Returns: Any: Major holders data from the repository.

Retrieve mutual fund holdings for a given ticker. Args: ticker (str): The symbol of the security. Returns: Any: Mutual fund holdings data from the repository.

Retrieve US Consumer Price Index (CPI) and Core CPI with year-over-year inflation rates. Args: limit: Number of recent monthly observations to include (default 24). Returns: InflationSummary containing Headline CPI, Core CPI, and YoY percentage inflation.

Retrieve US labor market telemetry including Civilian Unemployment Rate and Nonfarm Payrolls. Args: limit: Number of recent monthly observations to include (default 24). Returns: EmploymentSummary with unemployment rate %, total payrolls, and monthly net job creation.

Retrieve St. Louis Fed Financial Stress Index and ICE BofA US High Yield OAS credit spreads. Args: limit: Number of recent observations to include (default 30). Returns: FinancialStressSummary containing stress index level, market condition interpretation, and high-yield spreads.

Retrieve US Real GDP and Nominal GDP output levels with quarter-over-quarter annualized growth rates. Args: limit: Number of recent quarterly observations to include (default 20). Returns: GDPSummary with Real GDP, Nominal GDP, and annualized real economic growth rate.

Retrieve 5-Year and 10-Year market-implied Breakeven Inflation Rates from TIPS. Args: limit: Number of recent daily observations to include (default 30). Returns: InflationExpectationsSummary with 5Y and 10Y breakeven inflation rates (%).

Retrieve benchmark US money market and monetary policy interest rates (EFFR and SOFR). Args: limit: Number of recent daily observations to include (default 30). Returns: InterestRatesSummary with Effective Federal Funds Rate (EFFR) and SOFR rates.

Query historical observations and metadata for any valid Federal Reserve Economic Data (FRED) series identifier. Examples: 'MORTGAGE30US' (30-Year Fixed Mortgage Rate), 'UMCSENT' (Consumer Sentiment), 'INDPRO' (Industrial Production). Args: series_id: Valid FRED series identifier (e.g. 'CPIAUCSL', 'MORTGAGE30US', 'INDPRO'). limit: Number of recent observations to return (default 50, 0 for all available). Returns: MacroeconomicSeries with series title, units, frequency, latest release, and data points.

Retrieve US M2 Money Supply and Federal Reserve Balance Sheet (Total Assets) liquidity telemetry. Args: limit: Number of recent observations to include (default 24). Returns: LiquiditySummary containing M2 Money Supply ($B), M2 YoY growth, and Fed Balance Sheet ($M).

Retrieve US Core Personal Consumption Expenditures (PCE) Price Index (Fed's primary inflation target). Args: limit: Number of recent monthly observations to include (default 24). Returns: PCESummary containing latest Core PCE level, YoY inflation rate, and Fed 2% target reference.

Retrieve real-time snapshot of major global equity benchmark indices. Includes US (S&P 500, Dow Jones, Nasdaq, Russell 2000), Europe (DAX 40, FTSE 100, CAC 40, Euro Stoxx 50), and Asia (Nikkei 225, Hang Seng) alongside CBOE VIX. Returns: GlobalMarketSnapshot with all international benchmark quotes.

Retrieve the current status of major market indices. Returns: dict: Market indices status data.

Retrieve a summary of the overall market performance. Returns: dict: Market summary data.

Retrieve real-time quote for the CBOE Volatility Index (VIX / Wall Street Fear Gauge). Returns: GlobalIndexQuote with latest VIX index value and date.

Retrieve call options for a given ticker and expiration date. Args: ticker (str): The symbol of the security. expiration (date | None, optional): The expiration date. If None, uses the nearest expiration. Returns: list[CallOption] | None: List of call options or None if unavailable.

Retrieve the option contract chain for a given ticker and expiration date. Args: ticker (str): The symbol of the security. expiration (date | None, optional): The expiration date. If None, uses the nearest expiration. Returns: OptionContractChain: The option contract chain data.

Retrieve available option expiration dates for a given ticker. Args: ticker (str): The symbol of the security. Returns: list[OptionExpirationDate]: List of available expiration dates.

Retrieve options filtered by moneyness for a given ticker and expiration date. Args: ticker (str): The symbol of the security. expiration_date (str | None, optional): The expiration date as a string. If None, uses the nearest expiration. moneyness_range (float, optional): The moneyness range for filtering. Defaults to 0.1. Returns: dict: Options data filtered by moneyness.

Retrieve options skew analysis for a given ticker and expiration date. Args: ticker (str): The symbol of the security. expiration_date (str | None, optional): The expiration date as a string. If None, uses the nearest expiration. Returns: dict: Options skew analysis data.

Retrieve options volume analysis for a given ticker and expiration date. Args: ticker (str): The symbol of the security. expiration_date (str | None, optional): The expiration date as a string. If None, uses the nearest expiration. Returns: dict: Volume analysis data.

Retrieve put options for a given ticker and expiration date. Args: ticker (str): The symbol of the security. expiration (date | None, optional): The expiration date. If None, uses the nearest expiration. Returns: list[PutOption] | None: List of put options or None if unavailable.

Execute Relative Strength Index (RSI) Mean-Reversion strategy backtest. Enters long when RSI drops below oversold threshold; exits to cash when RSI reaches overbought threshold. Evaluates trade win rate, profit factor, max drawdown, and equity progression. Args: ticker: Asset ticker. rsi_window: RSI calculation window in days. oversold_threshold: RSI buy trigger level. overbought_threshold: RSI sell trigger level. period: Backtest timespan. initial_capital: Starting capital in USD. slippage_bps: Slippage charged per entry or exit, in basis points. Returns: BacktestResult with performance metrics and closed trades.

Execute Moving Average Crossover (Golden Cross / Death Cross) rule-based strategy backtest. Enters long position when fast MA crosses above slow MA; exits to cash when fast MA crosses below slow MA. Calculates cumulative return, CAGR, benchmark buy & hold comparison, win rate, profit factor, and equity curve. Args: ticker: Asset ticker. fast_window: Fast SMA period in days. slow_window: Slow SMA period in days. period: Backtest timespan. initial_capital: Starting capital in USD. slippage_bps: Slippage charged per entry or exit, in basis points. Returns: BacktestResult with complete trade log and performance statistics.

Calculate pairwise correlation matrix and annualized covariance matrix across a basket of assets. Evaluates diversification benefits and cross-asset correlations (-1.0 to +1.0) across equities, ETFs, crypto, commodities, and fixed income. Args: tickers: Asset symbols to compare. period: Lookback timespan. Returns: CorrelationMatrixResult with correlation and covariance matrices.

Calculate historical underwater drawdown curve and maximum peak-to-trough decline series. Evaluates historical capital drawdown depths and recovery timelines from previous peaks. Args: tickers: Portfolio asset tickers. weights: Portfolio weights. period: Lookback duration. Returns: DrawdownSeriesResult with underwater percentage drawdown points.

Calculate multi-factor linear regression exposures against benchmark macro market drivers. Regresses asset returns against Market (SPY), Tech Growth (QQQ), Small-Cap (IWM), Treasuries (TLT), and Gold (GLD) to estimate systematic factor loadings, Jensen's Alpha, and R-squared. Args: ticker: Asset ticker. period: Lookback timespan. Returns: FactorExposuresResult with estimated factor betas and model statistics.

Calculate Markowitz numerical Minimum Variance portfolio allocation weights. Solves for long-only asset weights that minimize overall portfolio variance using the empirical covariance matrix. Args: tickers: Asset symbols. period: Lookback duration for covariance estimation. Returns: PortfolioAllocationResult with minimum variance asset weights.

Calculate comprehensive quantitative risk and performance metrics for a multi-asset portfolio. Computes Annualized Return, Annualized Volatility, Sharpe Ratio, Sortino Ratio, Calmar Ratio, Max Drawdown, 1-Day Historical Value-at-Risk (VaR 95% & 99%), Expected Shortfall (CVaR 95% & 99%), Beta, and Jensen's Alpha against a benchmark. Assumes frictionless daily rebalancing to the supplied target weights, using the assets' common price history. Args: tickers: Asset ticker symbols. weights: Portfolio weights. benchmark: Benchmark symbol. period: Lookback duration. risk_free_rate: Risk-free rate. Returns: PortfolioRiskMetrics object with risk-adjusted performance breakdown.

Calculate equal-risk-contribution risk parity allocation weights. Allocates capital inversely proportional to historical volatility so each asset reports each asset's actual covariance-based contribution to portfolio risk. Args: tickers: Asset symbols to allocate. period: Historical volatility lookback duration. Returns: PortfolioAllocationResult with recommended percentage weights.

Calculate historical rolling window Beta sensitivity series against a benchmark. Reveals how an asset's market correlation and systematic risk exposure have evolved over time. Args: ticker: Asset symbol. benchmark: Benchmark symbol. window: Rolling window length in days. period: Lookback duration. Returns: RollingBetaSeries with chronological rolling beta values.

Run a predefined screener query to discover matching equities, ETFs or mutual funds - for example the current day's top gainers, the most actively traded stocks, or top-performing ETFs. Args: query (str): Name of a predefined screen. One of: aggressive_small_caps, bond_etfs, conservative_foreign_funds, day_gainers, day_losers, growth_technology_stocks, high_yield_bond, most_actives, most_shorted_stocks, portfolio_anchors, small_cap_gainers, solid_large_growth_funds, solid_midcap_growth_funds, technology_etfs, top_etfs_us, top_mutual_funds, top_performing_etfs, undervalued_growth_stocks, undervalued_large_caps. count (int, optional): Maximum number of results to return. Defaults to 25. Must be positive; Yahoo caps this at 250. offset (int, optional): Number of results to skip, for pagination. Defaults to 0. Must be non-negative. Returns: ScreenerResult: Matching instruments and the total match count. Raises: ValueError: If query is unknown, or count/offset is out of range.

Retrieve annual Form 10-K regulatory filings with direct document links. Annual reports filed with the SEC containing audited balance sheets, income statements, MD&A discussion, and comprehensive risk factor disclosures. Args: ticker: Stock ticker symbol. limit: Number of annual 10-K filings to retrieve. Returns: List of Form 10-K filing items with direct SEC document URLs.

Retrieve quarterly Form 10-Q regulatory filings with direct document links. Quarterly reports filed with the SEC containing unaudited financial statements and ongoing quarterly operations review. Args: ticker: Stock ticker symbol. limit: Number of quarterly 10-Q filings to retrieve. Returns: List of Form 10-Q filing items with direct SEC document URLs.

Retrieve Form 8-K unscheduled material corporate event announcements. Covers major corporate events including quarterly earnings press releases, executive appointments/departures, M&A transactions, debt financings, and material agreements. Args: ticker: Stock ticker symbol. limit: Number of Form 8-K filings to retrieve. Returns: List of Form 8-K material event filings with direct SEC document URLs.

Search the official SEC registered company directory by ticker or company name. Resolves ticker symbols and company titles to their official 10-digit Central Index Key (CIK). Args: query: Ticker or company title search string. limit: Maximum number of matches to return. Returns: List of SECCIKLookupResult matches.

Retrieve official SEC corporate registrant profile and metadata. Includes 10-digit CIK, Standard Industrial Classification (SIC) code, business/mailing address, fiscal year end, and state of incorporation directly from SEC EDGAR. Args: ticker: Stock ticker symbol or CIK. Returns: SECCompanyProfile with regulatory corporate metadata.

Retrieve Form 4 insider ownership changes and transaction filings. Filed by corporate officers, directors, and 10%+ beneficial owners reporting open-market stock purchases, sales, option exercises, and restricted stock grants. Args: ticker: Stock ticker symbol. limit: Number of Form 4 filings to retrieve. Returns: List of Form 4 insider filings with direct SEC document URLs.

Retrieve recent regulatory filings submitted to the SEC by a company. Provides direct SEC EDGAR document URLs, acceptance dates, accession numbers, and XBRL flags. Args: ticker: Stock ticker symbol. form_type: Optional filter by SEC Form (e.g. '10-K', '10-Q', '8-K', '4'). limit: Maximum number of filing records to return. Returns: List of SECFilingItem objects with direct HTTPS document URLs.

Retrieve catalog summary of all interactive US-GAAP XBRL financial disclosure concepts for an entity. Provides a count and sample of available standard US-GAAP accounting tags filed in the registrant's XBRL facts. Args: ticker: Stock ticker symbol. Returns: SECXBRLCompanyFactsSummary with taxonomy metrics overview.

Retrieve historical timeseries for a specific US-GAAP XBRL accounting concept directly from SEC filings. Extracts exact financial values, units, fiscal years, and fiscal periods filed in official 10-K and 10-Q reports. Args: ticker: Stock ticker symbol. concept: US-GAAP tag or alias ('REVENUES', 'NET_INCOME', 'GROSS_PROFIT', 'ASSETS', 'CASH', 'EPS'). limit: Maximum historical observation periods to return. Returns: SECXBRLConceptTimeseries with historical reported values.

Retrieve a list of all industries, optionally filtered by sector. Backed by a static local mapping rather than a region-scoped upstream call, so this tool takes no region parameter. Args: sector (str | None): The name of the sector to filter by, or None to retrieve all industries. Returns: list[str]: A list of all industries, or industries in the specified sector.

Retrieve an overview of a specific industry. Args: industry (str): The name of the industry. region (str): ISO 3166-1 alpha-2 country code. Defaults to 'US'. Accepted for a consistent signature; has no observable effect on this endpoint upstream. Returns: IndustryOverview: An overview of the specified industry.

Retrieve a list of top companies within a specific industry. Args: industry (str): The name of the industry. region (str): ISO 3166-1 alpha-2 country code scoping the returned companies to that region's exchange. Defaults to 'US'. Returns: list[IndustryTopCompaniesEntry]: A list of top companies in the industry.

Retrieve a list of top growth companies within a specific industry. Args: industry (str): The name of the industry. region (str): ISO 3166-1 alpha-2 country code scoping the returned companies to that region's exchange. Defaults to 'US'. Returns: list[IndustryTopGrowthCompaniesEntry]: A list of top growth companies in the industry.

Retrieve a list of top performing companies within a specific industry. Args: industry (str): The name of the industry. region (str): ISO 3166-1 alpha-2 country code scoping the returned companies to that region's exchange. Defaults to 'US'. Returns: list[IndustryTopPerformingCompaniesEntry]: A list of top growth companies in the industry.

Retrieve a list of industries within a specific sector. Backed by a static local mapping rather than a region-scoped upstream call, so this tool takes no region parameter. Args: sector (str): The name of the sector. Returns: list[str]: A list of industries in the sector.

Retrieve overview information for a specific sector. Args: sector (str): The name of the sector. region (str): ISO 3166-1 alpha-2 country code. Defaults to 'US'. Accepted for a consistent signature; has no observable effect on this endpoint upstream (overview data does not vary by region). Returns: SectorOverview: Overview data for the sector.

Retrieve overview information for a specific sector based on a stock ticker. Args: ticker (str): The stock ticker symbol. region (str): ISO 3166-1 alpha-2 country code. Defaults to 'US'. Accepted for a consistent signature; has no observable effect on this endpoint upstream (overview data does not vary by region). Returns: SectorOverview: Overview data for the sector associated with the ticker.

Retrieve a list of research reports within a specific sector. Args: sector (str): The name of the sector. region (str): ISO 3166-1 alpha-2 country code. Defaults to 'US'. Accepted for a consistent signature; has no observable effect on this endpoint upstream. Returns: list[IndustryResearchReportEntry]: A list of research reports in the sector.

Retrieve a list of top companies within a specific sector. Args: sector (str): The name of the sector. region (str): ISO 3166-1 alpha-2 country code scoping the returned companies to that region's exchange. Defaults to 'US'. Returns: list[SectorTopCompaniesEntry]: A list of top companies in the sector.

Retrieve a list of top companies within a specific sector based on a stock ticker. Args: ticker (str): The stock ticker symbol. region (str): ISO 3166-1 alpha-2 country code scoping the returned companies to that region's exchange. Defaults to 'US'. Returns: list[SectorTopCompaniesEntry]: A list of top companies in the sector associated with the ticker.

Retrieve a list of top ETFs within a specific sector. Args: sector (str): The name of the sector. region (str): ISO 3166-1 alpha-2 country code. Defaults to 'US'. Any non-US region returns an empty list upstream rather than region-specific ETFs. Returns: list[SectorTopETFsEntry]: A list of top ETFs in the sector.

Retrieve a list of top mutual funds within a specific sector. Args: sector (str): The name of the sector. region (str): ISO 3166-1 alpha-2 country code. Defaults to 'US'. Any non-US region returns an empty list upstream rather than region-specific funds. Returns: list[SectorTopMutualFundsEntry]: A list of top mutual funds in the sector.

Retrieve corporate actions for a stock. Args: ticker (str): The symbol of the stock. Returns: list[CorporateActions]: List of corporate action records.

Retrieve curated stock fundamental overview (33 essential metrics). Optimized for LLM reasoning to avoid context window bloat. Args: ticker (str): The symbol of the stock. Returns: StockInfo_v2: Curated stock information.

Retrieve a summary of dividend data for a stock. Args: ticker (str): The symbol of the stock. Returns: dict: Dividend summary data.

Retrieve dividend history for a stock. Args: ticker (str): The symbol of the stock. Returns: list[StockDividends]: List of dividend records.

Retrieve the financial summary plus valuation and share-count metrics. A superset of get_financial_summary, adding market cap, enterprise value, share counts, book value and price-to-book. Args: ticker (str): The symbol of the stock. Returns: ExtendedFinancialSummary: Financial summary with valuation metrics.

Retrieve fast info for a specific stock ticker. Args: ticker (str): The symbol of the stock. Returns: StockFastInfo: Fast info data for the given ticker.

Retrieve profitability, liquidity and cash-flow metrics for a stock. Covers revenue, margins, cash flow, debt and return ratios. Use get_extended_financial_summary instead when valuation or share-count metrics are also needed. Args: ticker (str): The symbol of the stock. Returns: FinancialSummary: Profitability, liquidity and cash-flow metrics.

Retrieve historical price data for a stock. Args: ticker (str): The symbol of the stock. period (str, optional): Valid periods: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max. Defaults to '1y'. interval (str, optional): Valid intervals: 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo. Defaults to '1d'. Returns: list[StockHistory]: List of historical data points.

Retrieve detailed info for a specific stock ticker. Args: ticker (str): The symbol of the stock. fields (list[str], optional): Specific field names to return (e.g. ['marketCap', 'trailingPE']). If omitted, returns the complete StockInfo model. Returns: StockInfo | dict: Detailed info data or pruned dictionary of requested fields.

Retrieve news items for a stock. Args: ticker (str): The symbol of the stock. Returns: list[NewsItem]: List of news items.

Retrieve price target data for a stock. Args: ticker (str): The symbol of the stock. Returns: dict: Price target data.

Retrieve quick technical indicators for a stock. Args: ticker (str): The symbol of the stock. Returns: dict: Technical indicators data.

Retrieve risk metrics for a stock. Args: ticker (str): The symbol of the stock. Returns: dict: Risk metrics data.

Retrieve stock split history for a stock. Args: ticker (str): The symbol of the stock. Returns: list[StockSplit]: List of stock split records.

Retrieve historical valuation ratios (P/E, P/S, P/B, EV/EBITDA, PEG, market cap, enterprise value) for a stock, one entry per period. Unlike get_financial_summary or get_extended_financial_summary, which are a current snapshot, this returns a short history so trend can be seen across recent quarters or years. Args: ticker (str): The symbol of the stock. freq (str, optional): Period-column grouping: 'quarterly', 'monthly', 'yearly' or 'trailing'. Defaults to 'quarterly'. periods (int | None, optional): Number of period columns to return, newest first. None returns all available history; 0 returns only the current value. Defaults to 5. Returns: list[ValuationMeasuresEntry]: Valuation ratios per period, newest first. Empty for instruments valuation measures do not apply to (e.g. cryptocurrencies).

Retrieve server-side computed Bollinger Bands (upper, middle, lower, bandwidth) from WSJ Michelangelo. Calculated natively on the WSJ charting servers, minimizing client compute overhead. Args: ticker: Stock symbol (e.g. 'TSLA', 'NVDA'). window: Moving average calculation window (default 20). multiplier: Standard deviation multiplier (default 2.0). timeframe: Timespan duration (e.g. 'P1M', 'P3M', 'P1Y'). step: Bar step frequency (e.g. 'P1D', 'PT1M'). Returns: WSJBollingerBandsSeries containing timestamped price, lower band, middle band, upper band, and bandwidth %.

Retrieve high-resolution intraday continuous tick bars (including pre-market and after-hours) from WSJ. Args: ticker: Stock symbol (e.g. 'TSLA', 'AAPL'). timeframe: Intraday duration: 'D1' (today), 'D5' (past 5 days), 'D7' (past 7 days). step: Bar frequency: 'PT1M' (1-minute bars), 'PT5M' (5-minute bars), 'PT15M' (15-minute bars). Returns: WSJStockHistory containing continuous 1-minute intraday bars with volume.

Retrieve historical price bars (OHLCV) for a stock directly from WSJ Michelangelo. Args: ticker: Stock symbol (e.g. 'TSLA', 'AAPL', 'NVDA', 'MSFT'). timeframe: Timespan duration: 'D7' (7 days), '1mo', 'P3M', 'P1Y', '5y', 'all'. step: Bar frequency: 'P1D' (daily), 'PT1M' (1-minute intraday), 'PT5M' (5-minute). Returns: WSJStockHistory with ordered historical OHLCV price bars.

Retrieve support and resistance levels for a given ticker and period. Args: ticker (str): The symbol of the security. period (str, optional): Time period for levels (e.g., '6mo'). Defaults to '6mo'. Returns: SupportResistanceLevelsDict: Support and resistance levels data.

Retrieve technical indicators for a given ticker and period. Args: ticker (str): The symbol of the security. period (str, optional): Time period for indicators (e.g., '6mo'). Defaults to '6mo'. Returns: TechnicalIndicatorsDict: Technical indicators data.

Retrieve volatility metrics for a given ticker and period. Args: ticker (str): The symbol of the security. period (str, optional): Time period for metrics (e.g., '1y'). Defaults to '1y'. Returns: VolatilityMetricsDict: Volatility metrics data.

Retrieve server-side computed Exponential Moving Average (EMA) from WSJ Michelangelo. Args: ticker: Symbol (e.g. 'NVDA', 'MSFT'). window: Moving average calculation window period (default 20). timeframe: Timespan duration (e.g. 'P1M', 'P3M', 'P1Y'). step: Bar step frequency (e.g. 'P1D', 'PT1M'). Returns: WSJIndicatorSeries with timestamped price and computed EMA values.

Retrieve server-side computed Moving Average Convergence Divergence (MACD) from WSJ. Calculates MACD line, signal line, and MACD histogram natively on WSJ charting servers. Args: ticker: Symbol (e.g. 'TSLA', 'AAPL'). fast_window: Fast EMA period (default 12). slow_window: Slow EMA period (default 26). signal_window: Signal line EMA period (default 9). timeframe: Timespan duration (e.g. 'P1M', 'P3M', 'P1Y'). step: Bar step frequency (e.g. 'P1D', 'PT1M'). Returns: WSJMACDSeries containing timestamped price, MACD line, signal line, and histogram.

Retrieve server-side computed Relative Strength Index (RSI) momentum indicator from WSJ. Args: ticker: Symbol (e.g. 'TSLA', 'AAPL'). window: RSI calculation period (default 14). timeframe: Timespan duration (e.g. 'P1M', 'P3M', 'P1Y'). step: Bar step frequency (e.g. 'P1D', 'PT1M'). Returns: WSJIndicatorSeries with timestamped price and RSI values (0-100).

Retrieve server-side computed Simple Moving Average (SMA) from WSJ Michelangelo. Calculated directly on WSJ charting servers, providing ultra-low-latency moving averages. Args: ticker: Symbol (e.g. 'AAPL', 'TSLA', 'SPX'). window: Moving average calculation window period (default 50). timeframe: Timespan duration (e.g. 'P1M', 'P3M', 'P1Y', '5y'). step: Bar step frequency (e.g. 'P1D', 'PT1M'). Returns: WSJIndicatorSeries with timestamped price and computed SMA values.

概览

What is Yahoo Finance?

Yahoo Finance is a Model Context Protocol (MCP) server for agentic retrieval of financial data from Yahoo Finance. It leverages the YFinance library to provide structured access to historical stock prices, dividends, splits, company information, analyst recommendations, and other metrics, and is designed for use with LLM applications like Claude Desktop and Cursor.

How to use Yahoo Finance?

Install the server via uvx mcp-server-yfinance@latest. Configure it in your MCP client (e.g., Claude Desktop or VS Code) by adding the appropriate JSON block to the client’s configuration file. Once connected, invoke any of the available tools—such as get_stock_info, get_historical_data, or get_recommendations—by ticker symbol.

Key features of Yahoo Finance

  • Retrieve basic stock information (price, market cap, sector)
  • Fetch historical price data with customizable periods and intervals
  • Access analyst recommendations, price targets, and upgrades/downgrades
  • Download dividend and stock split history for tickers
  • Screen stocks by market cap, P/E, dividend yield, and sector
  • Get technical indicators, volatility metrics, and support/resistance levels

Use cases of Yahoo Finance

  • Building financial analysis chatbots or AI assistants for investment research
  • Automating stock screening and filtering based on custom criteria
  • Tracking portfolio performance and historical data across multiple tickers
  • Supporting market‑aware decision‑making with real‑time sector and index data

常见问题

1

How do I install Yahoo Finance MCP server?

Use the command `uvx mcp-server-yfinance@latest` in your terminal. Then configure the server in your MCP client (e.g., Claude Desktop or VS Code) by adding the provided JSON block to the client’s settings.

2

Does Yahoo Finance require an API key or authentication?

No. The server uses the YFinance library, which accesses publicly available Yahoo Finance data without requiring an API key or credentials

评论

金融与商务 分类下的更多 MCP 服务器