{
  "markdown": "# Yahoo Finance MCP Server 📈\n\n[![npm version](https://img.shields.io/npm/v/yahoo-finance-mcp-server.svg)](https://www.npmjs.com/package/yahoo-finance-mcp-server)\n[![npm downloads](https://img.shields.io/npm/dm/yahoo-finance-mcp-server.svg)](https://www.npmjs.com/package/yahoo-finance-mcp-server)\n[![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\nReal-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.\n\n> **npm package:** [`yahoo-finance-mcp-server`](https://www.npmjs.com/package/yahoo-finance-mcp-server) &nbsp;·&nbsp; **GitHub repo:** [`danishashko/yahoo-finance-mcp`](https://github.com/danishashko/yahoo-finance-mcp). The repo name is shorter than the package name; both refer to this project.\n\n## 🎯 What You Get\n\n- 📊 **Real-time stock quotes** with full market data\n- 📈 **Historical prices** (OHLCV) with summary statistics\n- 🏢 **Company profiles**, officers, and key statistics\n- 💰 **Financial statements** (income, balance sheet, cash flow)\n- 🎯 **Analyst ratings**, price targets, and the recent recommendation trend\n- ⚖️ **Multi-stock comparisons** side by side\n- 📰 **Latest financial news** per ticker\n- 🧾 **Options chains** (calls/puts, strikes, IV, open interest)\n- 🏦 **Ownership data** — institutional, mutual fund, and insider activity\n- 💵 **Dividend & split history**\n- 🔮 **Forward analyst estimates** (price targets, EPS/revenue, growth)\n- 🔎 **Symbol search** by company name or keyword\n- 🕒 **Market status** (open/closed) and index summary\n\nEvery 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.\n\n## 🚀 Quick Start\n\nAdd this to your Claude Desktop config and restart Claude:\n\n- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows:** `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"yahoo-finance\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"yahoo-finance-mcp-server\"]\n    }\n  }\n}\n```\n\nThat 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.\n\n### Prefer a global install?\n\n```bash\nnpm install -g yahoo-finance-mcp-server\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"yahoo-finance\": {\n      \"command\": \"yahoo-finance-mcp-server\"\n    }\n  }\n}\n```\n\n## 🌐 HTTP mode (n8n, remote agents, anything that connects to a URL)\n\nSome clients spawn an MCP server as a child process and talk to it over stdio;\nothers only take a URL. n8n's **MCP Client Tool** node is the second kind - it\noffers HTTP Streamable and SSE and no way to launch a command - so stdio alone\nputs the server out of reach.\n\n`--http` serves the same 13 tools over Streamable HTTP at `/mcp`:\n\n```bash\nnpx -y yahoo-finance-mcp-server --http\n# -> http://127.0.0.1:8000/mcp\n```\n\n| Flag | Default | What it does |\n|---|---|---|\n| `--http` | off | Serve Streamable HTTP at `/mcp` instead of stdio |\n| `--host` | `127.0.0.1` | Interface to bind |\n| `--port` | `8000` | Port to bind |\n| `--allowed-host` | see below | Host header to accept, repeatable |\n| `--stateful` | off | Keep a session per client instead of stateless |\n\nNo authentication is added, so keep it on an interface you trust.\n\n### Reaching it from a container\n\nn8n in Docker is not on your loopback interface, so bind wider and use the\nhost alias:\n\n```bash\nnpx -y yahoo-finance-mcp-server --http --host 0.0.0.0 --port 8931\n```\n\nThen point the MCP Client Tool node at `http://host.docker.internal:8931/mcp`\nwith authentication set to **None**.\n\nDNS-rebinding protection stays on when you bind wider. `localhost`,\n`127.0.0.1` and `host.docker.internal` on the bound port are accepted by\ndefault; any other name needs `--allowed-host name:port`, and a request\narriving under an unlisted name gets `421 Misdirected Request`.\n\n## 🔧 Available Tools\n\n| Tool | What it returns | Parameters |\n|------|-----------------|------------|\n| `get_stock_quote` | Current price, change, day and 52-week range, volume, market cap, P/E, EPS, dividend yield | `ticker` |\n| `get_historical_prices` | OHLCV history with summary stats and total return | `ticker`, `period`, `interval` |\n| `get_company_info` | Business summary, key executives, valuation and financial highlights | `ticker` |\n| `get_financial_statements` | Annual income statement, balance sheet, and cash flow | `ticker` |\n| `compare_stocks` | Key metrics for multiple tickers side by side, plus quick insights | `tickers` (2 to 10) |\n| `get_analyst_recommendations` | Price targets, consensus, recommendation trend, and recent upgrades/downgrades | `ticker` |\n| `get_market_news` | Latest news headlines with source, date, summary, and link | `ticker`, `count` |\n| `get_options_chain` | Expiration dates, or the calls/puts chain (strike, bid/ask, volume, OI, IV) | `ticker`, `expiration_date`, `option_type` |\n| `get_holders` | Institutional, mutual-fund, or major holders, or insider transactions | `ticker`, `holder_type` |\n| `get_dividends_splits` | Dividend payment history (with summary) and stock-split history | `ticker` |\n| `get_analyst_estimates` | Forward price targets, EPS/revenue estimates by period, and growth estimates | `ticker` |\n| `search_symbols` | Find ticker symbols by company name or keyword | `query`, `count` |\n| `get_market_status` | Whether a market is open/closed, with timing and a major-index summary | `region` |\n\nEvery tool also accepts `response_format` (`\"markdown\"`, the default, or `\"json\"`).\n\n**`get_historical_prices` options:**\n\n- `period`: `1d`, `5d`, `1mo`, `3mo`, `6mo`, `1y`, `2y`, `5y`, `10y`, `ytd`, `max`\n- `interval`: `1m`, `2m`, `5m`, `15m`, `30m`, `60m`, `90m`, `1h`, `1d`, `5d`, `1wk`, `1mo`, `3mo`\n\n**`get_options_chain`:** call without `expiration_date` to list available dates, then again with a date. `option_type` is `calls`, `puts`, or `both`.\n\n**`get_holders`:** `holder_type` is `institutional`, `mutualfund`, `major`, or `insider_transactions`.\n\n## 💬 Example Prompts\n\nOnce the server is connected, just ask Claude:\n\n- \"What's the current price of Apple stock?\"\n- \"Show me Amazon's stock performance over the last year\"\n- \"Tell me about Tesla as a company and who runs it\"\n- \"Show me Apple's income statement\"\n- \"Compare AAPL, MSFT, and GOOGL\"\n- \"What do analysts think about Amazon, and what's the price target?\"\n- \"What's the latest news on NVIDIA?\"\n- \"Show me the SPY call options expiring next month\"\n- \"Who are the biggest institutional holders of Apple?\"\n- \"What's Coca-Cola's dividend history?\"\n\n## 🐛 Troubleshooting\n\n**\"Command not found\" / \"Python not found\"**\nMake sure Python and Node.js are installed and on your PATH. On macOS/Linux, try `python3` instead of `python` in the config.\n\n**\"Module not found: yfinance\" (manual install only)**\nInstall the dependencies:\n\n```bash\npip install yfinance curl_cffi pandas tabulate mcp pydantic httpx\n```\n\n**Tools not showing up in Claude**\n1. Confirm the config file is valid JSON (no trailing commas).\n2. Fully quit and reopen Claude Desktop.\n3. Check the path in your config actually exists.\n\n**\"Error fetching data\"**\n- Check your internet connection.\n- Verify the ticker symbol (for example `AAPL`, not `Apple`).\n- Some smaller companies have limited data, and Yahoo Finance can be briefly unavailable.\n\n**Using a different model or provider (LiteLLM, OpenRouter, NVIDIA NIM, a local model)**\nThis server never talks to a model. Your client starts it as a local process and\nspeaks JSON-RPC over stdin/stdout, so changing `ANTHROPIC_BASE_URL` or swapping the\nmodel behind your client has no effect on it. If tools stop firing after a switch\nlike that, check two things: the model has to support function calling, and a proxy\nconfigured to drop unsupported parameters can silently strip your tool definitions,\nwhich produces no error at all. Run `/mcp` in your client (or `claude mcp list`) to\nconfirm the server is connected before suspecting the server.\n\n## 🛠️ Manual Installation (Alternative)\n\nIf you would rather run the Python file directly instead of via npx:\n\n**1. Download the server**\n\nSave `yahoo_finance_mcp.py` somewhere on your machine and install the dependencies:\n\n```bash\npip install yfinance curl_cffi pandas tabulate mcp pydantic httpx\n```\n\n(or `pip3` on macOS/Linux)\n\n**2. Point Claude Desktop at it**\n\n```json\n{\n  \"mcpServers\": {\n    \"yahoo-finance\": {\n      \"command\": \"python3\",\n      \"args\": [\"/absolute/path/to/yahoo_finance_mcp.py\"]\n    }\n  }\n}\n```\n\nOn Windows use `\"command\": \"python\"` and a path like `\"C:\\\\path\\\\to\\\\yahoo_finance_mcp.py\"` (double backslashes or forward slashes).\n\n**3. Restart Claude Desktop.**\n\n## 🔒 Privacy & Rate Limits\n\n- Uses the free Yahoo Finance API via the `yfinance` library.\n- Requests go straight to Yahoo Finance. Nothing is stored or proxied.\n- Yahoo Finance rate-limits roughly 2,000 requests/hour per IP.\n- Intended for personal, educational, and research use.\n\n## 📝 Notes\n\n- Use ticker symbols in uppercase (`AAPL`, `MSFT`, `TSLA`).\n- Some quotes may be delayed 15 to 20 minutes.\n- Financial statements are generally available for larger public companies.\n\n## 📋 Changelog\n\nSee [CHANGELOG.md](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**.\n\n## 📚 Resources\n\n- [Model Context Protocol](https://modelcontextprotocol.io/)\n- [yfinance documentation](https://ranaroussi.github.io/yfinance/)\n- [Python downloads](https://www.python.org/downloads/)\n- [Claude Desktop](https://claude.ai/download)\n\n## ⚖️ Legal Disclaimer\n\nThis 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.\n\n## 👤 Author\n\n**Daniel Shashko**\n- GitHub: [@danishashko](https://github.com/danishashko)\n- LinkedIn: [daniel-shashko](https://linkedin.com/in/daniel-shashko)\n- npm: [danielshashko](https://www.npmjs.com/~danielshashko)\n\n## 📄 License\n\nMIT © Daniel Shashko\n",
  "bytes": 10646,
  "sha": "4f88d22fcc7eb74fda4245aff9a1e438c134fc06211495bf1eec1e74eaa92238",
  "repo_slug": "danishashko/yahoo-finance-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_danishashko_yahoo_finance_mcp_232eb96e/readme"
}