yahoo-finance-mcp-server 1.2.2 โ†’ 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,49 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.2.5] - 2026-08-06
9
+
10
+ ### Added
11
+
12
+ - Troubleshooting entry for running behind a non-Anthropic model or proxy
13
+ (LiteLLM, OpenRouter, NVIDIA NIM, local models). The server never talks to a
14
+ model, so the usual causes are a model without function calling, or a proxy
15
+ dropping unsupported parameters and silently stripping tool definitions.
16
+
17
+ ### Changed
18
+
19
+ - README section order now matches the other servers in this family:
20
+ Troubleshooting comes before Manual Installation.
21
+
22
+ ## [1.2.4] - 2026-07-30
23
+
24
+ ### Fixed
25
+
26
+ - Fresh installs no longer crash on startup. `requirements.txt` had no upper
27
+ bound on `mcp`, so after the MCP Python SDK 2.0.0 release (2026-07-28)
28
+ `pip install -r requirements.txt` pulled 2.x, which removed
29
+ `mcp.server.fastmcp` and made the server die with
30
+ `ModuleNotFoundError: No module named 'mcp.server.fastmcp'`. The requirement
31
+ is now `mcp>=1.2.0,<2`. Existing installs were unaffected (the launcher
32
+ caches its virtualenv per requirements hash).
33
+
34
+ ## [1.2.3] - 2026-06-06
35
+
36
+ ### Changed
37
+
38
+ - Enriched every tool description with purpose, when-to-use/disambiguation
39
+ guidance, and return/error behavior. This raises self-describing quality for
40
+ AI agents (and Glama's Tool Definition Quality score) while staying lean
41
+ (~140 tokens per tool); parameters remain self-documented via their field
42
+ descriptions.
43
+
44
+ ### Added
45
+
46
+ - `Dockerfile`, `.dockerignore`, and `glama.json` to support a containerized
47
+ Glama release (builds `python:3.12-slim`, runs the server over stdio as a
48
+ non-root user). Verified locally: the image builds and `tools/list` returns
49
+ all 13 tools.
50
+
8
51
  ## [1.2.2] - 2026-06-04
9
52
 
10
53
  ### Fixed
package/README.md CHANGED
@@ -1,200 +1,209 @@
1
- # Yahoo Finance MCP Server ๐Ÿ“ˆ
2
-
3
- [![npm version](https://img.shields.io/npm/v/yahoo-finance-mcp-server.svg)](https://www.npmjs.com/package/yahoo-finance-mcp-server)
4
- [![npm downloads](https://img.shields.io/npm/dm/yahoo-finance-mcp-server.svg)](https://www.npmjs.com/package/yahoo-finance-mcp-server)
5
- [![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
-
8
- 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.
9
-
10
- > **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.
11
-
12
- ## ๐ŸŽฏ What You Get
13
-
14
- - ๐Ÿ“Š **Real-time stock quotes** with full market data
15
- - ๐Ÿ“ˆ **Historical prices** (OHLCV) with summary statistics
16
- - ๐Ÿข **Company profiles**, officers, and key statistics
17
- - ๐Ÿ’ฐ **Financial statements** (income, balance sheet, cash flow)
18
- - ๐ŸŽฏ **Analyst ratings**, price targets, and the recent recommendation trend
19
- - โš–๏ธ **Multi-stock comparisons** side by side
20
- - ๐Ÿ“ฐ **Latest financial news** per ticker
21
- - ๐Ÿงพ **Options chains** (calls/puts, strikes, IV, open interest)
22
- - ๐Ÿฆ **Ownership data** โ€” institutional, mutual fund, and insider activity
23
- - ๐Ÿ’ต **Dividend & split history**
24
- - ๐Ÿ”ฎ **Forward analyst estimates** (price targets, EPS/revenue, growth)
25
- - ๐Ÿ”Ž **Symbol search** by company name or keyword
26
- - ๐Ÿ•’ **Market status** (open/closed) and index summary
27
-
28
- 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.
29
-
30
- ## ๐Ÿš€ Quick Start
31
-
32
- Add this to your Claude Desktop config and restart Claude:
33
-
34
- - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
35
- - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
36
-
37
- ```json
38
- {
39
- "mcpServers": {
40
- "yahoo-finance": {
41
- "command": "npx",
42
- "args": ["-y", "yahoo-finance-mcp-server"]
43
- }
44
- }
45
- }
46
- ```
47
-
48
- 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.
49
-
50
- ### Prefer a global install?
51
-
52
- ```bash
53
- npm install -g yahoo-finance-mcp-server
54
- ```
55
-
56
- ```json
57
- {
58
- "mcpServers": {
59
- "yahoo-finance": {
60
- "command": "yahoo-finance-mcp-server"
61
- }
62
- }
63
- }
64
- ```
65
-
66
- ## ๐Ÿ”ง Available Tools
67
-
68
- | Tool | What it returns | Parameters |
69
- |------|-----------------|------------|
70
- | `get_stock_quote` | Current price, change, day and 52-week range, volume, market cap, P/E, EPS, dividend yield | `ticker` |
71
- | `get_historical_prices` | OHLCV history with summary stats and total return | `ticker`, `period`, `interval` |
72
- | `get_company_info` | Business summary, key executives, valuation and financial highlights | `ticker` |
73
- | `get_financial_statements` | Annual income statement, balance sheet, and cash flow | `ticker` |
74
- | `compare_stocks` | Key metrics for multiple tickers side by side, plus quick insights | `tickers` (2 to 10) |
75
- | `get_analyst_recommendations` | Price targets, consensus, recommendation trend, and recent upgrades/downgrades | `ticker` |
76
- | `get_market_news` | Latest news headlines with source, date, summary, and link | `ticker`, `count` |
77
- | `get_options_chain` | Expiration dates, or the calls/puts chain (strike, bid/ask, volume, OI, IV) | `ticker`, `expiration_date`, `option_type` |
78
- | `get_holders` | Institutional, mutual-fund, or major holders, or insider transactions | `ticker`, `holder_type` |
79
- | `get_dividends_splits` | Dividend payment history (with summary) and stock-split history | `ticker` |
80
- | `get_analyst_estimates` | Forward price targets, EPS/revenue estimates by period, and growth estimates | `ticker` |
81
- | `search_symbols` | Find ticker symbols by company name or keyword | `query`, `count` |
82
- | `get_market_status` | Whether a market is open/closed, with timing and a major-index summary | `region` |
83
-
84
- Every tool also accepts `response_format` (`"markdown"`, the default, or `"json"`).
85
-
86
- **`get_historical_prices` options:**
87
-
88
- - `period`: `1d`, `5d`, `1mo`, `3mo`, `6mo`, `1y`, `2y`, `5y`, `10y`, `ytd`, `max`
89
- - `interval`: `1m`, `2m`, `5m`, `15m`, `30m`, `60m`, `90m`, `1h`, `1d`, `5d`, `1wk`, `1mo`, `3mo`
90
-
91
- **`get_options_chain`:** call without `expiration_date` to list available dates, then again with a date. `option_type` is `calls`, `puts`, or `both`.
92
-
93
- **`get_holders`:** `holder_type` is `institutional`, `mutualfund`, `major`, or `insider_transactions`.
94
-
95
- ## ๐Ÿ’ฌ Example Prompts
96
-
97
- Once the server is connected, just ask Claude:
98
-
99
- - "What's the current price of Apple stock?"
100
- - "Show me Amazon's stock performance over the last year"
101
- - "Tell me about Tesla as a company and who runs it"
102
- - "Show me Apple's income statement"
103
- - "Compare AAPL, MSFT, and GOOGL"
104
- - "What do analysts think about Amazon, and what's the price target?"
105
- - "What's the latest news on NVIDIA?"
106
- - "Show me the SPY call options expiring next month"
107
- - "Who are the biggest institutional holders of Apple?"
108
- - "What's Coca-Cola's dividend history?"
109
-
110
- ## ๐Ÿ› ๏ธ Manual Installation (Alternative)
111
-
112
- If you would rather run the Python file directly instead of via npx:
113
-
114
- **1. Download the server**
115
-
116
- Save `yahoo_finance_mcp.py` somewhere on your machine and install the dependencies:
117
-
118
- ```bash
119
- pip install yfinance curl_cffi pandas tabulate mcp pydantic httpx
120
- ```
121
-
122
- (or `pip3` on macOS/Linux)
123
-
124
- **2. Point Claude Desktop at it**
125
-
126
- ```json
127
- {
128
- "mcpServers": {
129
- "yahoo-finance": {
130
- "command": "python3",
131
- "args": ["/absolute/path/to/yahoo_finance_mcp.py"]
132
- }
133
- }
134
- }
135
- ```
136
-
137
- On Windows use `"command": "python"` and a path like `"C:\\path\\to\\yahoo_finance_mcp.py"` (double backslashes or forward slashes).
138
-
139
- **3. Restart Claude Desktop.**
140
-
141
- ## ๐Ÿ› Troubleshooting
142
-
143
- **"Command not found" / "Python not found"**
144
- Make sure Python and Node.js are installed and on your PATH. On macOS/Linux, try `python3` instead of `python` in the config.
145
-
146
- **"Module not found: yfinance" (manual install only)**
147
- Install the dependencies:
148
-
149
- ```bash
150
- pip install yfinance curl_cffi pandas tabulate mcp pydantic httpx
151
- ```
152
-
153
- **Tools not showing up in Claude**
154
- 1. Confirm the config file is valid JSON (no trailing commas).
155
- 2. Fully quit and reopen Claude Desktop.
156
- 3. Check the path in your config actually exists.
157
-
158
- **"Error fetching data"**
159
- - Check your internet connection.
160
- - Verify the ticker symbol (for example `AAPL`, not `Apple`).
161
- - Some smaller companies have limited data, and Yahoo Finance can be briefly unavailable.
162
-
163
- ## ๐Ÿ”’ Privacy & Rate Limits
164
-
165
- - Uses the free Yahoo Finance API via the `yfinance` library.
166
- - Requests go straight to Yahoo Finance. Nothing is stored or proxied.
167
- - Yahoo Finance rate-limits roughly 2,000 requests/hour per IP.
168
- - Intended for personal, educational, and research use.
169
-
170
- ## ๐Ÿ“ Notes
171
-
172
- - Use ticker symbols in uppercase (`AAPL`, `MSFT`, `TSLA`).
173
- - Some quotes may be delayed 15 to 20 minutes.
174
- - Financial statements are generally available for larger public companies.
175
-
176
- ## ๐Ÿ“‹ Changelog
177
-
178
- See [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**.
179
-
180
- ## ๐Ÿ“š Resources
181
-
182
- - [Model Context Protocol](https://modelcontextprotocol.io/)
183
- - [yfinance documentation](https://ranaroussi.github.io/yfinance/)
184
- - [Python downloads](https://www.python.org/downloads/)
185
- - [Claude Desktop](https://claude.ai/download)
186
-
187
- ## โš–๏ธ Legal Disclaimer
188
-
189
- 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.
190
-
191
- ## ๐Ÿ‘ค Author
192
-
193
- **Daniel Shashko**
194
- - GitHub: [@danishashko](https://github.com/danishashko)
195
- - LinkedIn: [daniel-shashko](https://linkedin.com/in/daniel-shashko)
196
- - npm: [danielshashko](https://www.npmjs.com/~danielshashko)
197
-
198
- ## ๐Ÿ“„ License
199
-
200
- MIT ยฉ Daniel Shashko
1
+ # Yahoo Finance MCP Server ๐Ÿ“ˆ
2
+
3
+ [![npm version](https://img.shields.io/npm/v/yahoo-finance-mcp-server.svg)](https://www.npmjs.com/package/yahoo-finance-mcp-server)
4
+ [![npm downloads](https://img.shields.io/npm/dm/yahoo-finance-mcp-server.svg)](https://www.npmjs.com/package/yahoo-finance-mcp-server)
5
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ 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.
9
+
10
+ > **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.
11
+
12
+ ## ๐ŸŽฏ What You Get
13
+
14
+ - ๐Ÿ“Š **Real-time stock quotes** with full market data
15
+ - ๐Ÿ“ˆ **Historical prices** (OHLCV) with summary statistics
16
+ - ๐Ÿข **Company profiles**, officers, and key statistics
17
+ - ๐Ÿ’ฐ **Financial statements** (income, balance sheet, cash flow)
18
+ - ๐ŸŽฏ **Analyst ratings**, price targets, and the recent recommendation trend
19
+ - โš–๏ธ **Multi-stock comparisons** side by side
20
+ - ๐Ÿ“ฐ **Latest financial news** per ticker
21
+ - ๐Ÿงพ **Options chains** (calls/puts, strikes, IV, open interest)
22
+ - ๐Ÿฆ **Ownership data** โ€” institutional, mutual fund, and insider activity
23
+ - ๐Ÿ’ต **Dividend & split history**
24
+ - ๐Ÿ”ฎ **Forward analyst estimates** (price targets, EPS/revenue, growth)
25
+ - ๐Ÿ”Ž **Symbol search** by company name or keyword
26
+ - ๐Ÿ•’ **Market status** (open/closed) and index summary
27
+
28
+ 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.
29
+
30
+ ## ๐Ÿš€ Quick Start
31
+
32
+ Add this to your Claude Desktop config and restart Claude:
33
+
34
+ - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
35
+ - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
36
+
37
+ ```json
38
+ {
39
+ "mcpServers": {
40
+ "yahoo-finance": {
41
+ "command": "npx",
42
+ "args": ["-y", "yahoo-finance-mcp-server"]
43
+ }
44
+ }
45
+ }
46
+ ```
47
+
48
+ 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.
49
+
50
+ ### Prefer a global install?
51
+
52
+ ```bash
53
+ npm install -g yahoo-finance-mcp-server
54
+ ```
55
+
56
+ ```json
57
+ {
58
+ "mcpServers": {
59
+ "yahoo-finance": {
60
+ "command": "yahoo-finance-mcp-server"
61
+ }
62
+ }
63
+ }
64
+ ```
65
+
66
+ ## ๐Ÿ”ง Available Tools
67
+
68
+ | Tool | What it returns | Parameters |
69
+ |------|-----------------|------------|
70
+ | `get_stock_quote` | Current price, change, day and 52-week range, volume, market cap, P/E, EPS, dividend yield | `ticker` |
71
+ | `get_historical_prices` | OHLCV history with summary stats and total return | `ticker`, `period`, `interval` |
72
+ | `get_company_info` | Business summary, key executives, valuation and financial highlights | `ticker` |
73
+ | `get_financial_statements` | Annual income statement, balance sheet, and cash flow | `ticker` |
74
+ | `compare_stocks` | Key metrics for multiple tickers side by side, plus quick insights | `tickers` (2 to 10) |
75
+ | `get_analyst_recommendations` | Price targets, consensus, recommendation trend, and recent upgrades/downgrades | `ticker` |
76
+ | `get_market_news` | Latest news headlines with source, date, summary, and link | `ticker`, `count` |
77
+ | `get_options_chain` | Expiration dates, or the calls/puts chain (strike, bid/ask, volume, OI, IV) | `ticker`, `expiration_date`, `option_type` |
78
+ | `get_holders` | Institutional, mutual-fund, or major holders, or insider transactions | `ticker`, `holder_type` |
79
+ | `get_dividends_splits` | Dividend payment history (with summary) and stock-split history | `ticker` |
80
+ | `get_analyst_estimates` | Forward price targets, EPS/revenue estimates by period, and growth estimates | `ticker` |
81
+ | `search_symbols` | Find ticker symbols by company name or keyword | `query`, `count` |
82
+ | `get_market_status` | Whether a market is open/closed, with timing and a major-index summary | `region` |
83
+
84
+ Every tool also accepts `response_format` (`"markdown"`, the default, or `"json"`).
85
+
86
+ **`get_historical_prices` options:**
87
+
88
+ - `period`: `1d`, `5d`, `1mo`, `3mo`, `6mo`, `1y`, `2y`, `5y`, `10y`, `ytd`, `max`
89
+ - `interval`: `1m`, `2m`, `5m`, `15m`, `30m`, `60m`, `90m`, `1h`, `1d`, `5d`, `1wk`, `1mo`, `3mo`
90
+
91
+ **`get_options_chain`:** call without `expiration_date` to list available dates, then again with a date. `option_type` is `calls`, `puts`, or `both`.
92
+
93
+ **`get_holders`:** `holder_type` is `institutional`, `mutualfund`, `major`, or `insider_transactions`.
94
+
95
+ ## ๐Ÿ’ฌ Example Prompts
96
+
97
+ Once the server is connected, just ask Claude:
98
+
99
+ - "What's the current price of Apple stock?"
100
+ - "Show me Amazon's stock performance over the last year"
101
+ - "Tell me about Tesla as a company and who runs it"
102
+ - "Show me Apple's income statement"
103
+ - "Compare AAPL, MSFT, and GOOGL"
104
+ - "What do analysts think about Amazon, and what's the price target?"
105
+ - "What's the latest news on NVIDIA?"
106
+ - "Show me the SPY call options expiring next month"
107
+ - "Who are the biggest institutional holders of Apple?"
108
+ - "What's Coca-Cola's dividend history?"
109
+
110
+ ## ๐Ÿ› Troubleshooting
111
+
112
+ **"Command not found" / "Python not found"**
113
+ Make sure Python and Node.js are installed and on your PATH. On macOS/Linux, try `python3` instead of `python` in the config.
114
+
115
+ **"Module not found: yfinance" (manual install only)**
116
+ Install the dependencies:
117
+
118
+ ```bash
119
+ pip install yfinance curl_cffi pandas tabulate mcp pydantic httpx
120
+ ```
121
+
122
+ **Tools not showing up in Claude**
123
+ 1. Confirm the config file is valid JSON (no trailing commas).
124
+ 2. Fully quit and reopen Claude Desktop.
125
+ 3. Check the path in your config actually exists.
126
+
127
+ **"Error fetching data"**
128
+ - Check your internet connection.
129
+ - Verify the ticker symbol (for example `AAPL`, not `Apple`).
130
+ - Some smaller companies have limited data, and Yahoo Finance can be briefly unavailable.
131
+
132
+ **Using a different model or provider (LiteLLM, OpenRouter, NVIDIA NIM, a local model)**
133
+ This server never talks to a model. Your client starts it as a local process and
134
+ speaks JSON-RPC over stdin/stdout, so changing `ANTHROPIC_BASE_URL` or swapping the
135
+ model behind your client has no effect on it. If tools stop firing after a switch
136
+ like that, check two things: the model has to support function calling, and a proxy
137
+ configured to drop unsupported parameters can silently strip your tool definitions,
138
+ which produces no error at all. Run `/mcp` in your client (or `claude mcp list`) to
139
+ confirm the server is connected before suspecting the server.
140
+
141
+ ## ๐Ÿ› ๏ธ Manual Installation (Alternative)
142
+
143
+ If you would rather run the Python file directly instead of via npx:
144
+
145
+ **1. Download the server**
146
+
147
+ Save `yahoo_finance_mcp.py` somewhere on your machine and install the dependencies:
148
+
149
+ ```bash
150
+ pip install yfinance curl_cffi pandas tabulate mcp pydantic httpx
151
+ ```
152
+
153
+ (or `pip3` on macOS/Linux)
154
+
155
+ **2. Point Claude Desktop at it**
156
+
157
+ ```json
158
+ {
159
+ "mcpServers": {
160
+ "yahoo-finance": {
161
+ "command": "python3",
162
+ "args": ["/absolute/path/to/yahoo_finance_mcp.py"]
163
+ }
164
+ }
165
+ }
166
+ ```
167
+
168
+ On Windows use `"command": "python"` and a path like `"C:\\path\\to\\yahoo_finance_mcp.py"` (double backslashes or forward slashes).
169
+
170
+ **3. Restart Claude Desktop.**
171
+
172
+ ## ๐Ÿ”’ Privacy & Rate Limits
173
+
174
+ - Uses the free Yahoo Finance API via the `yfinance` library.
175
+ - Requests go straight to Yahoo Finance. Nothing is stored or proxied.
176
+ - Yahoo Finance rate-limits roughly 2,000 requests/hour per IP.
177
+ - Intended for personal, educational, and research use.
178
+
179
+ ## ๐Ÿ“ Notes
180
+
181
+ - Use ticker symbols in uppercase (`AAPL`, `MSFT`, `TSLA`).
182
+ - Some quotes may be delayed 15 to 20 minutes.
183
+ - Financial statements are generally available for larger public companies.
184
+
185
+ ## ๐Ÿ“‹ Changelog
186
+
187
+ See [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**.
188
+
189
+ ## ๐Ÿ“š Resources
190
+
191
+ - [Model Context Protocol](https://modelcontextprotocol.io/)
192
+ - [yfinance documentation](https://ranaroussi.github.io/yfinance/)
193
+ - [Python downloads](https://www.python.org/downloads/)
194
+ - [Claude Desktop](https://claude.ai/download)
195
+
196
+ ## โš–๏ธ Legal Disclaimer
197
+
198
+ 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.
199
+
200
+ ## ๐Ÿ‘ค Author
201
+
202
+ **Daniel Shashko**
203
+ - GitHub: [@danishashko](https://github.com/danishashko)
204
+ - LinkedIn: [daniel-shashko](https://linkedin.com/in/daniel-shashko)
205
+ - npm: [danielshashko](https://www.npmjs.com/~danielshashko)
206
+
207
+ ## ๐Ÿ“„ License
208
+
209
+ MIT ยฉ Daniel Shashko
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yahoo-finance-mcp-server",
3
- "version": "1.2.2",
3
+ "version": "1.2.5",
4
4
  "mcpName": "io.github.danishashko/yahoo-finance-mcp",
5
5
  "description": "Yahoo Finance MCP Server - Real-time stock data, company info, financial statements, and market analysis via Model Context Protocol",
6
6
  "main": "bin/cli.js",
package/requirements.txt CHANGED
@@ -1,10 +1,11 @@
1
- # Yahoo Finance MCP Server Requirements
2
- # Install all dependencies with: pip install -r requirements.txt
3
-
4
- yfinance>=0.2.61
5
- curl_cffi>=0.7.0
6
- pandas>=1.5.0
7
- tabulate>=0.9.0
8
- mcp>=1.2.0
9
- pydantic>=2.0.0
10
- httpx>=0.24.0
1
+ # Yahoo Finance MCP Server Requirements
2
+ # Install all dependencies with: pip install -r requirements.txt
3
+
4
+ yfinance>=0.2.61
5
+ curl_cffi>=0.7.0
6
+ pandas>=1.5.0
7
+ tabulate>=0.9.0
8
+ # Pinned below 2.0: the v2 SDK removed mcp.server.fastmcp, which this server uses.
9
+ mcp>=1.2.0,<2
10
+ pydantic>=2.0.0
11
+ httpx>=0.24.0
package/server.json CHANGED
@@ -1,21 +1,23 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.danishashko/yahoo-finance-mcp",
4
- "description": "Real-time stock market data from Yahoo Finance: quotes, history, financials, analyst ratings, options, holders, dividends, news, and market status.",
4
+ "description": "Real-time Yahoo Finance data: quotes, history, financials, analyst ratings, options, and news.",
5
5
  "title": "Yahoo Finance",
6
6
  "repository": {
7
7
  "url": "https://github.com/danishashko/yahoo-finance-mcp",
8
8
  "source": "github"
9
9
  },
10
- "version": "1.2.2",
10
+ "version": "1.2.5",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "registryBaseUrl": "https://registry.npmjs.org",
15
15
  "identifier": "yahoo-finance-mcp-server",
16
- "version": "1.2.2",
16
+ "version": "1.2.5",
17
17
  "runtimeHint": "npx",
18
- "transport": { "type": "stdio" }
18
+ "transport": {
19
+ "type": "stdio"
20
+ }
19
21
  }
20
22
  ]
21
23
  }
@@ -302,7 +302,12 @@ async def get_stock_quote(
302
302
  ),
303
303
  ] = ResponseFormat.MARKDOWN,
304
304
  ) -> str:
305
- """Current stock quote: price, change, day/52-week range, volume, market cap, P/E, EPS, dividend yield. Use for "what's the price of [stock]"."""
305
+ """Real-time quote snapshot for ONE stock: last price, day change ($ and %), open, previous close, day range, 52-week range, volume and average volume, market cap, beta, trailing P/E, EPS, dividend yield, and sector/industry/website.
306
+
307
+ Use for "what's the price of X" or a quick single-stock snapshot. For several stocks side by side use compare_stocks; for the full company profile use get_company_info; for a past price series use get_historical_prices.
308
+
309
+ Returns Markdown by default, or structured JSON when response_format='json'. An unknown ticker or an upstream/rate-limit error returns a short error message rather than raising.
310
+ """
306
311
  ticker = _norm_ticker(ticker)
307
312
  try:
308
313
  ticker_obj = make_ticker(ticker)
@@ -439,7 +444,12 @@ async def get_historical_prices(
439
444
  ),
440
445
  ] = ResponseFormat.MARKDOWN,
441
446
  ) -> str:
442
- """Historical OHLCV price data with summary stats and total return, for trends/charting. Use for "how has [stock] performed over [period]"."""
447
+ """Historical OHLCV price series for one stock over a chosen period/interval, plus summary stats (highest/lowest/average close, average volume) and total return over the window.
448
+
449
+ Use for performance, trends, or charting ("how has X done over the last year"). For a single current price use get_stock_quote; for dividend/split events use get_dividends_splits. Note: intraday intervals (1m-90m) are only available for short recent periods, and long periods return many rows, so prefer JSON or a shorter period if the output is truncated.
450
+
451
+ Returns Markdown (summary stats plus the last 10 rows) by default, or the full series as JSON when response_format='json'. An empty or unsupported period/interval combination returns a short message.
452
+ """
443
453
  ticker = _norm_ticker(ticker)
444
454
  try:
445
455
  ticker_obj = make_ticker(ticker)
@@ -533,7 +543,12 @@ async def get_company_info(
533
543
  ),
534
544
  ] = ResponseFormat.MARKDOWN,
535
545
  ) -> str:
536
- """Company profile: business summary, executives, valuation and financial-highlight stats. Use for "what does [company] do" or company background."""
546
+ """Detailed company profile for one stock: long business summary, sector/industry, key executives, headquarters/website/employee count, and valuation & financial-highlight stats (market cap, P/E, margins, and similar).
547
+
548
+ Use for "what does X do", company background, or a business overview. For the statement-level numbers (income/balance/cash flow) use get_financial_statements; for just the live price use get_stock_quote.
549
+
550
+ Returns Markdown by default, or JSON when response_format='json'. An unknown ticker or upstream error returns a short error message.
551
+ """
537
552
  ticker = _norm_ticker(ticker)
538
553
  try:
539
554
  ticker_obj = make_ticker(ticker)
@@ -655,7 +670,12 @@ async def get_financial_statements(
655
670
  ),
656
671
  ] = ResponseFormat.MARKDOWN,
657
672
  ) -> str:
658
- """Annual income statement, balance sheet, and cash flow. Use for revenue, earnings, assets/liabilities, or fundamental analysis."""
673
+ """Annual financial statements for one company: income statement, balance sheet, and cash flow statement, each with multiple years of data.
674
+
675
+ Use for revenue, earnings, assets/liabilities, cash flow, or fundamental analysis. For headline ratios only use get_company_info; for forward projections use get_analyst_estimates. Quarterly data is not returned; request JSON for the complete machine-readable export.
676
+
677
+ Returns Markdown by default, or JSON when response_format='json'. Companies without filed statements (for example some ETFs or ADRs) return empty sections or a short message.
678
+ """
659
679
  ticker = _norm_ticker(ticker)
660
680
  try:
661
681
  ticker_obj = make_ticker(ticker)
@@ -740,7 +760,12 @@ async def compare_stocks(
740
760
  ),
741
761
  ] = ResponseFormat.MARKDOWN,
742
762
  ) -> str:
743
- """Compare key metrics for 2-10 stocks side by side, with quick insights. Use for "which is better, X or Y" or relative performance."""
763
+ """Side-by-side comparison of 2-10 stocks across key metrics (price, market cap, P/E, EPS, dividend yield, 52-week range, and period performance) with brief auto-generated insights.
764
+
765
+ Use for "which is better, X or Y", peer/relative comparison, or screening a small set. For a deep dive on a single name use get_stock_quote or get_company_info.
766
+
767
+ Pass 2-10 tickers in the tickers list. Returns a Markdown comparison table by default, or JSON when response_format='json'. A ticker that fails to resolve is reported per-symbol rather than failing the whole call.
768
+ """
744
769
  tickers = [_norm_ticker(t) for t in tickers]
745
770
  try:
746
771
  comparison_data = []
@@ -841,7 +866,12 @@ async def get_analyst_recommendations(
841
866
  ),
842
867
  ] = ResponseFormat.MARKDOWN,
843
868
  ) -> str:
844
- """Analyst price targets, consensus rating, recommendation trend, and recent upgrades/downgrades. Use for "what do analysts think of [stock]". For forward EPS/revenue estimates use get_analyst_estimates."""
869
+ """Wall Street analyst view on one stock: price targets (high/mean/low), consensus rating, the buy/hold/sell recommendation-trend breakdown, and recent upgrades/downgrades.
870
+
871
+ Use for "what do analysts think of X", ratings, or sentiment. For forward EPS/revenue/growth projections use get_analyst_estimates instead: this tool is ratings and targets, that one is the numeric estimates.
872
+
873
+ Returns Markdown by default, or JSON when response_format='json'. A stock with no analyst coverage returns the available fields as N/A; errors return a short message.
874
+ """
845
875
  ticker = _norm_ticker(ticker)
846
876
  try:
847
877
  ticker_obj = make_ticker(ticker)
@@ -981,7 +1011,12 @@ async def get_market_news(
981
1011
  ),
982
1012
  ] = ResponseFormat.MARKDOWN,
983
1013
  ) -> str:
984
- """Latest news headlines for a stock (source, date, summary, link). Use for "what's the latest news on [stock]"."""
1014
+ """Latest news articles for one stock; each item has a title, publisher/source, publish date, a short summary, and a link.
1015
+
1016
+ Use for "what's the latest news on X", recent headlines, or catalysts. Returns news only: for price use get_stock_quote, for fundamentals use the financials tools.
1017
+
1018
+ count sets how many articles to return (1-20, default 10). Returns Markdown by default, or JSON when response_format='json'. No recent news returns a short message.
1019
+ """
985
1020
  ticker = _norm_ticker(ticker)
986
1021
  try:
987
1022
  articles = make_ticker(ticker).get_news(count=count) or []
@@ -1085,7 +1120,12 @@ async def get_options_chain(
1085
1120
  ),
1086
1121
  ] = ResponseFormat.MARKDOWN,
1087
1122
  ) -> str:
1088
- """Options chain (strike, bid/ask, volume, open interest, IV) for an expiration. Call with no expiration_date first to list available dates, then again with a date."""
1123
+ """Equity options data for one underlying, in two modes: call with no expiration_date to LIST every available expiration date; call again with a specific 'YYYY-MM-DD' to get that expiration's chain (strike, bid/ask, last, volume, open interest, implied volatility).
1124
+
1125
+ Use for options pricing, implied volatility, or open-interest analysis. option_type selects 'calls', 'puts', or 'both'. Always discover the valid dates first (call with no date) before requesting a chain, since only listed expirations work.
1126
+
1127
+ Returns Markdown by default, or JSON when response_format='json'. A ticker with no listed options returns a short message.
1128
+ """
1089
1129
  ticker = _norm_ticker(ticker)
1090
1130
  try:
1091
1131
  t = make_ticker(ticker)
@@ -1178,7 +1218,12 @@ async def get_holders(
1178
1218
  ),
1179
1219
  ] = ResponseFormat.MARKDOWN,
1180
1220
  ) -> str:
1181
- """Stock ownership and insider activity by holder_type: institutional, mutualfund, major (insider-vs-institutional %), or insider_transactions."""
1221
+ """Ownership and insider activity for one stock, selected by holder_type: 'institutional' (top institutional holders), 'mutualfund' (top fund holders), 'major' (insider-vs-institutional ownership % breakdown), or 'insider_transactions' (recent insider buys and sells).
1222
+
1223
+ Use for "who owns X", institutional ownership, or insider trading activity. One holder_type per call: call again to get a different view.
1224
+
1225
+ Returns Markdown by default, or JSON when response_format='json'. Missing data for the chosen category returns a short message.
1226
+ """
1182
1227
  ticker = _norm_ticker(ticker)
1183
1228
  try:
1184
1229
  t = make_ticker(ticker)
@@ -1249,7 +1294,12 @@ async def get_dividends_splits(
1249
1294
  ),
1250
1295
  ] = ResponseFormat.MARKDOWN,
1251
1296
  ) -> str:
1252
- """Dividend payment history (with trailing summary) and stock-split history for a stock."""
1297
+ """Full dividend payment history (with a trailing-period summary) and the stock-split history for one stock.
1298
+
1299
+ Use for dividend-income analysis, payment dates and amounts, dividend growth, or past split events. For the current/forward dividend yield use get_stock_quote; for price history use get_historical_prices.
1300
+
1301
+ Returns Markdown by default, or JSON when response_format='json'. A stock that pays no dividend or has never split returns a short message noting that none exist.
1302
+ """
1253
1303
  ticker = _norm_ticker(ticker)
1254
1304
  try:
1255
1305
  t = make_ticker(ticker)
@@ -1344,7 +1394,12 @@ async def get_analyst_estimates(
1344
1394
  ),
1345
1395
  ] = ResponseFormat.MARKDOWN,
1346
1396
  ) -> str:
1347
- """Forward analyst estimates: price targets, EPS/revenue estimates by period, and growth. Complements get_analyst_recommendations (ratings/trend) with projected numbers."""
1397
+ """Forward-looking analyst estimates for one stock: price targets, EPS and revenue estimates by period (current and next quarter and year), and growth estimates.
1398
+
1399
+ Use for projected/expected numbers and forecasts. This complements get_analyst_recommendations: that tool returns ratings and the recommendation trend, this one returns the numeric forward estimates.
1400
+
1401
+ Returns Markdown by default, or JSON when response_format='json'. A stock without analyst coverage returns the available fields as N/A or a short message.
1402
+ """
1348
1403
  ticker = _norm_ticker(ticker)
1349
1404
  try:
1350
1405
  t = make_ticker(ticker)
@@ -1447,7 +1502,12 @@ async def search_symbols(
1447
1502
  ),
1448
1503
  ] = ResponseFormat.MARKDOWN,
1449
1504
  ) -> str:
