/ 目錄 / 演練場 / yahoo-finance-mcp
● 社群 Alex2Yang97 ⚡ 即開即用

yahoo-finance-mcp

作者 Alex2Yang97 · Alex2Yang97/yahoo-finance-mcp

Free Yahoo Finance data from chat — historical prices, statements, options, analyst calls — no API key, no quota to manage.

yahoo-finance-mcp wraps the public yfinance library. It exposes OHLCV history, company info, financial statements, holders, options chains, and analyst recommendations. Perfect for casual research; not for production trading (Yahoo's data is best-effort, no SLA).

為什麼要用

核心特性

即時演示

實際使用效果

yahoo-finance.replay ▶ 就緒
0/0

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "yahoo-finance": {
      "command": "uvx",
      "args": [
        "yahoo-finance-mcp"
      ],
      "_inferred": true
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "yahoo-finance": {
      "command": "uvx",
      "args": [
        "yahoo-finance-mcp"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "yahoo-finance": {
      "command": "uvx",
      "args": [
        "yahoo-finance-mcp"
      ],
      "_inferred": true
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "yahoo-finance": {
      "command": "uvx",
      "args": [
        "yahoo-finance-mcp"
      ],
      "_inferred": true
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "yahoo-finance",
      "command": "uvx",
      "args": [
        "yahoo-finance-mcp"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "yahoo-finance": {
      "command": {
        "path": "uvx",
        "args": [
          "yahoo-finance-mcp"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add yahoo-finance -- uvx yahoo-finance-mcp

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: yahoo-finance-mcp

Get a quick snapshot on a stock

👤 Curious investors, finance students ⏱ ~3 min beginner

何時使用: You want a 30-second summary before reading deeper.

前置條件
  • yahoo-finance-mcp installed — uvx --from git+https://github.com/Alex2Yang97/yahoo-finance-mcp yahoo-finance-mcp
步驟
  1. Basic info
    Give me the current snapshot on NVDA — price, market cap, P/E, 52-week range.✓ 已複製
    → Clean data card
  2. Recent news
    Latest 5 news items on NVDA with headlines and publication dates.✓ 已複製
    → News feed
  3. Analyst view
    Show analyst recommendations trend and any rating changes in the last 60 days.✓ 已複製
    → Rating counts and recent changes

結果: A one-screen briefing for any ticker.

注意事項
  • Yahoo data is delayed/best-effort — don't use for real-time trading — For live decisions, use a paid data feed; this is for research
  • International tickers need exchange suffix (7203.T for Toyota) — Include the suffix explicitly when asking
搭配使用: notion

Compare fundamentals across several peers

👤 DIY investors doing homework ⏱ ~10 min intermediate

何時使用: You want a side-by-side before picking between similar names.

步驟
  1. Pull statements
    Compare MSFT, GOOGL, META on revenue growth, operating margin, and FCF for the last 4 annual filings.✓ 已複製
    → Comparison table
  2. Normalize
    Express everything as year-over-year % to make the comparison fair.✓ 已複製
    → Normalized view

結果: A peer comparison you can save for later.

Explore an options chain

👤 Options learners ⏱ ~10 min intermediate

何時使用: You want to see what contracts exist before paper-trading.

步驟
  1. List expirations
    Available option expirations for AAPL.✓ 已複製
    → Date list
  2. Pull a chain
    Get the AAPL options chain for the nearest monthly expiration. Calls only, strikes within 5% of spot.✓ 已複製
    → Filtered calls table

結果: A readable options view without an options-screener subscription.

Check dividend and split history

👤 Income-focused investors ⏱ ~5 min beginner

何時使用: Evaluating dividend consistency or adjusted-basis calculations.

步驟
  1. Pull actions
    Dividend and split history for KO for the last 20 years.✓ 已複製
    → Two timelines
  2. Assess consistency
    Any missed or cut dividends? Call it out.✓ 已複製
    → Narrative with specifics

結果: Data-grounded view of long-term dividend discipline.

組合

與其他 MCP 搭配,撬動十倍槓桿

yahoo-finance + notion

Build a watchlist dossier per ticker in Notion

For each ticker in my Notion Watchlist, pull the current snapshot + recent news + analyst ratings and append as a dated block.✓ 已複製
yahoo-finance + maverick

Pair Yahoo data with technical analysis from maverick-mcp

Get NVDA fundamentals from Yahoo and RSI/MACD from maverick-mcp; synthesize a pro/con memo.✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
get_historical_stock_prices ticker: str, period?: str, interval?: str Price history / backtests / charting 1 yahoo request
get_stock_info ticker: str Quick card on a stock 1 request
get_yahoo_finance_news ticker: str Headlines per ticker 1 request
get_stock_actions ticker: str Dividend/split timeline 1 request
get_financial_statement ticker: str, type: income|balance|cashflow, annual|quarterly Fundamentals research 1 request
get_holder_info ticker: str Institutional/insider analysis 1 request
get_option_expiration_dates ticker: str Options workflow setup 1 request
get_option_chain ticker: str, expiration: date Examine contracts for an expiry 1 request
get_recommendations ticker: str Sentiment cross-check 1 request

成本與限制

運行它的成本

API 配額
Yahoo's public endpoints are best-effort; no official published limit — don't hammer
每次呼叫 Token 數
200-2000 per response depending on depth
費用
Free
提示
Cache statement queries — they update quarterly, not hourly. Avoid polling.

安全

權限、密鑰、影響範圍

憑證儲存: None
資料出站: Queries to finance.yahoo.com (via yfinance library)

故障排查

常見錯誤與修復

Empty data for ticker

Ticker symbol wrong or delisted; try the exchange-suffixed form (e.g. TSLA vs 'TSLA.BA' for BA listing).

驗證: Search yahoo finance web for the ticker
429 Too Many Requests

yfinance hit Yahoo's informal limits. Back off 5 min; avoid tight loops.

ImportError on yfinance

Reinstall with uvx --upgrade — yfinance version lag is common.

驗證: uvx --from ... yahoo-finance-mcp --help

替代方案

yahoo-finance-mcp 對比其他方案

替代方案何時用它替代權衡
maverick-mcpYou want technical analysis, screens, backtesting on top of dataLarger surface; requires Tiingo key
Alpaca / IEX Cloud MCPsYou need real-time and a paid SLANot free; different data shape

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills