PluginBench
MCP Server
Active
MIT

Yahoo Finance MCP Server

io.github.danishashko/yahoo-finance-mcp

Real-time stock quotes, financials, analyst ratings, and options data from Yahoo Finance for Claude.

What is the Yahoo Finance MCP server?

The Yahoo Finance MCP server provides Claude with access to real-time and historical stock market data, company information, financial statements, analyst recommendations, options chains, and market news from Yahoo Finance. It enables natural-language queries about stock prices, performance, fundamentals, and comparisons across multiple tickers.

This server connects Claude to Yahoo Finance data, letting you retrieve current stock quotes, historical price charts, company profiles, financial statements, analyst ratings, options chains, dividend history, and financial news. It's useful for investment research, portfolio analysis, financial due diligence, and market monitoring—all through conversational prompts.

How to install Yahoo Finance

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "yahoo-finance-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "yahoo-finance-mcp-server"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • get_stock_quote — Retrieve current price, change, day and 52-week range, volume, market cap, P/E, EPS, and dividend yield for a ticker.
  • get_historical_prices — Fetch OHLCV history with summary statistics and total return for a given period and interval.
  • get_company_info — Get business summary, key executives, and valuation and financial highlights for a company.
  • get_financial_statements — Retrieve annual income statement, balance sheet, and cash flow statements.
  • compare_stocks — Compare key metrics for 2 to 10 tickers side by side with quick insights.
  • get_analyst_recommendations — Obtain price targets, consensus rating, recommendation trend, and recent upgrades/downgrades.
  • get_market_news — Fetch latest financial news headlines with source, date, summary, and link for a ticker.
  • get_options_chain — List expiration dates or retrieve calls/puts chain with strike, bid/ask, volume, open interest, and implied volatility.
  • get_holders — Get institutional, mutual-fund, major holders, or insider transaction data.
  • get_dividends_splits — Retrieve dividend payment history and stock-split history.
  • get_analyst_estimates — Fetch forward price targets, EPS/revenue estimates by period, and growth estimates.
  • search_symbols — Find ticker symbols by company name or keyword.
  • get_market_status — Check if a market is open/closed with timing and major-index summary.

Use cases

  • Check current stock prices and 52-week ranges for investment decisions
  • Analyze historical stock performance over custom periods (daily, weekly, monthly, yearly)
  • Compare financial metrics across multiple stocks side by side
  • Review analyst price targets and recommendation trends before buying or selling
  • Research company fundamentals including financial statements and executive leadership
  • Monitor options chains to evaluate call and put strategies

Yahoo Finance MCP server FAQ

What is the Yahoo Finance MCP server?

It's an MCP server that gives Claude access to real-time and historical stock market data, company profiles, financial statements, analyst ratings, options chains, and financial news from Yahoo Finance via the free yfinance library.

Is it free to use?

Yes. The server uses Yahoo Finance's free public API through yfinance. No API key or subscription is required. Yahoo Finance rate-limits roughly 2,000 requests per hour per IP.

How do I install it in Claude Desktop?

Add the server to your Claude Desktop config file (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json; Windows: %APPDATA%\Claude\claude_desktop_config.json) with the npx command: {"command": "npx", "args": ["-y", "yahoo-finance-mcp-server"]}. Restart Claude. You need Python 3.10+ and Node.js 16+.

Do I need authentication or an API key?

No. The server connects directly to Yahoo Finance's public data. No authentication, API key, or account is required.

Can I use it outside Claude Desktop?

Yes. The server supports HTTP mode via the --http flag for use with n8n, remote agents, and other MCP-compatible clients that connect over HTTP instead of stdio.

What data is available?

Real-time quotes, historical OHLCV data, company profiles, financial statements (income, balance sheet, cash flow), analyst ratings and price targets, options chains, dividend and split history, institutional/insider holdings, financial news, and market status.

README (reference)

Source of truth, from the repository.

Yahoo Finance MCP Server 📈

npm version npm downloads Python License: MIT

Real-time stock market data for Claude Desktop and any MCP-compatible client, powered by Yahoo Finance. Get quotes, historical prices, company profiles, financial statements, analyst ratings, and multi-stock comparisons, all from natural language.

npm package: yahoo-finance-mcp-server  ·  GitHub repo: danishashko/yahoo-finance-mcp. The repo name is shorter than the package name; both refer to this project.