1450
- """Find ticker symbols by company name or keyword. Use to resolve a name to a ticker before calling other tools."""
1505
+ """Resolve a company name or keyword to ticker symbols; each match returns the symbol, name, exchange, and instrument type (equity, ETF, and so on).
1506
+
1507
+ Use this first when you have a company or brand name but not its ticker, then pass the resolved symbol to the other tools. Not for fetching prices or fundamentals.
1508
+
1509
+ query is the name/keyword to search; count caps the number of matches (1-20, default 8). Returns Markdown by default, or JSON when response_format='json'. No matches returns a short message.
1510
+ """
1451
1511
  query = query.strip()
1452
1512
  try:
1453
1513
  session = _get_session()
@@ -1523,7 +1583,12 @@ async def get_market_status(
1523
1583
  ),
1524
1584
  ] = ResponseFormat.MARKDOWN,
1525
1585
  ) -> str:
1526
- """Whether a market (by region code, e.g. US/GB/JP) is open or closed, with timing and a major-index summary."""
1586
+ """Whether a stock market is currently open or closed for a given region, with trading-session timing and a summary of that region's major indices.
1587
+
1588
+ Use for "is the US market open", market hours, or a quick index overview. region is a country code (US, GB, CA, DE, FR, IN, JP, HK, AU; default US). This is market-wide, not per-stock: use get_stock_quote for an individual price.
1589
+
1590
+ Returns Markdown by default, or JSON when response_format='json'. An unrecognized region returns a short message.
1591
+ """
1527
1592
  region = region.strip().upper()
1528
1593
  try:
1529
1594
  session = _get_session()