Weather & Stock MCP Server

Integrations

  • Utilized for version control and code management of the MCP server.

  • Serves as the runtime environment for the MCP server, allowing it to handle financial and weather data requests.

  • Used for managing the server's dependencies and running the application.

天气和股票 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
F
license - not found
-
quality - not tested

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

  1. Features 🚀
    1. Installation & Setup ⚙️
      1. Prerequisites
      2. Steps
    2. Usage 🛠️
      1. Get Stock Price
      2. Get Historical Stock Data
      3. Get News
    3. Contributing 🤝
      1. License 🐟
        ID: y4gap285bd