The Yahoo Finance MCP server acts as a digital bridge between AI models and the world of finance, allowing an assistant to look up real-time stock prices, read company news, and find information about various businesses just like a human would on the web. By connecting an LLM to this server, users can ask questions about the stock market and receive accurate, up-to-date answers based on live financial data. Beyond simple price checks, the server offers a robust suite of tools for deeper financial analysis. It can retrieve comprehensive company profiles, including detailed financial statements, trading metrics, and governance data. It also enables more complex queries, such as fetching historical price trends over custom intervals—ranging from minute-by-minute data to multi-year histories—and identifying top-performing assets like ETFs or mutual funds within specific market sectors. For developers building AI-driven financial advisors or research agents, this tool is particularly valuable because it structures complex market data into a format that LLMs can easily process. It supports seamless deployment via Python’s `uv` package manager or Docker, making it easy to plug into existing AI workflows. By providing a standardized interface for financial data, it enables AI models to perform sophisticated multi-step reasoning, such as comparing historical growth patterns against recent news sentiment, without the need for manual data entry or fragile web scraping.
Category: Finance, Crypto & Payments
Tags: finance, investing, market data, stocks, trading
uv is installed on your system. 2. Use the uvx command as specified in the configuration section. * Via Docker: 1. Ensure Docker is installed and running on your system. 2. The server uses the narumi/yfinance-mcp image. ---claude_desktop_config.json for Claude Desktop):json { "mcpServers": { "yfmcp": { "command": "uvx", "args": ["yfmcp@latest"] } } }json { "mcpServers": { "yfmcp": { "command": "docker", "args": ["run", "-i", "--rm", "narumi/yfinance-mcp"] } } } ---symbol (string): The stock symbol. * get_ticker_news: Fetches recent news articles related to a specific stock symbol with title, content, and source details. * symbol (string): The stock symbol. * search: Fetches and organizes search results from Yahoo Finance, including stock quotes and news articles. * query (string): The search query (ticker symbol or company name). * search_type (string): Type of search results to retrieve ("all", "quotes", "news"). * get_top: Get top entities (ETFs, mutual funds, companies, etc.) in a sector. * sector (string): The sector to get. * top_type (string): Type of top companies to retrieve ("top_etfs", "top_mutual_funds", "top_companies", "top_growth_companies", "top_performing_companies"). * top_n (number, optional): Number of top entities to retrieve (default 10). * get_price_history: Fetch historical price data for a given stock symbol over a specified period and interval. * symbol (string): The stock symbol. * period (string, optional): Time period to retrieve data for (e.g., '1d', '1mo', '1y'). Default is '1mo'. * interval (string, optional): Data interval frequency (e.g., '1d', '1h', '1m'). Default is '1d'. ---E ratios, revenue) and recent news headlines before making a "Buy" or "Sell" decision. Solution: This MCP allows an AI assistant to instantly aggregate a comprehensive "Snapshot" of a company. By combining get_ticker_info and get_ticker_news, the AI can present a balanced view of a stock's financial health alongside the current market sentiment. Example: A user asks, "Is NVDA a good buy right now?" The AI uses get_ticker_info to check its valuation metrics and get_ticker_news to see if there are any recent regulatory hurdles or product launches, then provides a summarized report.
get_top tool, users can quickly discover the highest-performing entities or top growth companies in any sector. This serves as a powerful discovery tool for finding new investment opportunities that aren't yet mainstream. Example: A user asks, "Show me the top 5 growth companies in the Healthcare sector." The AI calls get_top(sector="healthcare", top_type="top_growth_companies", top_n=5) and presents the list with brief descriptions of each company's focus.get_price_history tool allows the AI to fetch raw historical data over specific intervals (daily, hourly, etc.). The AI can then process this data to calculate percentage growth, identify "all-time highs," or spot periods of high volatility. Example: A user asks, "How did Tesla (TSLA) perform during the last quarter compared to its 1-year average?" The AI retrieves 3 months and 12 months of price history using get_price_history, calculates the performance metrics, and explains the trend.search and get_ticker_news tools allow for targeted discovery. By querying specific terms, the AI can find relevant tickers and then immediately pull the most recent,…Part of MCP Servers
The Yahoo Finance MCP server is an open-source bridge connecting Model Context Protocol clients like Claude Desktop to market data from Yahoo Finance. Using the yfinance package, it enables assistants to fetch ticker metrics, analyst targets, news, financial statements, and technical charts.
You can run the server directly using uvx with the package yfmcp@latest, or run the Docker image narumi/yfinance-mcp. Both configurations can be registered under the mcpServers key in your MCP client settings file, such as claude_desktop_config.json.
The server provides tools including yfinance_get_ticker_info, yfinance_get_analyst_price_targets, yfinance_get_analyst_estimates, yfinance_get_upgrades_downgrades, yfinance_get_ticker_news, yfinance_search, yfinance_get_top, yfinance_screen, yfinance_screen_gappers, yfinance_get_price_history, and yfinance_get_financials.
Yes. When calling the price history tool, you can specify chart types such as price_volume, vwap, or volume_profile. The server renders the chart and returns a base64-encoded WebP image that compatible AI assistants can render in conversation.
Yes, the Yahoo Finance MCP server is open source and distributed under the MIT license. You can review the source code, open issues, and contribute on its official GitHub repository at narumiruna/yfinance-mcp.