/ ディレクトリ / プレイグラウンド / YFinance MCP
● コミュニティ narumiruna ⚡ 即起動

YFinance MCP

作者 narumiruna · narumiruna/yfinance-mcp

Yahoo Finance via MCP — quotes, fundamentals, historical OHLC, options chains, news for any ticker, free.

Wraps the yfinance Python package as an MCP. No API key. Good for prototyping finance agents, backtesting ideas, or enriching research prompts with real market data. Data is delayed and rate-limited — not for production trading.

なぜ使うのか

主な機能

ライブデモ

実際の動作

yfinance-mcp.replay ▶ 準備完了
0/0

インストール

クライアントを選択

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

Claude Desktop → Settings → Developer → Edit Config を開く。保存後、アプリを再起動。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "yfinance-mcp": {
      "command": "uvx",
      "args": [
        "yfinance-mcp"
      ]
    }
  }
}

Cursor は Claude Desktop と同じ mcpServers スキーマを使用。プロジェクト設定はグローバルより優先。

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

Cline サイドバーの MCP Servers アイコンをクリックし、"Edit Configuration" を選択。

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

Claude Desktop と同じ形式。Windsurf を再起動して反映。

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

Continue はマップではなくサーバーオブジェクトの配列を使用。

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

context_servers に追加。保存時に Zed がホットリロード。

claude mcp add yfinance-mcp -- uvx yfinance-mcp

ワンライナー。claude mcp list で確認、claude mcp remove で削除。

ユースケース

実用的な使い方: YFinance MCP

Quick snapshot of your watchlist — prices, P/E, news

👤 Investors doing daily check-ins ⏱ ~5 min beginner

使うタイミング: You want a one-prompt briefing on 10 tickers before market open.

フロー
  1. Prices
    Use yfinance-mcp. For AAPL, MSFT, NVDA, TSLA, GOOGL, AMZN, META, BRK-B, JPM, V — current price, 1d %, 52w range.✓ コピーしました
    → Clean table with all 10 rows
  2. Fundamentals
    For the same list, P/E, forward P/E, EPS, and dividend yield.✓ コピーしました
    → Fundamentals aligned with prior table
  3. News
    For the 3 biggest movers today, pull the 3 most recent headlines each. Summarize the vibe.✓ コピーしました
    → News grouped by ticker with 1-line vibe

結果: A 10-line morning brief tailored to your watchlist.

注意点
  • Rate-limited if you batch too many tickers at once — Chunk to 10 per call, sleep 1s between
組み合わせ: memory

Backtest a simple strategy idea on historical prices

👤 Retail traders prototyping ⏱ ~20 min intermediate

使うタイミング: You have an idea like "buy SPY when RSI < 30, sell at > 70" and want a quick historical sanity check.

フロー
  1. Pull history
    Pull 5y daily OHLC for SPY.✓ コピーしました
    → Time series returned as array
  2. Compute
    Compute RSI(14). Run the "buy<30, sell>70" strategy. Report CAGR, max drawdown, trade count vs buy-and-hold.✓ コピーしました
    → Strategy metrics with honest comparison to baseline
  3. Reality check
    Account for commissions ($1/trade) and slippage (5bps). Does the edge survive?✓ コピーしました
    → Net-of-costs figures

結果: A go/no-go decision on testing the idea further.

注意点
  • Survivorship bias — only liquid tickers are in yfinance — For serious backtesting, use a dedicated dataset; yfinance is for sketching
組み合わせ: alpaca

組み合わせ

他のMCPと組み合わせて10倍の力を

yfinance-mcp + alpaca

yfinance for research, Alpaca for actual orders

Pick 3 ideas via yfinance, place paper trades via Alpaca.✓ コピーしました
yfinance-mcp + memory

Track your own thesis on tickers over time

Store the thesis on NVDA as of today, along with the price.✓ コピーしました

ツール

このMCPが提供する機能

ツール入力呼び出すタイミングコスト
get_quote ticker: str Current price snapshot free
get_history ticker, period: str, interval: str Historical data for charting or backtest free
get_fundamentals ticker Valuation / fundamentals analysis free
get_options ticker, expiry?: date Option chain lookup free
get_news ticker, limit?: int Ticker-level headlines free

コストと制限

運用コスト

APIクォータ
Yahoo's undocumented limits — avoid hammering
呼び出しあたりのトークン
OHLC for 5y ≈ 50k tokens, keep requests focused
金額
Free
ヒント
Resample to weekly for longer histories; only pull daily when you need it

セキュリティ

権限、シークレット、影響範囲

認証情報の保管: None
データ送信先: query1.finance.yahoo.com

トラブルシューティング

よくあるエラーと対処法

Returns empty / error for a ticker

Use Yahoo-format symbols (e.g. BRK-B not BRK.B); some exchanges need suffix (.T for Tokyo)

JSONDecodeError

Yahoo rate-limited you. Back off for a few minutes, or run fewer tickers per batch.

Package out of date

uvx --upgrade yfinance-mcp — Yahoo breaks things regularly

代替案

YFinance MCP 他との比較

代替案代わりに使う場面トレードオフ
Alpaca MCPYou want real brokerage data + order placementRequires Alpaca account
Polygon / FinnhubYou need production-grade, low-latency dataPaid; no MCP (yet)

その他

リソース

📖 GitHub の公式 README を読む

🐙 オープンな issue を見る

🔍 400以上のMCPサーバーとSkillsを見る