
Yahoo Finance
@danchev
关于 Yahoo Finance
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.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"yfinance": {
"command": "uvx",
"args": [
"mcp-server-yfinance@latest"
]
}
}
}工具
60Get analyst price targets and estimates. Args: ticker: Stock ticker symbol Returns: JSON string containing price targets
Get analyst recommendations for a stock. Args: ticker: Stock ticker symbol Returns: JSON string containing analyst recommendations
Get earnings calendar information. Args: ticker: Stock ticker symbol Returns: JSON string containing earnings calendar data
Get upcoming and past earnings dates. Args: ticker: Stock ticker symbol Returns: JSON string containing earnings dates
Get market calendar information for a stock. Args: ticker: Stock ticker symbol Returns: JSON string containing market calendar info
Get all corporate actions (dividends and splits) for a stock. Args: symbol: Stock symbol (e.g., 'AAPL', 'GOOGL') period: Time period ('1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max') Returns: Dictionary containing all corporate actions
Calculate dividend yield and related metrics. Args: symbol: Stock symbol (e.g., 'AAPL', 'GOOGL') Returns: Dictionary containing dividend yield metrics
Get dividend history for a stock. Args: symbol: Stock symbol (e.g., 'AAPL', 'GOOGL') period: Time period ('1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max') start_date: Start date in YYYY-MM-DD format (optional) end_date: End date in YYYY-MM-DD format (optional) Returns: Dictionary containing dividend data
Get stock split history. Args: symbol: Stock symbol (e.g., 'AAPL', 'GOOGL') period: Time period ('1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max') Returns: Dictionary containing stock split data
Get a proxy for crypto market sentiment using price movements. Args: crypto_symbols: List of crypto symbols to analyze (default: major cryptos) Returns: JSON string containing market sentiment proxy data
Get historical cryptocurrency data. Args: crypto_symbol: Crypto symbol with -USD suffix (e.g., 'BTC-USD') 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) Returns: JSON string containing historical crypto data
Get cryptocurrency information. Args: crypto_symbol: Crypto symbol with -USD suffix (e.g., 'BTC-USD', 'ETH-USD') Returns: JSON string containing crypto information
Get data for top cryptocurrencies by market cap. Args: count: Number of top cryptocurrencies to return (max 20) Returns: JSON string containing top crypto data
Download bulk historical data for multiple tickers efficiently. Args: tickers: List of ticker symbols 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) group_by: Group by 'ticker' or 'column' auto_adjust: Auto-adjust prices for dividends and splits prepost: Include pre and post market data threads: Use threading for faster downloads Returns: JSON string containing bulk historical data
Get currency exchange rate data. Args: base_currency: Base currency code (e.g., 'USD') target_currencies: List of target currency codes (default: major currencies) Returns: JSON string containing currency data
Get detailed exchange and trading information. Args: ticker: Stock ticker symbol Returns: JSON string containing exchange information
Get market hours and session information. Args: ticker: Stock ticker symbol Returns: JSON string containing market hours data
Get comprehensive ticker history metadata. Args: ticker: Stock ticker symbol Returns: JSON string containing history metadata
Validate a list of ticker symbols. Args: tickers: List of ticker symbols to validate Returns: JSON string containing validation results
Get balance sheet data. Args: ticker: Stock ticker symbol quarterly: If True, get quarterly data; if False, get annual data Returns: JSON string containing balance sheet data
Get cash flow statement data. Args: ticker: Stock ticker symbol quarterly: If True, get quarterly data; if False, get annual data Returns: JSON string containing cash flow data
Get key financial metrics summary. Args: ticker: Stock ticker symbol Returns: JSON string containing financial summary
Get income statement data. Args: ticker: Stock ticker symbol quarterly: If True, get quarterly data; if False, get annual data Returns: JSON string containing income statement data
Compare multiple funds side by side. Args: tickers: List of fund ticker symbols Returns: JSON string containing comparison data
Get fund top holdings. Args: ticker: Fund ticker symbol count: Number of top holdings to return Returns: JSON string containing fund holdings data
Get fund performance metrics. Args: ticker: Fund ticker symbol Returns: JSON string containing performance data
Get mutual fund or ETF profile information. Args: ticker: Fund ticker symbol Returns: JSON string containing fund profile data
Get fund sector allocation. Args: ticker: Fund ticker symbol Returns: JSON string containing sector allocation data
Get capital gains history (mainly for mutual funds). Args: ticker: Stock ticker symbol Returns: JSON string containing capital gains history
Get historical price data for a stock. Args: ticker: Stock ticker symbol 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) Returns: JSON string containing historical price data
Get intraday historical data with short intervals. Args: ticker: Stock ticker symbol period: Data period (1d,5d for intraday data) interval: Data interval (1m,2m,5m,15m,30m,60m,90m) Returns: JSON string containing intraday historical data
Get pre and post market data. Args: ticker: Stock ticker symbol period: Data period Returns: JSON string containing pre/post market data
Get a list of available markets. Returns: List of market names
Get major market indices data. Args: indices: List of index symbols (default: major US indices) Returns: JSON string containing index data
Get current market status and trading hours. Returns: JSON string containing market status information
Get current market summary information. Returns: JSON string containing market summary information
Get sector performance using sector ETFs. Returns: JSON string containing sector performance data
Get fast info (quick basic data) for a stock. Args: ticker: Stock ticker symbol Returns: JSON string containing fast info data
Get insider purchase data. Args: ticker: Stock ticker symbol Returns: JSON string containing insider purchase data
Get insider roster holders data. Args: ticker: Stock ticker symbol Returns: JSON string containing insider roster data
Get insider transaction data. Args: ticker: Stock ticker symbol Returns: JSON string containing insider transaction data
Get latest news for a stock. Args: ticker: Stock ticker symbol count: Number of news articles to return (max 50) Returns: JSON string containing news articles
Get shares outstanding data over time. Args: ticker: Stock ticker symbol start_date: Start date in YYYY-MM-DD format (optional) end_date: End date in YYYY-MM-DD format (optional) Returns: JSON string containing shares outstanding data
Get options chain data for a specific expiration date. Args: ticker: Stock ticker symbol expiration_date: Expiration date in YYYY-MM-DD format (if None, uses nearest expiration) Returns: JSON string containing options chain data
Get options filtered by moneyness (proximity to current stock price). Args: ticker: Stock ticker symbol expiration_date: Expiration date in YYYY-MM-DD format (if None, uses nearest expiration) moneyness_range: Range around current price (e.g., 0.1 for ±10%) Returns: JSON string containing filtered options data
Get available options expiration dates. Args: ticker: Stock ticker symbol Returns: JSON string containing expiration dates
Analyze and return the volatility skew for call and put options. This function retrieves the implied volatility for each strike price of both call and put options for a given stock ticker and expiration date. If no expiration date is provided, the nearest available expiration is used. The result is a JSON string containing lists of strike/implied volatility pairs for calls and puts, which can be used to visualize or analyze the volatility skew. Args: ticker: Stock ticker symbol (e.g., 'AAPL'). expiration_date: Expiration date in 'YYYY-MM-DD' format. If None, uses the nearest expiration. Returns: JSON string with two keys: - "call_skew": List of dicts with 'strike' and 'impliedVolatility' for call options. - "put_skew": List of dicts with 'strike' and 'impliedVolatility' for put options. If data is unavailable or an error occurs, returns a JSON string with an "error" key.
Get options volume and open interest analysis. Args: ticker: Stock ticker symbol expiration_date: Expiration date in YYYY-MM-DD format (if None, uses nearest expiration) Returns: JSON string containing volume analysis
Find stocks similar to the given ticker based on sector and market cap. Args: ticker: Reference stock ticker symbol count: Number of similar stocks to return Returns: JSON string containing similar stocks
Get top performing stocks over a specified period. Args: period: Time period for performance calculation (1d, 5d, 1mo, 3mo, 6mo, 1y) sector: Filter by specific sector (optional) count: Number of top performers to return Returns: JSON string containing top performing stocks
Screen stocks based on financial criteria. Args: min_market_cap: Minimum market cap in dollars max_market_cap: Maximum market cap in dollars min_pe_ratio: Minimum P/E ratio max_pe_ratio: Maximum P/E ratio min_dividend_yield: Minimum dividend yield (as decimal, e.g., 0.02 for 2%) sector: Filter by sector tickers: List of specific tickers to screen (if None, uses popular stocks) Returns: JSON string containing filtered stocks
Get company officers and key personnel information. Args: ticker: Stock ticker symbol Returns: JSON string containing company officers data
Get institutional holders information. Args: ticker: Stock ticker symbol Returns: JSON string containing institutional holders data
Get major holders breakdown. Args: ticker: Stock ticker symbol Returns: JSON string containing major holders data
Get current data for multiple stock tickers. Args: tickers: List of stock ticker symbols (e.g. ['AAPL', 'GOOGL']) period: Data period (1d,5d,1mo,3mo,6mo,1y,2y,5y,10y,ytd,max) Returns: JSON string containing data for all requested tickers
Get mutual fund holders information. Args: ticker: Stock ticker symbol Returns: JSON string containing mutual fund holders data
Get basic information about a stock. Args: ticker: Stock ticker symbol (e.g. 'AAPL') Returns: JSON string containing stock information
Calculate support and resistance levels based on historical data. Args: ticker (str): The stock ticker symbol. period (str): The historical data period (default is "6mo"). Returns: str: JSON string containing support and resistance levels.
Get technical indicators for a stock ticker. Args: ticker (str): The stock ticker symbol. period (str): The historical data period (default is "6mo"). Returns: str: JSON string containing technical indicators.
Calculate volatility metrics for a stock ticker. Args: ticker (str): The stock ticker symbol. period (str): The historical data period (default is "1y"). Returns: str: JSON string containing volatility metrics.
概览
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
FAQ from Yahoo Finance
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.
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 服务器
💹 MCP YFinance Stock Server
Adity-starReal-time stock API with Python, MCP server example, yfinance stock analysis dashboard
kospi-kosdaq-stock-server
dragon1086An MCP server that provides KOSPI/KOSDAQ stock data using FastMCP
MCP Yahoo Finance
maxscheijenA Model Context Protocol (MCP) server for Yahoo Finance.
Crypto Fear & Greed Index MCP Server
kukapayProviding real-time and historical Crypto Fear & Greed Index data
Armor Crypto MCP
armorwalletThe MCP server for interacting with Blockchain, Swaps, Strategic Planning and more.
评论