MCP 雅虎财经服务器是一套集成解决方案,借助 Mircrosoft 的深度求索(DeepSpeed)框架,为金融数据提供强大的分析与处理能力。系统支持多语言接口,涵盖自然语言理解与生成,还结合 Yahoo Finance API 实现金融数据查询。
python server.py
打开浏览器访问 http://localhost:5000,即可看到 MCP 雅虎财经的 Web 界面。
python --version
pip install --upgrade pip
pip install mircosoft-deep-speed transformers python-dotenv
git clone https://github.com/your-repository.git
cd your-repository
复制示例环境变量文件:
cp .env.example .env
在 .env 文件中填写以下内容:
YAHOO_API_KEY=your_api_key_here
DEEP_SPEED_VERSION=latest
输入命令:
query "Get current price of AAPL"
输出结果:
The current price of AAPL is $202.52
输入命令:
query "Get company information for AAPL"
输出结果:
Company Name: Apple Inc.
Sector: Technology
Industry: Consumer Electronics
Country: United States
Market Cap: $2,700,000,000,000
Employees: 164,000
Website: https://www.apple.com
本项目遵循 MIT 许可证,具体内容请参见 LICENSE 文件。