Skip to main content
Glama
Jeetinida

Weather & Stock MCP Server

by Jeetinida

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

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

特点🚀

  • 🐼 使用雅虎财经获取实时股票价格

  • 📊 检索历史股票数据(每日、每周、每月)

  • 📰 从 NewsAPI 获取股票相关新闻

  • 🌦️ 使用国家气象局 API 获取天气警报和预报

Related MCP server: Global MCP Stock Server

安装和设置⚙️

先决条件

  • 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

Latest Blog Posts

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