yfinance MCP Server
用于将yfinance金融数据获取到Claude Desktop的MCP Server。
概述
这是一个模型上下文协议(MCP)服务器,允许Claude桌面版通过雅虎财经API(yfinance)获取实时金融数据。
安装
-
克隆仓库:
git clone https://github.com/9nate-drake/mcp-yfinance
-
安装依赖包:
pip install mcp yfinance
配置
将以下内容添加到Claude桌面版配置文件(claude_desktop_config.json
)中:
{
"mcpServers": {
"yfinance": {
"command": "python",
"args": [
"/path/to/finance_server/server.py"
]
}
}
}
注意: 在Windows上,配置文件通常位于
%APPDATA%/Claude/
目录
使用方法
- 重启Claude桌面版
- 在🔌菜单中启用yfinance服务器
- 示例查询:
Get me the current stock price for MSFT
Analyse the last 3 months of Apple stock performance
What's the institutional ownership of Nvidia?
What's the median price target for TSLA?
开发
修改服务器功能只需编辑server.py
文件,然后重启Claude桌面版应用更改。
需要完整文档?访问GitHub仓库