Yahoo Finance MCP Server

Provides access to real-time stock prices, financial statements, and news.

README.md

Yahoo Finance MCP Server

A Model Context Protocol (MCP) server that provides access to Yahoo Finance data. This server enables AI assistants to fetch real-time stock prices, financial statements, news, options data, and more through a standardized interface.

PIP: https://pypi.org/project/yahoo-finance-mcp-server/

Features

  • Historical Stock Prices: Get historical price data with customizable periods and intervals
  • Stock Information: Access comprehensive stock data including financials, metrics, and company info
  • Financial Statements: Retrieve income statements, balance sheets, and cash flow statements
  • News: Fetch latest news articles for any ticker
  • Options Data: Get option chains, expiration dates, and options analytics
  • Holder Information: Access institutional, mutual fund, and insider holder data
  • Analyst Recommendations: Get analyst ratings, upgrades, and downgrades
  • Corporate Actions: Track dividends and stock splits

Installation

Using uvx (Recommended)

The easiest way to use this MCP server is with uvx, which runs it directly without installation:

uvx yahoo-finance-mcp-server

Using uv

Install the package using uv:

uv pip install yahoo-finance-mcp-server

Using pip

pip install yahoo-finance-mcp-server

From Source

git clone https://github.com/laxmimerit/yahoo-finance-mcp-server.git
cd yahoo-finance-mcp-server
uv pip install -e .

Configuration

Claude Desktop Configuration

Add this to your Claude Desktop configuration file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

Using uvx (Recommended):
{
  "mcpServers": {
    "yahoo-finance": {
      "command": "uvx",
      "args": ["yahoo-finance-mcp-server"]
    }
  }
}
Using uv:
{
  "mcpServers": {
    "yahoo-finance": {
      "command": "uv",
      "args": ["run", "yahoo-finance-mcp-server"]
    }
  }
}
Using Python directly:
{
  "mcpServers": {
    "yahoo-finance": {
      "command": "python",
      "args": ["-m", "yahoo_finance_mcp_server.server"]
    }
  }
}

Other MCP Clients

For other MCP clients that support stdio transport, you can run:

yahoo-finance-mcp-server

Or with uvx:

uvx yahoo-finance-mcp-server

Available Tools

1. get_historical_stock_prices

Get historical stock prices for a ticker symbol.

Parameters:

  • ticker (str): Stock ticker symbol (e.g., "AAPL")
  • period (str, optional): Valid periods: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max. Default: "1mo"
  • interval (str, optional): Valid intervals: 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo. Default: "1d"

Example:

Get historical prices for Apple stock over the last year

2. get_stock_info

Get comprehensive stock information including price, company details, financial metrics, and more.

Parameters:

  • ticker (str): Stock ticker symbol (e.g., "TSLA")

Example:

Get detailed information about Tesla stock

3. get_yahoo_finance_news

Get latest news articles for a ticker symbol.

Parameters:

  • ticker (str): Stock ticker symbol (e.g., "GOOGL")

Example:

Get recent news about Google

4. get_stock_actions

Get dividend and stock split history.

Parameters:

  • ticker (str): Stock ticker symbol (e.g., "MSFT")

Example:

Get dividend history for Microsoft

5. get_financial_statement

Get financial statements (income statement, balance sheet, or cash flow).

Parameters:

  • ticker (str): Stock ticker symbol (e.g., "AMZN")
  • financial_type (str): One of: income_stmt, quarterly_income_stmt, balance_sheet, quarterly_balance_sheet, cashflow, quarterly_cashflow

Example:

Get Amazon's quarterly income statement

6. get_holder_info

Get holder and ownership information.

Parameters:

  • ticker (str): Stock ticker symbol (e.g., "NVDA")
  • holder_type (str): One of: major_holders, institutional_holders, mutualfund_holders, insider_transactions, insider_purchases, insider_roster_holders

Example:

Get institutional holders of NVIDIA

7. get_option_expiration_dates

Get available options expiration dates for a ticker.

Parameters:

  • ticker (str): Stock ticker symbol (e.g., "SPY")

Example:

Get option expiration dates for SPY

8. get_option_chain

Get option chain data for calls or puts.

Parameters:

  • ticker (str): Stock ticker symbol (e.g., "AAPL")
  • expiration_date (str): Expiration date in YYYY-MM-DD format
  • option_type (str): Either "calls" or "puts"

Example:

Get Apple call options expiring on 2024-12-20

9. get_recommendations

Get analyst recommendations and upgrades/downgrades.

Parameters:

  • ticker (str): Stock ticker symbol (e.g., "META")
  • `recommendation_type

Tools 9

get_historical_stock_pricesGet historical stock prices for a ticker symbol.
get_stock_infoGet comprehensive stock information including price, company details, financial metrics, and more.
get_yahoo_finance_newsGet latest news articles for a ticker symbol.
get_stock_actionsGet dividend and stock split history.
get_financial_statementGet financial statements (income statement, balance sheet, or cash flow).
get_holder_infoGet holder and ownership information.
get_option_expiration_datesGet available options expiration dates for a ticker.
get_option_chainGet option chain data for calls or puts.
get_recommendationsGet analyst recommendations and upgrades/downgrades.

Try it

Get historical prices for Apple stock over the last year
Get detailed information about Tesla stock
Get recent news about Google
Get Amazon's quarterly income statement
Get institutional holders of NVIDIA

Frequently Asked Questions

What are the key features of Yahoo Finance MCP Server?

Retrieve historical stock price data with customizable periods and intervals. Access comprehensive stock financials, metrics, and company information. Fetch latest news articles for any ticker symbol. Get detailed option chains, expiration dates, and analytics. Track dividend history, stock splits, and analyst recommendations.

What can I use Yahoo Finance MCP Server for?

Automating financial research by pulling quarterly statements for multiple companies. Analyzing market sentiment by fetching recent news articles for specific tickers. Building custom investment dashboards that track institutional holder data. Evaluating option strategies by retrieving real-time option chains and expiration dates.

How do I install Yahoo Finance MCP Server?

Install Yahoo Finance MCP Server by running: uvx yahoo-finance-mcp-server

What MCP clients work with Yahoo Finance MCP Server?

Yahoo Finance MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Yahoo Finance MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare