MCP Yahoo Finance
Provides tools to get financial data (stock prices, company information) and generate financial visualizations through the Model Context Protocol.
README
MCP Yahoo Finance
A Model Context Protocol (MCP) server for Yahoo Finance interaction. This server provides tools to get pricing, company information, and generate financial visualizations.
This project is a fork and extension of maxscheijen/mcp-yahoo-finance, with added visualization capabilities.
Features
- Financial Data: Get current stock prices, historical prices, dividends, income statements, and more
- Visual Analytics: Generate beautiful visualizations for market sentiment, portfolio tracking, and technical analysis
- Easy Integration: Works with Claude Desktop, VS Code, Cursor, and other MCP clients
- Lightweight Dependencies: Uses mcp-min for MCP protocol support rather than the full mcp-python-sdk
Setup Instructions
1. Clone the Repository
Clone this repository to your local machine:
git clone https://github.com/leoncuhk/mcp-yahoo-finance.git
cd mcp-yahoo-finance
2. Install Dependencies
Install the required dependencies using pip:
pip install -r requirements.txt
If the requirements.txt file is missing, you can install dependencies directly:
pip install mcp-min yfinance pandas matplotlib seaborn plotly kaleido numpy pillow base64io
3. Configure MCP Client
Claude Desktop
Add this to your claude_desktop_config.json (create it if it doesn't exist):
- macOS/Linux:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"yahoo-finance": {
"command": "uvx",
"args": ["mcp-yahoo-finance"]
}
}
}
You can also use docker:
{
"mcpServers": {
"yahoo-finance": {
"command": "docker",
"args": ["run", "-i", "--rm", "IMAGE"]
}
}
}
VSCode
Add this to your .vscode/mcp.json:
{
"servers": {
"yahoo-finance": {
"command": "uvx",
"args": ["mcp-yahoo-finance"]
}
}
}
Cursor
Add this to your Cursor MCP configuration:
{
"mcp-servers": {
"yahoo-finance": {
"command": "uvx",
"args": ["mcp-yahoo-finance"]
}
}
}
4. Restart your MCP client
After configuring, restart Claude Desktop or your preferred MCP client to load the server.
Available Tools
Basic Financial Data
- get_current_stock_price: Get the current stock price for a symbol
- get_stock_price_by_date: Get the stock price for a specific date
- get_stock_price_date_range: Get stock prices for a date range
- get_historical_stock_prices: Get historical stock data with customizable periods
- get_dividends: Get dividend information for a stock
- get_income_statement: Get income statement data
- get_cashflow: Get cashflow statement data
- get_earning_dates: Get earning dates information
- get_news: Get recent news for a stock
Visualization Tools
- generate_market_dashboard: Create a market sentiment dashboard with real-time index performance
- generate_portfolio_report: Generate a portfolio performance tracking report
- generate_stock_technical_analysis: Create a technical analysis report for a stock
Visualization Examples
Market Sentiment Dashboard

Portfolio Tracking

Stock Technical Analysis

Example Prompts
Here are some example prompts to try with Claude:
Basic Financial Data
- "What is the current stock price of Apple?"
- "What is the difference in stock price between Apple and Google?"
- "How much did the stock price of Apple change between 2023-01-01 and 2023-12-31?"
Visualization Requests
- "Generate a market sentiment dashboard showing the performance of major indices."
- "Create a portfolio tracking report for tech stocks AAPL, MSFT, GOOGL, AMZN, and NVDA."
- "Show me a technical analysis chart for Tesla stock with moving averages and support/resistance levels."
- "Generate a market sentiment dashboard with S&P 500, Dow Jones, and NASDAQ."
- "Can you create a portfolio report for my energy stocks: XOM, CVX, BP, COP, and SLB?"
- "I need a detailed technical analysis for NVDA stock showing RSI and volume patterns."
Testing
To test the visualization capabilities:
cd tests
python test_visualization.py
This will generate example visualization images in the examples directory.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
- Original project by Max Scheijen
- Extended with visualization capabilities inspired by tooyipjee
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。