Alex2Yang97/yahoo-finance-mcp

This is a Model Context Protocol (MCP) server that provides comprehensive financial data from Yahoo Finance. It allows you to retrieve detailed information about stocks, including historical prices, company information, financial statements, options data, and market news.

Yahoo Finance MCP Server

A lightweight Model Context Protocol (MCP) server that wraps the public Yahoo Finance API and makes a rich set of financial data available to LLM‑powered agents (e.g., Claude). The server exposes a collection of typed tools that an LLM can call to fetch:

Category Tools (short description)
Stock Information get_historical_stock_prices – OHLCV series; get_stock_info – current price, metrics, company details; get_yahoo_finance_news – latest news; get_stock_actions – dividends & splits
Financial Statements get_financial_statement – income, balance sheet, cash‑flow (annual/quarterly); get_holder_info – major, institutional, mutual‑fund, insider holders
Options Data get_option_expiration_dates – available dates; get_option_chain – calls/puts for a chosen expiry
Analyst Information get_recommendations – analyst ratings, upgrades/downgrades

Why it matters for AI

The server is designed to be called from Claude for Desktop (or any MCP‑compatible model) so that the model can augment its reasoning with up‑to‑date market data, news, and ownership information. This turns a pure language model into a financial research assistant without the model having to scrape the web itself.

Real‑world prompts (from the README)

  • “Show me the historical stock prices for NOW over the last 6 months with daily intervals.”get_historical_stock_prices
  • “Get the quarterly balance sheet for Intuit.”get_financial_statement
  • “What are the analyst recommendations for Intuit over the last 3 months?”get_recommendations
  • “Get the options chain for INTU with expiration date 2026‑01‑30 for calls.”get_option_chain

These examples illustrate how an LLM can ask natural‑language questions and the MCP server translates them into concrete API calls.

Getting started

  1. Run without installing – the README recommends uvx:
    uvx --from git+https://github.com/Alex2Yang97/yahoo-finance-mcp yahoo-finance-mcp
    
  2. Local development – clone, uv sync to install the dependencies listed in pyproject.toml (Python ≥ 3.14.6, mcp, yfinance, pandas, pydantic, …) and start the server with uv run server.py.
  3. Hook into Claude – edit claude_desktop_config.json to add a yfinance MCP entry that points to the command above, then restart Claude.

License

MIT – free to use, modify, and redistribute.


All details are taken directly from the repository’s README.

Related

  • Project
  • Project
  • Project
  • Project