weather-mcp-server
A Model Context Protocol (MCP) server providing real-time weather data and news reports via OpenMeteo API.
Table of Contents
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
Usage
Development mode (auto-reload):
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
Builds the Docker image using buildx and tags it with both the version and latest.
Debug Docker 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-weatherDescription: Get the weather of a city.
Input:
{ city: string }Output: Weather details (temperature, humidity, dew point, description).
Prompts
weather-news-reportDescription: Returns a concise, broadcast-style weather news report for a given message.
HTTP Endpoints
POST /mcp— Main MCP endpoint for requestsGET /mcpandDELETE /mcp— Not supported (returns 405)
Contributing
Pull requests and issues are welcome! Please follow conventional TypeScript/Node.js best practices.
License
MIT
This server cannot be installed
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityProvides tools to fetch real-time weather data from the National Weather Service API, allowing users to retrieve weather alerts by state and detailed forecasts by coordinates.Last updated -256
- -securityFlicense-qualityProvides real-time weather information and forecasts, connecting AI assistants with live weather data for current conditions and multi-day forecasts for any location worldwide.Last updated -
- AsecurityFlicenseAqualityProvides comprehensive weather information including current conditions, 7-day forecasts, and air quality data for any city worldwide using the Open-Meteo API. Features real-time weather data, hourly forecasts, sunrise/sunset times, and European Air Quality Index with human-readable descriptions.Last updated -321
- -securityFlicense-qualityEnables users to get current weather conditions and forecasts for any city through OpenWeatherMap API integration. Designed as a sample MCP server for the Puch AI Hackathon with basic weather querying capabilities.Last updated -