Skip to content
Back to search

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.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/alex2yang97--yahoo-finance-mcp/badge.svg)](/listings/alex2yang97--yahoo-finance-mcp)

HTML

<a href="/listings/alex2yang97--yahoo-finance-mcp"><img src="/api/listings/alex2yang97--yahoo-finance-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Recommended: run with `uvx`

Run the server directly from the repository without creating a local virtual environment:

uvx --from git+https://github.com/Alex2Yang97/yahoo-finance-mcp yahoo-finance-mcp

Local development

1. Clone this repository:

   git clone https://github.com/Alex2Yang97/yahoo-finance-mcp.git
   cd yahoo-finance-mcp

2. Create and activate a virtual environment and install dependencies:

   uv sync

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 185 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Yahoo Finance MCP Server
  2. <div align="right">
  3. <a href="README.md">English</a> | <a href="README.zh.md">中文</a>
  4. </div>
  5. 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.
  6. ![GitHub last commit](https://img.shields.io/github/last-commit/modesty/pdf2json?color=olive)
  7. ## Demo
  8. ![MCP Demo](assets/demo.gif)
  9. ## MCP Tools
  10. The server exposes the following tools through the Model Context Protocol:
  11. ### Stock Information
  12. | Tool | Description |
  13. |------|-------------|
  14. | `get_historical_stock_prices` | Get historical OHLCV data for a stock with customizable period and interval |
  15. | `get_stock_info` | Get comprehensive stock data including price, metrics, and company details |
  16. | `get_yahoo_finance_news` | Get latest news articles for a stock |
  17. | `get_stock_actions` | Get stock dividends and splits history |
  18. ### Financial Statements
  19. | Tool | Description |
  20. |------|-------------|
  21. | `get_financial_statement` | Get income statement, balance sheet, or cash flow statement (annual/quarterly) |
  22. | `get_holder_info` | Get major holders, institutional holders, mutual funds, or insider transactions |
  23. ### Options Data
  24. | Tool | Description |
  25. |------|-------------|
  26. | `get_option_expiration_dates` | Get available options expiration dates |
  27. | `get_option_chain` | Get options chain for a specific expiration date and type (calls/puts) |
  28. ### Analyst Information
  29. | Tool | Description |
  30. |------|-------------|
  31. | `get_recommendations` | Get analyst recommendations or upgrades/downgrades history |
  32. ## Real-World Use Cases
  33. With this MCP server, you can use Claude to:
  34. ### Stock Analysis
  35. - **Price Analysis**: "Show me the historical stock prices for NOW over the last 6 months with daily intervals."
  36. - **Financial Health**: "Get the quarterly balance sheet for Intuit."
  37. - **Performance Metrics**: "What are the key financial metrics for Intuit from the stock info?"
  38. - **Trend Analysis**: "Compare the quarterly income statements of ServiceNow and Intuit."
  39. - **Cash Flow Analysis**: "Show me the annual cash flow statement for ServiceNow."
  40. ### Market Research
  41. - **News Analysis**: "Get the latest news articles about Intuit."
  42. - **Institutional Activity**: "Show me the institutional holders of NOW stock."
  43. - **Insider Trading**: "What are the recent insider transactions for ServiceNow?"
  44. - **Options Analysis**: "Get the options chain for INTU with expiration date 2026-01-30 for calls."
  45. - **Analyst Coverage**: "What are the analyst recommendations for Intuit over the last 3 months?"
  46. ### Investment Research
  47. - "Create a comprehensive analysis of Intuit's financial health using their latest quarterly financial statements."
  48. - "Compare the dividend history and stock splits of Coca-Cola and PepsiCo."
  49. - "Analyze the institutional ownership changes in ServiceNow over the past year."
  50. - "Generate a report on the options market activity for Intuit stock with expiration in 30 days."
  51. - "Summarize the latest analyst upgrades and downgrades in the tech sector over the last 6 months."
  52. ## Requirements
  53. - Python 3.14.6 or higher
  54. - Dependencies as listed in `pyproject.toml`, including:
  55. - mcp
  56. - yfinance
  57. - pandas
  58. - pydantic
  59. - and other packages for data processing
  60. ## Setup
  61. ### Recommended: run with `uvx`
  62. Run the server directly from the repository without creating a local virtual environment:
  63. ```bash
  64. uvx --from git+https://github.com/Alex2Yang97/yahoo-finance-mcp yahoo-finance-mcp
  65. ```
  66. ### Local development
  67. 1. Clone this repository:
  68. ```bash
  69. git clone https://github.com/Alex2Yang97/yahoo-finance-mcp.git
  70. cd yahoo-finance-mcp
  71. ```
  72. 2. Create and activate a virtual environment and install dependencies:
  73. ```bash
  74. uv sync
  75. ```
  76. ## Usage
  77. ### Quick Start
  78. Run the packaged entrypoint with:
  79. ```bash
  80. uvx --from git+https://github.com/Alex2Yang97/yahoo-finance-mcp yahoo-finance-mcp
  81. ```
  82. For local changes in this checkout, use:
  83. ```bash
  84. uvx --from . yahoo-finance-mcp
  85. ```
  86. ### Development Mode
  87. If you are working inside a local clone and want to run the source tree directly:
  88. ```bash
  89. uv run server.py
  90. ```
  91. ### Integration with Claude for Desktop
  92. To integrate this server with Claude for Desktop:
  93. 1. Install Claude for Desktop to your local machine.
  94. 2. Install VS Code to your local machine. Then run the following command to open the `claude_desktop_config.json` file:
  95. - MacOS: `code ~/Library/Application\ Support/Claude/claude_desktop_config.json`
  96. - Windows: `code $env:AppData\Claude\claude_desktop_config.json`
  97. 3. Edit the Claude for Desktop config file, located at:
  98. - macOS:
  99. ```json
  100. {
  101. "mcpServers": {
  102. "yfinance": {
  103. "command": "uvx",
  104. "args": [
  105. "--from",
  106. "git+https://github.com/Alex2Yang97/yahoo-finance-mcp",
  107. "yahoo-finance-mcp"
  108. ]
  109. }
  110. }
  111. }
  112. ```
  113. - Windows:
  114. ```json
  115. {
  116. "mcpServers": {
  117. "yfinance": {
  118. "command": "uvx",
  119. "args": [
  120. "--from",
  121. "git+https://github.com/Alex2Yang97/yahoo-finance-mcp",
  122. "yahoo-finance-mcp"
  123. ]
  124. }
  125. }
  126. }
  127. ```
  128. - **Note**: You may need to put the full path to the uv executable in the command field. You can get this by running `which uv` on MacOS/Linux or `where uv` on Windows.
  129. 4. Restart Claude for Desktop
  130. ## License
  131. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.