rizkydwicmt

Yfinance

資料分析v0.1.2
作者:rizkydwicmt更新於 2026-05-11共 3 個版本 · 最新版本釋出於 2026-02-17yfinance-mcp-server@clawhub_rizkydwicmt/yfinance-mcp-server
資料洞察網頁抓取#News#Stock

據 AlphaMoat 統計,截至 2026-09,Yfinance 累計下載 2,115 次、獲 7 個星標,在全部 5,078 個 AI 技能中排名第 4,350 位,在「資料分析」分類(399 個)中排名第 332 位。

累計安裝
123
累計下載
2115
星標
7
全站排名
#4,350
全站前 86% · 「資料分析」前 84%
平台累計安裝累計下載星標評論
ClawHub ↗5419277-
SkillHub ↗12321157—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

文件列出股票價格、歷史行情、公司財務、期權、股息、新聞、市場異動和篩選工具。安裝流程可能執行遠端程式碼並更改本地配置;使用前應審查並固定 MCP 服務來源和版本,確認配置寫入,並將結果用於資訊研究而非直接視為投資建議。

資料釋出於 2026-10-29

可以用來做什麼

  • 查詢證券價格和歷史行情
  • 檢視公司基本面、期權或股息資料
  • 篩選市場資訊並整理研究線索

什麼時候用

  • 需要透過 Yahoo Finance 資料進行研究,且已審查服務安裝來源與本地配置變更時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

只說明如何查詢某個股票程式碼的歷史資料,不安裝 MCP 服務或更改配置。
列出啟用 YFinance MCP 前需要確認的程式碼來源、版本和配置寫入。

月度資料趨勢

累計下載2115
682145222212026-03 · 累計下載 7882026-05 · 累計下載 12462026-06 · 累計下載 14142026-07 · 累計下載 16662026-08 · 累計下載 18132026-09 · 累計下載 211526-0326-09
星標7
6772026-03 · 星標 62026-05 · 星標 62026-06 · 星標 72026-07 · 星標 72026-08 · 星標 72026-09 · 星標 726-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-092115—7
2026-081813+8.8%7
2026-071666+17.8%7
2026-061414+13.5%7
2026-051246—6
2026-03788—6

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

7.3 KB · ClawHub v0.1.2
---
name: yfinance
description: Access Yahoo Finance data — stock prices, history, financials, options, dividends, news, and market screeners
---

# YFinance MCP Server

Access real-time and historical financial data from Yahoo Finance. This MCP server provides 12 tools covering stock prices, company fundamentals, analyst recommendations, options chains, dividends, market movers, and news.

## Available Tools
展開全部(共 234 行)

### Stock Data (7 tools)

#### `tool_get_stock_price` — Current Price & Trading Metrics
```
tool_get_stock_price(symbol: "AAPL")
tool_get_stock_price(symbol: "BBCA.JK")
```
Returns: current price, change %, open, day high/low, volume, 52-week range, market cap, P/E, dividend yield, direction (▲/▼).

#### `tool_get_stock_info` — Company Details
```
tool_get_stock_info(symbol: "MSFT")
```
Returns: sector, industry, full name, market cap, P/E, P/B, profit margins, revenue growth, analyst price targets, business description.

