Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

yfinance-mcp

MCP.Pizza Chef: narumiruna

yfinance-mcp is an MCP server that integrates Yahoo Finance data via the yfinance library. It provides structured access to stock information, company financials, governance data, and recent news articles. This server enables real-time retrieval of financial market data and news, supporting workflows that require up-to-date stock insights and market analysis.

Use This MCP server To

Retrieve detailed company financials and stock metrics Fetch recent news articles for specific stock symbols Search Yahoo Finance for stock quotes and related news Integrate real-time stock data into financial dashboards Automate market data retrieval for trading bots Generate financial reports with up-to-date stock info

README

Yahoo Finance MCP Server

A simple MCP server for Yahoo Finance using yfinance. This server provides a set of tools to fetch stock data, news, and other financial information.

Tools

  • get_ticker_info

    • Retrieve stock data including company info, financials, trading metrics and governance data.
    • Inputs:
      • symbol (string): The stock symbol.
  • get_ticker_news

    • Fetches recent news articles related to a specific stock symbol with title, content, and source details.
    • Inputs:
      • symbol (string): The stock symbol.
  • search

    • Fetches and organizes search results from Yahoo Finance, including stock quotes and news articles.
    • Inputs:
      • query (string): The search query (ticker symbol or company name).
      • search_type (string): Type of search results to retrieve (options: "all", "quotes", "news").
  • get_top

    • Get top entities (ETFs, mutual funds, companies, growth companies, or performing companies) in a sector.
    • Inputs:
      • sector (string): The sector to get.
      • top_type (string): Type of top companies to retrieve (options: "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.
    • Inputs:
      • 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'.

Usage

You can use this MCP server either via uv (Python package installer) or Docker.

Via uv

  1. Install uv
  2. Add the following configuration to your MCP server configuration file:
{
  "mcpServers": {
    "yfmcp": {
      "command": "uvx",
      "args": ["yfmcp@latest"]
    }
  }
}

Via Docker

Add the following configuration to your MCP server configuration file:

{
  "mcpServers": {
    "yfmcp": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "narumi/yfinance-mcp"]
    }
  }
}

yfinance-mcp FAQ

How do I query stock information using yfinance-mcp?
Use the get_ticker_info tool with the stock symbol to retrieve company and financial data.
Can yfinance-mcp provide recent news about a stock?
Yes, the get_ticker_news tool fetches recent news articles related to a given stock symbol.
What input formats does the search tool accept?
The search tool accepts a query string for ticker symbols or company names and a search_type parameter to specify the search category.
Is yfinance-mcp suitable for real-time financial data integration?
Yes, it provides near real-time stock data and news from Yahoo Finance, ideal for financial apps and analysis.
How does yfinance-mcp handle governance data?
It includes governance information as part of the get_ticker_info response, covering company leadership and structure.
Can I use yfinance-mcp to automate trading strategies?
Yes, by integrating its data retrieval tools, you can build automated trading workflows and bots.
What are the dependencies of yfinance-mcp?
It relies on the yfinance Python library to fetch and parse Yahoo Finance data.
How secure is the data access through yfinance-mcp?
It accesses publicly available Yahoo Finance data without requiring sensitive credentials, ensuring safe usage.