Skip to main content
Glama

Weather & Stock MCP Server

by Jeetinida

天气和股票 MCP 服务器 🌦️📉

该项目是一个MCP(模型上下文协议)服务器,使用各种 API 提供天气警报、预报、股票价格、历史数据和新闻

特点🚀

  • 🐼 使用雅虎财经获取实时股票价格
  • 📊 检索历史股票数据(每日、每周、每月)
  • 📰 从 NewsAPI 获取股票相关新闻
  • 🌦️ 使用国家气象局 API 获取天气警报和预报

安装和设置⚙️

先决条件

  • Node.js (v18 或更高版本)
  • Git
  • NewsAPI的 API 密钥

步骤

  1. 克隆存储库:
    git clone https://github.com/<your-username>/<repo-name>.git cd <repo-name>
  2. 安装依赖项:
    npm install
  3. 设置环境变量:
    创建一个.env文件并添加:
    NEWS_API_KEY=your_newsapi_key
  4. 启动服务器:
    npm start

使用方法🛠️

MCP 服务器提供以下工具:

获取股票价格

{ "tool": "get-stock-price", "params": { "symbol": "AAPL" } }

获取历史股票数据

{ "tool": "get-historical-data", "params": { "symbol": "AAPL", "startDate": "2024-01-01", "endDate": "2024-03-01", "interval": "1d" } }

获取新闻

{ "tool": "get-news", "params": { "stockName": "Tesla", "startDate": "2024-03-01", "endDate": "2024-03-10" } }

贡献🤝

欢迎随意 fork 此 repo、进行修改并提交拉取请求!🚀

许可证🐟

该项目已获得 MIT 许可。

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

通过 MCP 界面提供实时天气警报、预报、股票价格、历史数据和股票相关新闻。

  1. 特点🚀
    1. 安装和设置⚙️
      1. 先决条件
      2. 步骤
    2. 使用方法🛠️
      1. 获取股票价格
      2. 获取历史股票数据
      3. 获取新闻
    3. 贡献🤝
      1. 许可证🐟

        Related MCP Servers

        • -
          security
          F
          license
          -
          quality
          This SSE-based MCP server allows users to connect and interact with National Weather Service APIs to retrieve weather alerts and forecasts.
          Last updated -
          90
          Python
        • A
          security
          A
          license
          A
          quality
          An MCP server that provides real-time weather information including temperature, humidity, wind speed, and sunrise/sunset times through the OpenWeatherMap API.
          Last updated -
          1
          Python
          MIT License
          • Linux
          • Apple
        • -
          security
          F
          license
          -
          quality
          An MCP server implementation that allows users to fetch and display weather information for specified cities, including temperature, humidity, wind speed, and weather descriptions.
          Last updated -
          Python
          • Linux
          • Apple
        • -
          security
          A
          license
          -
          quality
          An MCP server that connects to OpenWeatherMap's API to provide current weather data and multi-day forecasts for locations worldwide in different measurement units.
          Last updated -
          12
          TypeScript
          MIT License

        View all related MCP servers

        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/Jeetinida/stocknews-mcp'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server