#### `tool_get_history` — Historical OHLCV Data
```
tool_get_history(symbol: "AAPL", period: "1mo", interval: "1d")
tool_get_history(symbol: "BBCA.JK", period: "1y", interval: "1wk")
tool_get_history(symbol: "BTC-USD", period: "5y", interval: "1mo")
```
- **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`

#### `tool_get_financials` — Financial Statements
```
tool_get_financials(symbol: "AAPL", statement_type: "income", quarterly: false)
tool_get_financials(symbol: "MSFT", statement_type: "balance_sheet", quarterly: true)
tool_get_financials(symbol: "GOOG", statement_type: "all")
```
- **statement_type**: `income`, `balance_sheet`, `cash_flow`, `all`

#### `tool_get_recommendations` — Analyst Ratings
```
tool_get_recommendations(symbol: "TSLA")
```
Returns: recommendation trends (strongBuy, buy, hold, sell, strongSell), price targets (low, mean, median, high), and recent upgrades/downgrades.

#### `tool_get_options` — Options Chain
```
tool_get_options(symbol: "AAPL")
tool_get_options(symbol: "TSLA", expiration: "2025-03-21")
```
Returns: calls and puts with strike, last price, bid, ask, volume, open interest, implied volatility. Lists available expiration dates.

#### `tool_get_dividends` — Dividend History
```
tool_get_dividends(symbol: "JNJ")
tool_get_dividends(symbol: "BBCA.JK")
```
Returns: current yield, ex-date, payment rate, and historical dividend payments.

---

### Market Analysis (3 tools)

#### `tool_compare_stocks` — Side-by-Side Comparison
```
tool_compare_stocks(symbols: "AAPL,MSFT,GOOG")
tool_compare_stocks(symbols: "BBCA.JK BBRI.JK BMRI.JK")
```
Compares up to 10 stocks on: price, change %, market cap, P/E, dividend yield, margins, revenue growth, analyst rating. Symbols can be comma or space separated.

#### `tool_get_market_movers` — Top Movers
```
tool_get_market_movers(mover_type: "gainers")
tool_get_market_movers(mover_type: "losers")
tool_get_market_movers(mover_type: "most_active")
```

#### `tool_screen_stocks` — Stock Screener
```
tool_screen_stocks(sector: "Technology", min_market_cap: 1000000000)
tool_screen_stocks(max_pe_ratio: 15, min_dividend_yield: 0.03)
tool_screen_stocks(sector: "Healthcare", exchange: "NMS")
```
All filters are optional and combinable:
- **sector**: `Technology`, `Healthcare`, `Financial Services`, `Energy`, etc.
- **min_market_cap**: in USD (e.g., `1000000000` = $1B)
- **max_pe_ratio**: max trailing P/E (e.g., `25`)
- **min_dividend_yield**: as decimal (e.g., `0.03` = 3%)
- **exchange**: `NMS` (NASDAQ), `NYQ` (NYSE), etc.

---

### Search & News (2 tools)

#### `tool_search_stocks` — Find Tickers
```
tool_search_stocks(query: "Apple", max_results: 5)
tool_search_stocks(query: "semiconductor ETF")
tool_search_stocks(query: "bank indonesia")
```
Searches stocks, ETFs, mutual funds, indices by name, ticker, or keyword.

#### `tool_get_news` — Latest News
```
tool_get_news(symbol: "AAPL", max_items: 5)
tool_get_news(symbol: "TSLA")
```
Returns: title, publisher, link, publish time, and thumbnail for each article.

---

## Supported Markets

This server works with **any ticker supported by Yahoo Finance**:

| Market | Examples |
|--------|----------|
| US Stocks | AAPL, MSFT, GOOG, TSLA, AMZN |
| Indonesia (IDX) | BBCA.JK, BBRI.JK, TLKM.JK, BMRI.JK |
| Japan (TSE) | 7203.T (Toyota), 6758.T (Sony) |
| UK (LSE) | SHEL.L, AZN.L, HSBA.L |
| Hong Kong (HKEX) | 0700.HK (Tencent), 9988.HK (Alibaba) |
| ETFs | SPY, QQQ, VTI, VOO, ARKK |
| Crypto | BTC-USD, ETH-USD, SOL-USD |
| Indices | ^GSPC (S&P 500), ^IXIC (NASDAQ), ^JKSE (IDX) |
| Forex | USDIDR=X, EURUSD=X, GBPUSD=X |

## Common Usage Patterns

### Investment Research
1. `tool_search_stocks` → find the ticker
2. `tool_get_stock_info` → understand the company
3. `tool_get_financials` → analyze fundamentals
4. `tool_get_recommendations` → check analyst sentiment
5. `tool_get_history` → review price trends

### Portfolio Monitoring
1. `tool_compare_stocks` → compare your holdings
2. `tool_get_stock_price` → check current prices
3. `tool_get_news` → stay updated on each position

### Market Discovery
1. `tool_get_market_movers` → find trending stocks
2. `tool_screen_stocks` → filter by criteria
3. `tool_get_stock_info` → deep dive on candidates

---

## Installation

### Quick Install (install.sh)

The included `install.sh` automates everything — uv setup, Python 3.12 venv, package install, mcporter config, and OpenClaw skill registration:

```bash
# Clone the repository on your server
git clone https://github.com/rizkydwicmt/yfinance-mcp-server.git
cd yfinance-mcp-server

# Run the installer
chmod +x install.sh
./install.sh
```

The installer will:
1. ✅ Check for `pyproject.toml` in the project directory
2. ✅ Install `uv` if not already present
3. ✅ Create a Python 3.12 virtual environment
4. ✅ Install `yfinance-mcp-server` + all dependencies
5. ✅ Verify all 12 tools load correctly
6. ✅ Add `yfinance` to your mcporter config (auto-detected)
7. ✅ Install `SKILL.md` to OpenClaw skills directory

### Environment Variables

Customize the installer behavior with environment variables:

```bash
# Change project location
YFINANCE_PROJECT_DIR=/opt/mcp/yfinance ./install.sh

# Use a different Python version
YFINANCE_PYTHON_VERSION=3.11 ./install.sh

# Custom venv location
YFINANCE_VENV_DIR=/opt/venvs/yfinance ./install.sh

# Specify mcporter config path
MCPORTER_CONFIG=/etc/clawd/mcporter.json ./install.sh

# Custom OpenClaw directory
CLAWD_DIR=/opt/clawd ./install.sh

# Skip mcporter / skill steps
SKIP_MCPORTER=true ./install.sh
SKIP_SKILL=true ./install.sh
```

### Manual Install

```bash
# 1. Clone repository
git clone https://github.com/rizkydwicmt/yfinance-mcp-server.git
cd yfinance-mcp-server

# 2. Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# 3. Create venv + install
uv venv .venv --python 3.12
uv pip install -e . --python .venv/bin/python

# 4. Add to mcporter.json
# {"mcpServers": {"yfinance": {"command": "/path/to/.venv/bin/yfin-mcp"}}}

# 5. Install skill
mkdir -p ${CLAWD_DIR}/skills/yfinance
cp SKILL.md ${CLAWD_DIR}/skills/yfinance/SKILL.md
```

### Verify

```bash
# Check tools load
mcporter --config ${CLAWD_DIR}/config/mcporter.json list yfinance --schema

# Live test
mcporter --config ${CLAWD_DIR}/config/mcporter.json call yfinance.tool_get_stock_price symbol=AAPL
```

「資料分析」分類下的熱門技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。