Yahoo Finance unofficial MCP Server

by barvhaim

258 downloads
Not rated
GitHub

About

This server enables AI agents to access real-time stock market data, historical prices, financial statements, and market analysis.

Details

Author
barvhaim
Downloads
258
Categories
Finance

- 10 comprehensive financial tools for market data access
- Real-time stock information with prices and key metrics
- Historical data analysis with flexible periods and intervals
- Financial statements (income, balance sheet, cash flow)
- Earnings data (annual and quarterly)
- Dividend and split history
- News and analyst recommendations
- Stock search and multi-quote support
- Robust error handling with structured JSON responses
- FastMCP framework with async support

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Yahoo Finance unofficial MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Invoke the server via an MCP client. It exposes 10 tools that accept stock ticker symbols and optional parameters, returning structured JSON data.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "yahoo finance unofficial mcp server": {
            "yfinance": {
                "command": "uv",
                "args": [
                    "--directory",
                    "/path/to/yfinance-mcp-server",
                    "run",
                    "main.py"
                ]
            }
        }
    }
}

McpServers

{
    "yfinance": {
        "command": "uv",
        "args": [
            "--directory",
            "/path/to/yfinance-mcp-server",
            "run",
            "main.py"
        ]
    }
}

YFinance MCP Server

A comprehensive Model Context Protocol (MCP) server that provides financial data through Yahoo Finance API integration. This server enables AI agents to access real-time stock market data, historical prices, financial statements, and market analysis.

image

Features

- 10 Comprehensive Financial Tools for complete market data access
- Real-time Stock Information including prices, market cap, and key metrics
- Historical Data Analysis with flexible time periods and intervals
- Financial Statements (income statement, balance sheet, cash flow)
- Earnings Data (annual and quarterly)
- Dividend and Split History
- News and Analyst Recommendations
- Stock Search and Multi-quote Support
- Robust Error Handling with structured JSON responses
- FastMCP Framework with async support for high performance

Available Tools

1. get_stock_info

Get comprehensive stock information including current price, market cap, and financial metrics.

Parameters:
- symbol (str): Stock ticker symbol (e.g., 'AAPL', 'GOOGL')

Returns: Stock information including price, market cap, P/E ratio, dividend yield, 52-week range, volume, beta, and company details.

2. get_historical_data

Retrieve historical stock price data with flexible time periods and intervals.

Parameters:
- symbol (str): Stock ticker symbol
- period (str): Time period (1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max)
- interval (str): Data interval (1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo)

Returns: Historical OHLCV data with dates and volume information.

3. get_dividends

Get dividend payment history for a stock.

Parameters:
- symbol (str): Stock ticker symbol

Returns: List of dividend payments with dates and amounts.

4. get_splits

Retrieve stock split history.

Parameters:
- symbol (str): Stock ticker symbol

Returns: List of stock splits with dates and split ratios.

5. get_financials

Get comprehensive financial statements.

Parameters:
- symbol (str): Stock ticker symbol
- quarterly (bool): Get quarterly data if True, annual if False

Returns: Income statement, balance sheet, and cash flow statement data.

6. get_earnings

Retrieve earnings data for analysis.

Parameters:
- symbol (str): Stock ticker symbol

Returns: Annual and quarterly earnings data.

7. get_news

Get recent news articles related to a stock.

Parameters:
- symbol (str): Stock ticker symbol
- count (int): Number of articles to return (default: 10)

Returns: List of news articles with titles, links, publishers, and timestamps.

8. get_recommendations

Get analyst recommendations and ratings.

Parameters:
- symbol (str): Stock ticker symbol

Returns: List of analyst recommendations with firms, ratings, and actions.

9. search_stocks

Search for stocks by company name or ticker symbol.

Parameters:
- query (str): Search query (company name or ticker)
- limit (int): Maximum results to return (default: 10)

Returns: List of matching stocks with symbols, names, and exchange information.

10. get_multiple_quotes

Get current quotes for multiple stocks simultaneously.

Parameters:
- symbols (List[str]): List of stock ticker symbols

Returns: Dictionary of stock quotes with current prices, changes, and basic metrics.

Available Tools

1. get_stock_info

Get comprehensive stock information including current price, market cap, and financial metrics.

Parameters:
- symbol (str): Stock ticker symbol (e.g., 'AAPL', 'GOOGL')

Returns: Stock information including price, market cap, P/E ratio, dividend yield, 52-week range, volume, beta, and company details.

2. get_historical_data

Retrieve historical stock price data with flexible time periods and intervals.

Parameters:
- symbol (str): Stock ticker symbol
- period (str): Time period (1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max)
- interval (str): Data interval (1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo)

Returns: Historical OHLCV data with dates and volume information.

3. get_dividends

Get dividend payment history for a stock.

Parameters:
- symbol (str): Stock ticker symbol

Returns: List of dividend payments with dates and amounts.

4. get_splits

Retrieve stock split history.

Parameters:
- symbol (str): Stock ticker symbol

Returns: List of stock splits with dates and split ratios.

5. get_financials

Get comprehensive financial statements.

Parameters:
- symbol (str): Stock ticker symbol
- quarterly (bool): Get quarterly data if True, annual if False

Returns: Income statement, balance sheet, and cash flow statement data.

6. get_earnings

Retrieve earnings data for analysis.

Parameters:
- symbol (str): Stock ticker symbol

Returns: Annual and quarterly earnings data.

7. get_news

Get recent news articles related to a stock.

Parameters:
- symbol (str): Stock ticker symbol
- count (int): Number of articles to return (default: 10)

Returns: List of news articles with titles, links, publishers, and timestamps.

8. get_recommendations

Get analyst recommendations and ratings.

Parameters:
- symbol (str): Stock ticker symbol

Returns: List of analyst recommendations with firms, ratings, and actions.

9. search_stocks

Search for stocks by company name or ticker symbol.

Parameters:
- query (str): Search query (company name or ticker)
- limit (int): Maximum results to return (default: 10)

Returns: List of matching stocks with symbols, names, and exchange information.

10. get_multiple_quotes

Get current quotes for multiple stocks simultaneously.

Parameters:
- symbols (List[str]): List of stock ticker symbols

Returns: Dictionary of stock quotes with current prices, changes, and basic metrics.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.