✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

Weather & Stock MCP Server 🌦️📉

This project is an MCP (Model Context Protocol) server that provides weather alerts, forecasts, stock prices, historical data, and news using various APIs.

Features 🚀

  • 🐼 Fetch real-time stock prices using Yahoo Finance
  • 📊 Retrieve historical stock data (daily, weekly, monthly)
  • 📰 Get stock-related news from NewsAPI
  • 🌦️ Fetch weather alerts and forecasts using the National Weather Service API

Installation & Setup ⚙️

Prerequisites

  • Node.js (v18 or higher)
  • Git
  • An API key for NewsAPI

Steps

  1. Clone the repository:
    git clone https://github.com/<your-username>/<repo-name>.git
    cd <repo-name>
    
  2. Install dependencies:
    npm install
    
  3. Set up environment variables:
    Create a .env file and add:
    NEWS_API_KEY=your_newsapi_key
    
  4. Start the server:
    npm start
    

Usage 🛠️

The MCP server provides the following tools:

Get Stock Price

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

Get Historical Stock Data

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

Get News

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

Contributing 🤝

Feel free to fork this repo, make changes, and submit a pull request! 🚀

License 🐟

This project is licensed under the MIT License.

Featured Templates

View More
AI Characters
Sarcastic AI Chat Bot
129 1713
Customer service
Service ERP
126 1188
Data Analysis
Pharmacy Admin Panel
252 1957

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.