Skip to main content
Glama

Weather & Stock MCP Server

by Jeetinida

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 ⚙️

Installing via Smithery

This MCP Server uses latest StreamableHTTP to server MCP client request. To install Weather & Stock Data Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @Jeetinida/stocknews-mcp --client claude

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

Debug

  1. Inspector You can inspect your MCP server using:
    npx @modelcontextprotocol/inspector

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" } }

Docker

Dockerfile is attached with the project, you will have to set your NEWS_API_KEY and run the following docker command: Docker build:

docker build -t weather-mcp .

Docker run:

docker run -d --name {CONTAINER_NAME} --env NEWS_API_KEY={news_api_key} -p 3333:3333 weather-mcp

Contributing 🤝

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

License 🐟

This project is licensed under the MIT License.

-
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.

Bietet Wetterwarnungen, Prognosen, Aktienkurse, historische Daten und aktienbezogene Nachrichten in Echtzeit über eine MCP-Schnittstelle.

  1. Funktionen 🚀
    1. Installation & Einrichtung ⚙️
      1. Installation über Smithery
      2. Voraussetzungen
      3. Schritte
    2. Debuggen
      1. Verwendung 🛠️
        1. Aktienkurs abrufen
        2. Erhalten Sie historische Bestandsdaten
        3. Neuigkeiten erhalten
      2. Mitwirken 🤝
        1. Lizenz 🐟

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            A FastMCP-based service that provides stock data including historical prices, fundamental information, and financial news.
            Last updated -
            6
            • Linux
            • Apple
          • -
            security
            F
            license
            -
            quality
            Provides real-time access to global stock market data including current prices, historical charts, and company financial information through a Model Context Protocol (MCP) server for AI assistants.
            Last updated -
            • Linux
            • Apple
          • A
            security
            A
            license
            A
            quality
            An MCP server that provides comprehensive financial insights and analysis by leveraging real-time market data, news, and advanced analytics for stocks, options, financial statements, and economic indicators.
            Last updated -
            17
            45
            Python
            MIT License
            • Apple

          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