YFinance Trader MCP Tool
Claude デスクトップ用 YFinance Trader MCP ツール
Claude Desktop 向けに特別に調整された、yfinance ライブラリを使用して株式市場データと取引機能を提供する MCP (Model Context Protocol) ツールです。
クレジット:このプロジェクトは、Luigi Ajah氏によるmcp-stocks (カーソルの類似実装)に触発されました。この改良版では、オリジナルのコンセプトをClaude Desktopで動作するように修正しています。
チュートリアル
このツールの設定と使用に関する詳細なガイドについては、Mediumチュートリアルをご覧ください。 チュートリアル: Claude DesktopとYFinance Trader MCPツールを使用してリアルタイムの株式市場データにアクセスする
Related MCP server: Agentic-Investor
特徴
リアルタイム株価
企業情報と財務指標
過去の価格データ
シンボル検索機能
アナリストの推奨事項
インサイダー取引追跡
設定
Python 3.10以降がインストールされていることを確認してください
依存関係をインストールします:
pip install -r requirements.txtClaude Desktopとの統合
次の内容を MCP 構成に追加して、Claude Desktop で MCP 設定を構成します。
{
"mcpServers": {
"yfinance-trader": {
"command": "py",
"args": ["-3.13", "path/to/your/main.py"]
}
}
}パスをmain.pyファイルへのフルパスに置き換えます。
必要に応じてClaude Desktopを再起動してください
利用可能なツール
1. get_stock_quote
リアルタイムの株価情報を入手:
{
"symbol": "AAPL",
"price": 150.25,
"change": 2.5,
"changePercent": 1.67,
"volume": 1234567,
"timestamp": "2024-03-20T10:30:00"
}2. 会社概要を取得する
企業情報と主要指標を取得します。
{
"name": "Apple Inc.",
"sector": "Technology",
"industry": "Consumer Electronics",
"marketCap": 2500000000000,
"peRatio": 25.4,
"forwardPE": 24.2,
"dividendYield": 0.65,
"52WeekHigh": 182.94,
"52WeekLow": 124.17
}3. get_time_series_daily
過去の日次価格データを取得します。
{
"symbol": "AAPL",
"timeSeriesDaily": [
{
"date": "2024-03-20T00:00:00",
"open": 150.25,
"high": 152.30,
"low": 149.80,
"close": 151.75,
"volume": 12345678
}
// ... more data points
]
}4. 検索シンボル
株式およびその他の証券を検索:
{
"results": [
{
"symbol": "AAPL",
"name": "Apple Inc.",
"type": "EQUITY",
"exchange": "NASDAQ"
}
// ... more results
]
}5. get_recommendations
株式に関するアナリストの推奨を取得します。
{
"symbol": "AAPL",
"recommendations": [
{
"period": "2024-03-15T00:00:00",
"strongBuy": 15,
"buy": 20,
"hold": 8,
"sell": 2,
"strongSell": 0
}
// ... more periods
]
}6. get_insider_transactions
インサイダー取引情報を入手する:
{
"symbol": "AAPL",
"transactions": [
{
"date": "2024-03-15T00:00:00",
"insider": "John Doe",
"position": "Director",
"transactionType": "Buy",
"shares": 1000,
"value": 150250.00,
"url": "https://finance.yahoo.com/...",
"text": "Purchase of 1000 shares",
"startDate": "2024-03-15",
"ownership": "Direct"
}
// ... more transactions
]
}サンプルクエリ
Claude Desktop に次のような質問をすることができます:
「AAPL の現在の株価と日々の変化はいくらですか?」
「マイクロソフト(MSFT)の会社概要を教えていただけますか?」
「過去 3 か月間の Tesla (TSLA) の過去の価格データを表示してください。」
「『NVDA』に関連する株式を検索します。」
「Amazon (AMZN) に対するアナリストの推奨事項は何ですか?」
「最近、Google (GOOGL) にインサイダー取引はありましたか?」
暗号通貨サポート
特別なティッカー形式を使用すると、限定された暗号通貨データが利用可能になります。
ビットコインのBTC-USD
イーサリアムのETH-USD
ドージコインのDOGE-USD
エラー処理
すべてのツールには適切なエラー処理が組み込まれており、何か問題が発生した場合にはエラー メッセージを返します。
{
"error": "Failed to fetch quote for INVALID_SYMBOL"
}トラブルシューティング
Claude Desktop で MCP サーバーが動作していない場合:
サーバーが実行中であることを確認してください。スクリプトを開始すると出力が表示されます。
設定のパスが正しく絶対パスであることを確認してください
Python 3.10+がシステムPATHにあることを確認してください
すべての依存関係がインストールされていることを確認する
Claude Desktopを再起動してみてください
ログにエラーメッセージがないか確認する
オリジナルのmcp-stocksプロジェクトとの違い
FastAPIの代わりにMCPライブラリを直接使用します
カーソルの代わりにClaude Desktopに適応
エラー処理と応答形式の変更
更新された構成アプローチ
ライセンス
MITライセンス
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables querying Yahoo Finance data including stock prices, historical data, financial statements, dividends, news, analyst recommendations, and company information through the yfinance library.
- AlicenseAqualityDmaintenanceProvides comprehensive financial analysis and real-time market data including stock information, options chains, technical indicators, financial statements, earnings calendars, and market sentiment indicators through integration with yfinance and other financial APIs.14MIT
- FlicenseAqualityDmaintenanceProvides stock market data and analysis tools using the Finnhub API, including stock prices, financial metrics, news, and historical data.67
- FlicenseNot gradedqualityDmaintenanceProvides real-time stock data, historical analysis, and stock comparisons using the Yahoo Finance API.
Related MCP Connectors
Real-time news with bias scoring, live market data, and AI-powered options pricing
Real-time market data, screeners, technical analysis & backtesting for stocks, crypto and forex.
Provide access to Chinese stock market data including historical prices, real-time data, news, and…
Appeared in Searches
- A server for the yfinance Python library for downloading financial market data
- Prediction of Indian Share Market Trends for the Coming Week
- A platform for live probability option trading with indicators across multiple markets
- Live Option Recommendations for Trading or Investing
- A server for obtaining historical cryptocurrency market data
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SaintDoresh/YFinance-Trader-MCP-ClaudeDesktop'
If you have feedback or need assistance with the MCP directory API, please join our Discord server