🎯 What You Get

  • 📊 Real-time stock quotes with full market data
  • 📈 Historical prices (OHLCV) with summary statistics
  • 🏢 Company profiles, officers, and key statistics
  • 💰 Financial statements (income, balance sheet, cash flow)
  • 🎯 Analyst ratings, price targets, and the recent recommendation trend
  • ⚖️ Multi-stock comparisons side by side
  • 📰 Latest financial news per ticker
  • 🧾 Options chains (calls/puts, strikes, IV, open interest)
  • 🏦 Ownership data — institutional, mutual fund, and insider activity
  • 💵 Dividend & split history
  • 🔮 Forward analyst estimates (price targets, EPS/revenue, growth)
  • 🔎 Symbol search by company name or keyword
  • 🕒 Market status (open/closed) and index summary

Every tool returns human-readable markdown by default, or structured JSON on request (response_format: "json"). Requests share a single browser-impersonating HTTP session to reduce Yahoo Finance rate-limiting.

🚀 Quick Start

Add this to your Claude Desktop config and restart Claude:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "yahoo-finance": {
      "command": "npx",
      "args": ["-y", "yahoo-finance-mcp-server"]
    }
  }
}

That is it. On first launch the npx wrapper creates an isolated Python environment and installs the dependencies for you (a one-time step that can take a minute). You only need Python 3.10+ and Node.js 16+ on your machine.

Prefer a global install?

npm install -g yahoo-finance-mcp-server
{
  "mcpServers": {
    "yahoo-finance": {
      "command": "yahoo-finance-mcp-server"
    }
  }
}

🌐 HTTP mode (n8n, remote agents, anything that connects to a URL)

Some clients spawn an MCP server as a child process and talk to it over stdio; others only take a URL. n8n's MCP Client Tool node is the second kind - it offers HTTP Streamable and SSE and no way to launch a command - so stdio alone puts the server out of reach.

--http serves the same 13 tools over Streamable HTTP at /mcp:

npx -y yahoo-finance-mcp-server --http
# -> http://127.0.0.1:8000/mcp
FlagDefaultWhat it does
--httpoffServe Streamable HTTP at /mcp instead of stdio
--host127.0.0.1Interface to bind
--port8000Port to bind
--allowed-hostsee belowHost header to accept, repeatable
--statefuloffKeep a session per client instead of stateless

No authentication is added, so keep it on an interface you trust.

Reaching it from a container

n8n in Docker is not on your loopback interface, so bind wider and use the host alias:

npx -y yahoo-finance-mcp-server --http --host 0.0.0.0 --port 8931

Then point the MCP Client Tool node at http://host.docker.internal:8931/mcp with authentication set to None.

DNS-rebinding protection stays on when you bind wider. localhost, 127.0.0.1 and host.docker.internal on the bound port are accepted by default; any other name needs --allowed-host name:port, and a request arriving under an unlisted name gets 421 Misdirected Request.

🔧 Available Tools

ToolWhat it returnsParameters
get_stock_quoteCurrent price, change, day and 52-week range, volume, market cap, P/E, EPS, dividend yieldticker
get_historical_pricesOHLCV history with summary stats and total returnticker, period, interval
get_company_infoBusiness summary, key executives, valuation and financial highlightsticker
get_financial_statementsAnnual income statement, balance sheet, and cash flowticker
compare_stocksKey metrics for multiple tickers side by side, plus quick insightstickers (2 to 10)
get_analyst_recommendationsPrice targets, consensus, recommendation trend, and recent upgrades/downgradesticker
get_market_newsLatest news headlines with source, date, summary, and linkticker, count
get_options_chainExpiration dates, or the calls/puts chain (strike, bid/ask, volume, OI, IV)ticker, expiration_date, option_type
get_holdersInstitutional, mutual-fund, or major holders, or insider transactionsticker, holder_type
get_dividends_splitsDividend payment history (with summary) and stock-split historyticker
get_analyst_estimatesForward price targets, EPS/revenue estimates by period, and growth estimatesticker
search_symbolsFind ticker symbols by company name or keywordquery, count
get_market_statusWhether a market is open/closed, with timing and a major-index summaryregion

Every tool also accepts response_format ("markdown", the default, or "json").

get_historical_prices options:

  • period: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max
  • interval: 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo

get_options_chain: call without expiration_date to list available dates, then again with a date. option_type is calls, puts, or both.

get_holders: holder_type is institutional, mutualfund, major, or insider_transactions.

💬 Example Prompts

