Skip to main content
Glama
shukitchan

Yahoo Finance MCP Server

by shukitchan

Yahoo Finance MCP Server

A Model Context Protocol (MCP) server that provides financial market data from Yahoo Finance. Integrate real-time stock quotes, market data, and historical stock information with Claude and other MCP-compatible assistants, without requiring API keys.

Visualization and Analysis Capabilities

This MCP server enables powerful financial data visualization and analysis through Claude:

Market Sentiment Analysis Dashboard Market Sentiment Analysis Dashboard showing real-time index performance, fear/greed indicators, and historical trends

Portfolio Performance Tracking Track your tech portfolio performance with detailed metrics and visualizations

Stock Price Technical Analysis Deep dive technical analysis with price trends, moving averages, and performance insights

Related MCP server: Finance MCP Server

Features

  • Stock Quotes: Get current stock price, change, range, volume, and other key metrics

  • Market Indices: Retrieve data for major market indices like S&P 500, Dow Jones, NASDAQ

  • Historical Data: Fetch and analyze historical stock data with customizable time periods and intervals

  • Rate limiting: Built-in rate limiting to ensure reliable access to Yahoo Finance

  • Sentiment Analysis: Visualize market sentiment with fear/greed indicators and trend analysis

  • Portfolio Tracking: Monitor your investment portfolio performance over time

  • Technical Analysis: Access moving averages, price trends, and performance metrics

  • Visual Dashboards: Generate comprehensive financial dashboards for better insights

Installation

The most reliable way to run the server is using Docker:

# Clone the repository
git clone https://github.com/jasontoo/yahoofinance-mcp.git
cd yahoofinance-mcp

# Build the Docker image
docker build -t yahoofinance-mcp .

# Run the container
docker run -i --rm yahoofinance-mcp

Integration with Claude Desktop

  1. Download and install Claude Desktop

  2. Create or edit the Claude Desktop configuration file:

  • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  1. Add the Yahoo Finance server configuration using your preferred method:

{
  "mcpServers": {
   "yahoofinance": {
    "command": "docker",
    "args": [
      "run",
      "-i",
      "--rm",
      "yahoofinance-mcp"
    ]
   }
  }
}
  1. Save the file and restart Claude Desktop

Available Tools

yahoo_stock_quote

Gets current stock quote information from Yahoo Finance.

Parameters:

  • symbol: Stock ticker symbol (e.g., AAPL, MSFT, TSLA)

Example output:

Symbol: AAPL
Name: Apple Inc.
Price: $196.34
Change: $1.67 (0.86%)
Previous Close: $194.67
Open: $195.01
Day Range: $194.14 - $197.21
52 Week Range: $124.17 - $197.21
Volume: 54,364,985
Avg. Volume: 55,486,332
Market Cap: $3,026,858,790,912
P/E Ratio: 32.44
EPS: $6.05
Dividend Yield: 0.51%

yahoo_market_data

Gets current market data from Yahoo Finance for major indices.

Parameters:

  • indices (optional): List of index symbols to fetch (default: ["^GSPC", "^DJI", "^IXIC"])

Example output:

S&P 500
Price: 5,069.76
Change: -75.62 (-1.47%)
Previous Close: 5,145.37
Day Range: 5,062.68 - 5,143.25

Dow Jones Industrial Average
Price: 38,150.30
Change: -532.43 (-1.38%)
Previous Close: 38,682.73
Day Range: 38,113.08 - 38,672.04

NASDAQ Composite
Price: 16,180.21
Change: -240.32 (-1.46%)
Previous Close: 16,420.52
Day Range: 16,111.78 - 16,405.25

yahoo_stock_history

Gets historical stock data from Yahoo Finance.

Parameters:

  • symbol: Stock ticker symbol

  • period (optional): Time period ("1d", "5d", "1mo", "3mo", "6mo", "1y", "2y", "5y", "10y", "ytd", "max")

  • interval (optional): Data interval ("1m", "2m", "5m", "15m", "30m", "60m", "90m", "1h", "1d", "5d", "1wk", "1mo", "3mo")

Example output:

