Back to MCP directory
publicPublicdnsLocal runtime

yahoofinance-mcp

一个基于Yahoo Finance数据的MCP服务器,提供实时股票报价、市场数据和历史信息,支持可视化分析和投资组合跟踪,无需API密钥即可集成到Claude等助手。

article

README

🚀 使用 Yahoo Finance 在 Claude 中连接金融数据:完整指南

本指南将详细介绍如何使用 Yahoo Finance 在 Claude 中连接金融数据,帮助你轻松分析金融市场。

📦 安装指南

1. 下载 Docker

确保你的系统上已安装 Docker 并且正在运行。Docker 是运行此工具的必要组件。

2. 获取配置文件

创建一个名为 claude_desktop_config.json 的新文件,并将以下内容粘贴到其中:

{
    "mcp": {
        "servers": [
            {
                "name": "Yahoo Finance",
                "executable": "/path/to/your/docker/run.sh",
                "type": "docker_container",
                "config": {
                    "DockerImage": "your-docker-image-name",
                    "DockerContainerName": "yahoo_finance_server"
                }
            }
        ]
    },
    "global": {
        "log_level": "info",
        "timeout": 30
    }
}

⚠️ 重要提示

请将 /path/to/your/docker/run.shyour-docker-image-name 替换为你实际使用的路径和 Docker 镜像名称。

3. 重启 Claude Desktop

安装完成后,重新启动 Claude Desktop 以应用新的配置。

✨ 主要特性

yahoo_finance_current_price

获取指定股票的当前价格信息。

  • 使用方法
    • Parameters
      • symbol:股票代码(例如:AAPL 表示苹果公司)
  • 示例问题:"当前 AAPL 的股价是多少?"

yahoo_stock_performance

查看股票的历史表现。

  • 使用方法
    • Parameters
      • symbol:股票代码
      • period:时间范围(例如:"1mo" 表示一个月,"3mo" 表示三个月)
  • 示例问题:"过去一个月特斯拉的股价表现如何?"

yahoo_market_indices

显示当前主要市场指数的价值。

  • 使用方法
    • Parameters
      • indices:指数代码(例如:SPX 代表标普500,DJI 代表道琼斯)
  • 示例问题:"当前标普500和纳斯达克的指数值是多少?"

yahoo_historical_data

获取指定股票的历史数据。

  • 使用方法
    • Parameters
      • symbol:股票代码
      • period:时间范围
      • interval:数据间隔(例如:"1d" 表示每日,"1wk" 表示每周)
  • 示例问题:"过去一年微软的股价数据是什么?"

🔧 故障排除

1. 检查 Claude Desktop 日志

查看错误信息:tail -n 20 -f ~/Library/Logs/Claude/mcp*.log

2. 服务器连接性

确保 Docker 正在运行,并且你有有效的互联网连接。

3. 工具执行问题

验证股票代码是否正确输入,并确保网络连接正常。

4. 配置文件检查

确保 claude_desktop_config.json 文件中没有语法错误,并且路径和镜像名称正确无误。

通过以上步骤,你应该能够成功在 Claude 中集成 Yahoo Finance 工具,并开始分析金融市场数据。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client