Once the server is connected, just ask Claude:

  • "What's the current price of Apple stock?"
  • "Show me Amazon's stock performance over the last year"
  • "Tell me about Tesla as a company and who runs it"
  • "Show me Apple's income statement"
  • "Compare AAPL, MSFT, and GOOGL"
  • "What do analysts think about Amazon, and what's the price target?"
  • "What's the latest news on NVIDIA?"
  • "Show me the SPY call options expiring next month"
  • "Who are the biggest institutional holders of Apple?"
  • "What's Coca-Cola's dividend history?"

🐛 Troubleshooting

"Command not found" / "Python not found" Make sure Python and Node.js are installed and on your PATH. On macOS/Linux, try python3 instead of python in the config.

"Module not found: yfinance" (manual install only) Install the dependencies:

pip install yfinance curl_cffi pandas tabulate mcp pydantic httpx

Tools not showing up in Claude

  1. Confirm the config file is valid JSON (no trailing commas).
  2. Fully quit and reopen Claude Desktop.
  3. Check the path in your config actually exists.

"Error fetching data"

  • Check your internet connection.
  • Verify the ticker symbol (for example AAPL, not Apple).
  • Some smaller companies have limited data, and Yahoo Finance can be briefly unavailable.

Using a different model or provider (LiteLLM, OpenRouter, NVIDIA NIM, a local model) This server never talks to a model. Your client starts it as a local process and speaks JSON-RPC over stdin/stdout, so changing ANTHROPIC_BASE_URL or swapping the model behind your client has no effect on it. If tools stop firing after a switch like that, check two things: the model has to support function calling, and a proxy configured to drop unsupported parameters can silently strip your tool definitions, which produces no error at all. Run /mcp in your client (or claude mcp list) to confirm the server is connected before suspecting the server.

🛠️ Manual Installation (Alternative)

If you would rather run the Python file directly instead of via npx:

1. Download the server

Save yahoo_finance_mcp.py somewhere on your machine and install the dependencies:

pip install yfinance curl_cffi pandas tabulate mcp pydantic httpx

(or pip3 on macOS/Linux)

2. Point Claude Desktop at it

{
  "mcpServers": {
    "yahoo-finance": {
      "command": "python3",
      "args": ["/absolute/path/to/yahoo_finance_mcp.py"]
    }
  }
}

On Windows use "command": "python" and a path like "C:\\path\\to\\yahoo_finance_mcp.py" (double backslashes or forward slashes).

3. Restart Claude Desktop.

🔒 Privacy & Rate Limits

  • Uses the free Yahoo Finance API via the yfinance library.
  • Requests go straight to Yahoo Finance. Nothing is stored or proxied.
  • Yahoo Finance rate-limits roughly 2,000 requests/hour per IP.
  • Intended for personal, educational, and research use.

📝 Notes

  • Use ticker symbols in uppercase (AAPL, MSFT, TSLA).
  • Some quotes may be delayed 15 to 20 minutes.
  • Financial statements are generally available for larger public companies.

📋 Changelog

See CHANGELOG.md for the full version history. The core fixes (tool input validation, analyst recommendations, dividend yield, working npx install) landed in v1.1.0.

📚 Resources

⚖️ Legal Disclaimer

This tool uses Yahoo Finance's publicly available data through the yfinance library. Yahoo!, Y!Finance, and Yahoo! Finance are registered trademarks of Yahoo, Inc. This tool is not affiliated with, endorsed by, or vetted by Yahoo, Inc. Please refer to Yahoo!'s terms of use for details on your rights to use the data.

👤 Author

Daniel Shashko

📄 License

MIT © Daniel Shashko

Related MCP servers

SESEC EDGAR logo

SEC EDGAR

Active

SEC EDGAR filings (10-K, 10-Q, 8-K), XBRL financials, and full-text filing search. No API key.

0
Python
MIT
View repository →

FRED economic data: GDP, inflation, unemployment, rates, and 800k+ Federal Reserve time series.

0
Python
MIT
View repository →
GEGeocoding logo

Geocoding

Active

Forward and reverse geocoding, place search, and distance via OpenStreetMap Nominatim. No key.

0
Python
MIT
View repository →

Unofficial MCP server for Make.com automation - build, validate & deploy scenarios via AI

7
TypeScript
MIT
View repository →
MEMeelion MCP logo

Meelion MCP

Maintained

Brazilian fixed income & financial data for AI. Selic, CDI, IPCA, CDB/LCI/LCA rankings, FX rates.

1
View repository →

SSH connection manager with MCP server for AI-assisted operations across servers.

55
Go
MIT
View repository →