Historical data for AAPL (1mo, 1d intervals)
Currency: USD
Trading Period: 8/24/2023 to 9/25/2023

Date       | Open     | High     | Low      | Close    | Volume
-----------|----------|----------|----------|----------|------------
8/25/2023  | $181.21  | $181.82  | $180.3   | $181.72  | 38,324,242
8/30/2023  | $185.3   | $187.85  | $184.94  | $187.65  | 60,295,151
9/5/2023   | $188.28  | $189.98  | $187.61  | $189.7   | 45,768,330
9/11/2023  | $174.79  | $175.1   | $173.73  | $174.75  | 63,746,501
9/15/2023  | $175.83  | $176.1   | $173.82  | $175.01  | 93,033,436
9/21/2023  | $174.26  | $177.08  | $174.22  | $176.97  | 66,097,991
9/25/2023  | $175.03  | $176.97  | $173.35  | $176.08  | 63,523,374

Price Change: $-5.13 (-2.83%)

yahoo_company_financials

Gets financial statement data for a company from Yahoo Finance.

Parameters:

  • symbol: Stock ticker symbol

  • statement (optional): Financial statement type ("income", "balance", "cash", or "all")

  • period (optional): Time period ("annual" or "quarterly")

yahoo_stock_news_sentiment

Gets recent news articles and sentiment analysis for a stock.

Parameters:

  • symbol (optional): Stock ticker symbol (omit for general market news)

  • count (optional): Number of news items to retrieve (max 10)

Example Prompts

Once the server is connected to Claude, you can ask questions like:

  • "What's the current price of AAPL stock?"

  • "How has Tesla stock performed over the past month?"

  • "Show me the current values of major market indices."

  • "What's the stock price history for MSFT over the last year?"

  • "Compare the performance of GOOGL and AMZN over the past 3 months."

  • "What's the 52-week range for NVDA?"

  • "How has the S&P 500 performed today?"

  • "Create a market sentiment dashboard for today's trading."

  • "Generate a portfolio performance chart for my tech stocks."

  • "Show me a technical analysis of Tesla stock with moving averages."

  • "What's the current fear/greed index in the market?"

  • "Visualize the correlation between S&P 500 and VIX over the past month."

Troubleshooting

If you encounter issues:

  1. Claude Desktop Logs:

  • Check for errors: tail -n 20 -f ~/Library/Logs/Claude/mcp*.log

  1. Server Connectivity:

  • Make sure Docker is running if using Docker

  • Ensure you have an active internet connection

  1. Tool Execution Issues:

  • Verify ticker symbols are correct

  • Check if Yahoo Finance API might be rate-limiting requests

  • Wait a few minutes and try again if you see timeout errors

  1. Config File Issues:

  • Make sure your claude_desktop_config.json is formatted correctly

  • Double-check all paths and commands

  • Restart Claude Desktop after making changes

License

This project is licensed under the MIT License - see the LICENSE file for details.

Available Tools

3 tools
yahoo_market_dataA

Get current market data from Yahoo Finance. Returns information about major market indices (like S&P 500, NASDAQ, Dow Jones). Use this for broad market overview and current market sentiment.

ParametersJSON Schema
NameRequiredDescriptionDefault
indicesNoList of index symbols to fetch (e.g., ^GSPC for S&P 500, ^DJI for Dow Jones)

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full burden. It only says 'Get' which implies read-only, but does not explicitly state it is non-mutating, nor does it disclose response format, potential delays, or limitations. This is insufficient without annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the tool's purpose and a clear usage statement. Every word earns its place, with no redundancy or unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is somewhat incomplete: it doesn't specify what 'information' about indices is returned (e.g., current value, change) and no output schema exists to clarify. It also omits mention of the default indices, though that is in the schema. For a simple tool, it works but has clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides full coverage (100%) for the single optional parameter 'indices', including a clear description with examples. The tool description adds no extra parameter details beyond echoing 'major market indices', so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool gets current market data from Yahoo Finance, specifically for major market indices. It distinguishes itself from siblings (stock quotes and history) by focusing on broad market overview and sentiment.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage context: 'Use this for broad market overview and current market sentiment.' This indicates when to use the tool, though it does not explicitly name alternative tools or state when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

