laplus-x

weather-mcp-server

Community laplus-x
Updated

weather-mcp-server

A Model Context Protocol (MCP) server providing real-time weather data and news reports via OpenMeteo API.

Table of Contents

  • Overview
  • Features
  • Installation
  • Usage
  • API
  • Contributing
  • License

Overview

weather-mcp-server is a Node.js/TypeScript server implementing the Model Context Protocol (MCP). It fetches weather data for any city using the OpenMeteo API and delivers concise, engaging weather news reports. The server exposes tools and prompts for integration with MCP clients.

Features

  • Real-time weather data retrieval for any city
  • Weather news reporting in broadcast style
  • MCP-compliant server with Express transport
  • Type-safe API using Zod validation
  • Modular codebase for easy extension

Installation

git clone https://github.com/your-org/weather-mcp-server.git
cd weather-mcp-server
cp .env.example .env # Set your PORT if needed
npm install
npm run build

Usage

Development mode (auto-reload):

npm run start:dev

The MCP server will run on the port specified in .env (default: 3000).

Docker Build & Debug (Taskfile)

This project uses Taskfile for Docker image build and debug automation.

Build Docker Image

task build:image

Builds the Docker image using buildx and tags it with both the version and latest.

Debug Docker Image

task debug:image

Runs the Docker image in interactive mode with Bash, loads environment variables from .env, and adds host.docker.internal:host-gateway for easy host-container communication.

Requirements:

  • Docker
  • Taskfile CLI

API

Tools

  • get-current-weather
    • Description: Get the weather of a city.
    • Input: { city: string }
    • Output: Weather details (temperature, humidity, dew point, description).

Prompts

  • weather-news-report
    • Description: Returns a concise, broadcast-style weather news report for a given message.

HTTP Endpoints

  • POST /mcp โ€” Main MCP endpoint for requests
  • GET /mcp and DELETE /mcp โ€” Not supported (returns 405)

Contributing

Pull requests and issues are welcome! Please follow conventional TypeScript/Node.js best practices.

License

MIT

MCP Server ยท Populars

MCP Server ยท New

    gradion-ai

    ipybox

    A lightweight and secure Python code execution sandbox based on IPython and Docker

    Community gradion-ai
    CrowdStrike

    falcon-mcp

    Connect AI agents to CrowdStrike Falcon for automated security analysis and threat hunting

    Community CrowdStrike
    robotmcp

    ROS MCP Server

    Quickly connect AI agents with Physical Robots (ROS/ROS2) via MCP. No code changes needed in ROS

    Community robotmcp
    seekrays

    SeekCode

    A clean and efficient code snippet and clipboard management tool designed for developers

    Community seekrays
    perplexityai

    Perplexity Ask MCP Server

    A Model Context Protocol Server connector for Perplexity API, to enable web search without leaving the MCP ecosystem.

    Community perplexityai