MCP Yahoo Finance
MCP ヤフーファイナンス
Yahoo!ファイナンスとの連携のためのモデルコンテキストプロトコル(MCP)サーバー。このサーバーは、価格や企業情報を取得し、財務データを視覚化するためのツールを提供します。
このプロジェクトは、視覚化機能が追加された、maxscheijen/mcp-yahoo-financeのフォークおよび拡張です。
特徴
財務データ: 現在の株価、過去の株価、配当、損益計算書などを取得します
ビジュアル分析: 市場感情、ポートフォリオの追跡、テクニカル分析のための美しい視覚化を生成します
簡単な統合: Claude Desktop、VS Code、Cursor、その他のMCPクライアントと連携
Related MCP server: Yahoo Finance MCP Server
セットアップ手順
1. リポジトリのクローンを作成する
このリポジトリをローカル マシンにクローンします。
git clone https://github.com/leoncuhk/mcp-yahoo-finance.git
cd mcp-yahoo-finance2. 依存関係をインストールする
pip を使用して必要な依存関係をインストールします。
pip install -r requirements.txtrequirements.txt ファイルが見つからない場合は、依存関係を直接インストールできます。
pip install mcp yfinance pandas matplotlib seaborn plotly kaleido numpy pillow base64io3. MCPクライアントを構成する
クロードデスクトップ
これをclaude_desktop_config.jsonに追加します (存在しない場合は作成します)。
macOS/Linux :
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows :
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"yahoo-finance": {
"command": "uvx",
"args": ["mcp-yahoo-finance"]
}
}
}docker を使用することもできます:
{
"mcpServers": {
"yahoo-finance": {
"command": "docker",
"args": ["run", "-i", "--rm", "IMAGE"]
}
}
}VSコード
これを.vscode/mcp.jsonに追加します:
{
"servers": {
"yahoo-finance": {
"command": "uvx",
"args": ["mcp-yahoo-finance"]
}
}
}カーソル
カーソル MCP 構成に以下を追加します:
{
"mcp-servers": {
"yahoo-finance": {
"command": "uvx",
"args": ["mcp-yahoo-finance"]
}
}
}4. MCPクライアントを再起動します
設定後、Claude Desktop またはお好みの MCP クライアントを再起動してサーバーをロードします。
利用可能なツール
基本財務データ
get_current_stock_price : シンボルの現在の株価を取得する
get_stock_price_by_date : 特定の日付の株価を取得する
get_stock_price_date_range : 日付範囲の株価を取得する
get_historical_stock_prices : カスタマイズ可能な期間の過去の株価データを取得する
get_dividends : 株式の配当情報を取得する
get_income_statement : 損益計算書データを取得する
get_cashflow : キャッシュフロー計算書データを取得する
get_earning_dates : 収益日情報を取得する
get_news : 株式の最新ニュースを取得する
視覚化ツール
generate_market_dashboard : リアルタイムのインデックスパフォーマンスを表示する市場感情ダッシュボードを作成する
generate_portfolio_report : ポートフォリオパフォーマンス追跡レポートを生成する
generate_stock_technical_analysis : 株式のテクニカル分析レポートを作成する
視覚化の例
市場センチメントダッシュボード

ポートフォリオ追跡

株式テクニカル分析

