Yahoo Finance

MCP server for Yahoo Finance
  • python

8

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "leoncuhk-mcp-yahoo-finance": {
      "command": "uvx",
      "args": [
        "mcp-yahoo-finance"
      ]
    }
  }
}

You can query Yahoo Finance data and generate financial visualizations through a dedicated MCP server. This server exposes tools to fetch prices, company details, and create analytics dashboards, making it easy to integrate live market data with your MCP clients.

How to use

You interact with the Yahoo Finance MCP server from your MCP client by calling its data and visualization tools. Use the basic data tools to retrieve current prices, historical prices, dividends, and financial statements. Complement those with the visualization tools to generate market dashboards, portfolio reports, and technical analysis visuals. You can run these tools from clients like Claude Desktop, VS Code, or Cursor that support MCP connections. When you issue a request, specify the symbol(s) you’re interested in and, if needed, a date range or a list of symbols. The server will return the data or generate a visualization asset that you can view or export.

Common usage patterns include: retrieve a current price for a stock, compare prices across multiple symbols, generate a market sentiment dashboard, build a portfolio performance report, or create a detailed technical analysis chart with indicators. For visualization requests, specify the type of dashboard or report you want and the symbols to include. The server handles the data gathering, processing, and rendering.

How to install

# Prerequisites
- Python 3.8+
- pip
- Optional: Docker if you want to run via container
# 1. Clone the MCP Yahoo Finance server
git clone https://github.com/leoncuhk/mcp-yahoo-finance.git
cd mcp-yahoo-finance
# 2. Install dependencies
pip install -r requirements.txt
# If requirements.txt is missing, install core dependencies directly
pip install mcp yfinance pandas matplotlib seaborn plotly kaleido numpy pillow base64io
# 3. Run the MCP server (example using the local Python setup)
# This step depends on how you expose the MCP entry point in your environment.
# The project commonly uses an MCP runtime command like uvx with the package name.
uvx mcp-yahoo-finance
# 4. Alternative: run via Docker
# Replace IMAGE with the actual container image tag you use
docker run -i --rm IMAGE

Configuration and notes

Configure your MCP client to connect to the Yahoo Finance server by registering an MCP entry that points to the server runtime. You can set up different clients as follows.

// Claude Desktop configuration example
{
  "mcpServers": {
    "yahoo-finance": {
      "command": "uvx",
      "args": ["mcp-yahoo-finance"]
    }
  }
}
// VSCode MCP configuration example
{
  "servers": {
    "yahoo-finance": {
      "command": "uvx",
      "args": ["mcp-yahoo-finance"]
    }
  }
}
// Cursor MCP configuration example
{
  "mcp-servers": {
    "yahoo-finance": {
      "command": "uvx",
      "args": ["mcp-yahoo-finance"]
    }
  }
}

Tools and capabilities

The server provides a range of data retrieval tools and visualization capabilities. You can obtain price data, fundamental statements, dividends, news, and more, as well as generate dashboards and analysis reports.

Available data tools include getting current prices, historical prices, dividends, income statements, cash flow, earning dates, and news for stocks.

Visualization tools include generating a market dashboard, a portfolio performance report, and a technical analysis chart for a stock.

Testing and verification

To verify the visualization capability and basic data endpoints, run the test suite if provided: navigate to the tests directory and execute the test script to generate example visuals in the examples directory.

cd tests
python test_visualization.py

Available tools

get_current_stock_price

Fetches the latest trading price for a single symbol.

get_stock_price_by_date

Retrieves the stock price for a specific date, allowing you to backtest or compare historical values.

get_stock_price_date_range

Returns prices over a specified date range for trend analysis.

get_historical_stock_prices

Provides historical data for a symbol over customizable periods.

get_dividends

Fetches dividend history and amounts for a symbol.

get_income_statement

Returns the income statement data for a company.

get_cashflow

Returns cash flow data for a company.

get_earning_dates

Provides upcoming and historical earnings dates.

get_news

Fetches recent news related to a stock.

generate_market_dashboard

Creates a market sentiment dashboard with index performance.

generate_portfolio_report

Generates a portfolio performance tracking report.

generate_stock_technical_analysis

Produces a technical analysis report for a stock with indicators.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
Yahoo Finance MCP Server - leoncuhk/mcp-yahoo-finance | VeilStrat