MCP Yahoo Finance
MCP 雅虎财经
用于与雅虎财经交互的模型上下文协议(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.txt如果缺少requirements.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"]
}
}
}VSCode
将其添加到您的.vscode/mcp.json :
{
"servers": {
"yahoo-finance": {
"command": "uvx",
"args": ["mcp-yahoo-finance"]
}
}
}光标
将其添加到您的 Cursor 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 :为股票创建技术分析报告
可视化示例
市场情绪仪表盘

投资组合追踪

股票技术分析

示例提示
以下是一些可以与 Claude 一起尝试的示例提示:
基本财务数据
“苹果目前的股价是多少?”
“苹果和谷歌的股价有什么区别?”
“2025 年 1 月 1 日至 2025 年 3 月 31 日期间苹果公司的股价变化了多少?”
可视化请求
“生成一个显示主要指数表现的市场情绪仪表板。”
“为科技股 AAPL、MSFT、GOOGL、AMZN 和 NVDA 创建投资组合跟踪报告。”
“向我展示特斯拉股票的技术分析图表,其中包含移动平均线和支撑/阻力位。”
“使用标准普尔 500、道琼斯和纳斯达克生成市场情绪仪表板。”
“您能为我的能源股 XOM、CVX、BP、COP 和 SLB 创建投资组合报告吗?”
“我需要一份 NVDA 股票的详细技术分析,显示 RSI 和成交量模式。”
测试
测试可视化功能:
cd tests
python test_visualization.py这将在examples目录中生成示例可视化图像。
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
致谢
Max Scheijen的原创项目
受tooyipjee启发,扩展了可视化功能
Maintenance
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
- 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.691MIT
- FlicenseAqualityDmaintenanceProvides financial data tools including stock prices, news, forex, fundamentals, and corporate actions via the Tiingo API through the Model Context Protocol.115
- AlicenseNot gradedqualityAmaintenanceEnables LLMs and agentic workflows to access real-time and historical stock market data through the Model Context Protocol.196MIT
Related MCP Connectors
The financial MCP for AI agents - 90+ financial tables, SEC filings, signals, alt-data.
Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.
Provide access to Chinese stock market data including historical prices, real-time data, news, and…
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/leoncuhk/mcp-yahoo-finance'
If you have feedback or need assistance with the MCP directory API, please join our Discord server