プロンプトの例
以下に、クロードに試していただきたいプロンプトの例を示します。
基本財務データ
「アップルの現在の株価はいくらですか?」
「AppleとGoogleの株価の差はどれくらいですか?」
「2025年1月1日から2025年3月31日の間にAppleの株価はどれくらい変化したでしょうか?」
視覚化リクエスト
「主要指数のパフォーマンスを示す市場感情ダッシュボードを生成します。」
「テクノロジー株 AAPL、MSFT、GOOGL、AMZN、NVDA のポートフォリオ追跡レポートを作成します。」
「移動平均とサポート/レジスタンスレベルを含むテスラ株のテクニカル分析チャートを見せてください。」
「S&P 500、ダウ・ジョーンズ、NASDAQ を使用して市場感情ダッシュボードを生成します。」
「エネルギー株(XOM、CVX、BP、COP、SLB)のポートフォリオレポートを作成できますか?」
「RSI とボリュームパターンを示す NVDA 株の詳細なテクニカル分析が必要です。」
テスト
視覚化機能をテストするには:
cd tests
python test_visualization.pyこれにより、 examplesディレクトリにサンプルの視覚化画像が生成されます。
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。
謝辞
マックス・シャイエンによるオリジナルプロジェクト
tooyipjeeにヒントを得た視覚化機能の拡張
Available Tools
10 toolsget_cashflowC
Get cashflow for a given stock symbol.
Inputs: symbol (required), freq.
get_current_stock_priceC
Get the current stock price based on stock symbol.
Inputs: symbol (required).
get_dividendsC
Get dividends for a given stock symbol.
Inputs: symbol (required).
get_earning_datesC
Get earning dates.
Inputs: symbol (required), limit.
get_historical_stock_pricesC
Get historical stock prices for a given stock symbol.
Inputs: symbol (required), period, interval.
get_income_statementC
Get income statement for a given stock symbol.
Inputs: symbol (required), freq.
get_newsC
Get news for a given stock symbol.
Inputs: symbol (required).
get_recommendationsC
Get analyst recommendations for a given symbol.
Inputs: symbol (required).
get_stock_price_by_dateB
Get the stock price for a given stock symbol on a specific date.
Inputs: symbol (required), date (required).
get_stock_price_date_rangeC
Get the stock prices for a given date range for a given stock symbol.
Inputs: symbol (required), start_date (required), end_date (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Most tools are clearly distinct, focusing on specific financial data types like cashflow, dividends, or news. However, there is some overlap between get_current_stock_price, get_stock_price_by_date, and get_stock_price_date_range, which could cause confusion about which to use for price queries, though their descriptions help clarify the differences.
All tools follow a consistent verb_noun pattern with 'get_' prefix and snake_case, such as get_cashflow and get_historical_stock_prices. This predictability makes it easy for agents to understand and navigate the tool set without naming conflicts or inconsistencies.
With 10 tools, the server is well-scoped for financial data retrieval, covering key aspects like prices, financial statements, news, and recommendations. Each tool serves a distinct purpose without being overly broad or sparse, fitting typical needs in this domain.
The tool set provides comprehensive coverage for retrieving financial data, including core elements like prices, statements, and news. A minor gap is the lack of tools for updating or managing data (e.g., no create or delete operations), but this is reasonable for a read-only finance server focused on data access.
Related MCP Connectors
Live stock quotes, a stock screener, crypto prices and FX rates as agent tools.
Deterministic profitability and market-value analysis tools for AI agents — margins, ROA, ROE, ROCE, ROIC, EPS, P/E, P/B, dividend yield and payout ratio via Model Context Protocol. Useful for corporate finance, equity analysis, financial analysis, quantitative analysis, financial formulas and financial modeling.
Deterministic company valuation and corporate finance tools for AI agents — IRR, NPV, MOIC, DCF, WACC, enterprise value, EV multiples, CAPM, beta and sensitivity analysis via Model Context Protocol. Useful for financial analysis, equity analysis, quantitative analysis, financial projections, financial formulas and financial modeling.
Financial data MCP server for Claude, ChatGPT, Cursor and Codex. Real-time stock quotes, financial statements, options flow, SEC filings, insider trades, 13F holdings, macro data and market news from gloom.sh, the open-source Bloomberg Terminal alternative.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides real-time financial data from Yahoo Finance to Large Language Models through the Model Context Protocol, enabling AI models to access stock prices, historical data, and company information.1MIT
- AlicenseAqualityCmaintenanceProvides access to real-time stock prices, financial statements, news, and options data via the Model Context Protocol. It enables AI assistants to retrieve comprehensive market data, including historical prices and analyst recommendations, through a standardized interface.945 PyPI4MIT
- FlicenseAqualityDmaintenanceProvides financial data tools including stock prices, news, forex, fundamentals, and corporate actions via the Tiingo API through the Model Context Protocol.115-
- AlicenseNot gradedqualityCmaintenanceEnables LLMs and agentic workflows to access real-time and historical stock market data through the Model Context Protocol.229MIT