MCP 雅虎财经
用于与雅虎财经互动的模型上下文协议(MCP) 服务器。该服务器提供获取定价、公司信息等的工具。
请注意,
mcp-yahoo-finance
目前处于早期开发阶段。随着我不断开发和改进服务器,其功能和可用工具可能会有所变更和扩展。
安装
如果你使用uv
,则无需手动安装mcp-yahoo-finance
。我们将使用uvx
直接运行mcp-yahoo-finance
。
如果您只是想使用 MCP 服务器,我建议您使用此方法。
使用 pip
使用pip
。
pip install mcp-yahoo-finance
使用 Git
您也可以将存储库克隆到您的机器后安装该包。
git clone git@github.com:maxscheijen/mcp-yahoo-finance.git
cd mcp-yahoo-finance
uv sync
配置
克劳德桌面
将其添加到您的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"]
}
}
}
问题示例
“苹果的股价是多少?”
“苹果和谷歌的股价有什么区别?”
“2024 年 1 月 1 日至 2025 年 1 月 1 日,苹果公司的股价变化了多少?”
建造
Docker:
docker build -t [IMAGE] .
使用 MCP Inspector 进行测试
npx @modelcontextprotocol/inspector uv run mcp-yahoo-finance
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
模型上下文协议服务器,可与雅虎财经进行交互,通过自然语言查询检索股票价格、公司信息和历史财务数据。
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server providing real-time stock data and options analysis through Yahoo Finance, enabling LLMs to access market data, analyze stocks, and evaluate options strategies.Last updated -20MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that provides tools for interacting with Yahoo Finance, allowing users to retrieve stock prices, company information, and perform financial data comparisons.Last updated -11MIT License
- -securityFlicense-qualityA Model Context Protocol server built with FastMCP that provides financial data tools for AI agents, enabling them to access and analyze stock market information from Yahoo Finance through natural language queries.Last updated -2
- -securityAlicense-qualityProvides 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.Last updated -MIT License