yahoo_stock_historyA

Get historical stock data from Yahoo Finance. Returns price and volume data for a specified time period. Useful for charting, trend analysis, and evaluating stock performance over time.

ParametersJSON Schema
NameRequiredDescriptionDefault
periodNoTime period (1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max)1mo
symbolYesStock ticker symbol (e.g., AAPL, MSFT, TSLA)
intervalNoData interval (1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo)1d

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the return type (price and volume data) but does not mention data source limitations, time zone effects, or that it supports intraday intervals. It is a read-only operation, but the description does not elaborate on exactly what the returned data structure looks like, leaving some ambiguity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded with the main purpose, followed by a useful use-case sentence. There is no redundant information or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with three parameters, all explained in the schema. The description provides enough context for what the tool does and when to use it, though it lacks a detailed description of the return structure since there is no output schema. Overall, it is adequate for the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the parameters (symbol, period, interval) are already fully documented. The description adds general context about 'specified time period' but does not add any details beyond the schema, earning the baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool retrieves historical stock data from Yahoo Finance, specifying that it returns price and volume data for a time period. This distinguishes it from siblings like yahoo_stock_quote (current quotes) and yahoo_market_data (market overview).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for use, such as charting, trend analysis, and performance evaluation over time. It implies when to use this tool rather than a quote tool, though it does not explicitly name alternative tools or state exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

yahoo_stock_quoteA

Get current stock quote information from Yahoo Finance. Returns detailed information about a stock including current price, day range, 52-week range, market cap, volume, P/E ratio, etc. Use this for getting the latest stock price and key metrics.

ParametersJSON Schema
NameRequiredDescriptionDefault
symbolYesStock ticker symbol (e.g., AAPL, MSFT, TSLA)

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses what the tool returns (a detailed list of metrics), but does not mention data freshness, error behavior, rate limits, or any potential side effects. It provides moderate transparency by listing expected outputs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise—exactly two sentences—with the main purpose and return values front-loaded. Every word earns its place, and there is no redundant phrasing or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a simple tool with one parameter, no annotations, and no output schema. The description sufficiently covers what it does, when to use it, and what it returns. It lacks only minor details like error handling or data source specificity, but the overall context is adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the single symbol parameter, including examples. The description does not add any extra meaning about the parameter beyond what the schema already provides, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'Get' with a clear resource ('current stock quote information from Yahoo Finance') and enumerates the key output fields (current price, day range, 52-week range, etc.). This clearly distinguishes it from sibling tools like yahoo_stock_history and yahoo_market_data by focusing on current quote data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states 'Use this for getting the latest stock price and key metrics,' giving clear when-to-use guidance. It doesn't explicitly mention alternatives or exclusions, but the sibling tool names and the 'current' vs. 'history' contrast imply the appropriate context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.9/5.0
Disambiguation5/5

Each tool targets a clearly distinct data type: single stock quote, market indices, and historical stock data. There is no overlap in purpose or returned data.

Naming Consistency5/5

All tool names follow a consistent 'yahoo_' prefix followed by a descriptive noun phrase (stock_quote, market_data, stock_history), making the naming pattern predictable and uniform.

Tool Count4/5

With only 3 tools, the server is on the thinner side, but each tool covers a core financial data need (current price, market overview, historical data). It is slightly under-scoped but reasonable for a focused finance data server.

Completeness3/5

The tools cover current quotes, market indices, and historical data, but miss common Yahoo Finance features like symbol search, foreign exchange, crypto, or options data. These gaps may require agents to work around missing functionality.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides real-time stock quotes, historical price data, financial news, and multi-stock comparisons using Yahoo Finance data. Enables users to access comprehensive financial market information through natural language queries.
    194
    MIT
  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Provides real-time financial data from Yahoo Finance, enabling stock price lookups, historical data analysis, company information retrieval, and multi-stock comparisons through natural language queries.
  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Integrates Yahoo Finance data with Claude to provide real-time and historical financial information, including stock prices, financial statements, and options data. It enables comprehensive market research and investment analysis through natural language interactions.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shukitchan/yahoofinance-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server