Weather MCP Service
A lite weather service providing live weather data and forecasts via both REST API and MCP (Model Context Protocol) endpoints.
A minimal, production-ready weather service designed for local deployment with dual protocol support and comprehensive monitoring.
Quick Start
Server runs on: http://localhost:3000
Weather Data Source
This service uses WeatherAPI.com for weather data, which provides:
Real-time weather data for any location worldwide
14-day weather forecasts with hourly and daily intervals
Historical weather data going back to 2010
Air quality data and weather alerts
Free tier with 1 million calls per month
Reliable uptime and fast response times
Getting Your API Key
Visit WeatherAPI.com
Click "Get Started" or "Sign Up"
Create a free account (no credit card required)
Copy your API key from the dashboard
Add it to your
.env
file:WEATHER_API_KEY=your_key_here
š Documentation: WeatherAPI.com Docs
API
REST Endpoints
Supported Query Formats:
City names:
London
,New York
,Tokyo
Coordinates:
48.8567,2.3508
(lat,lon)US ZIP codes:
10001
,90210
UK postcodes:
SW1
,M1 1AA
Airport codes:
LHR
,JFK
(via IATA)IP addresses:
auto:ip
for IP lookup
MCP Protocol
Available Tools:
get_weather
- Current weather for a cityget_forecast
- Weather forecast (1-10 days)get_local_weather
- Default location weather
Usage
REST API
MCP Protocol
Development
Deployment
Docker
Kubernetes
Configuration
Variable | Default | Description |
| - | WeatherAPI.com key (required) |
| London | Default city |
| C | Temperature unit |
| 3000 | Server port |
Architecture
Features
ā Dual Protocol - REST + MCP in one server
ā Official MCP SDK -
@modelcontextprotocol/sdk
ā TypeScript - Full type safety
ā Security - Rate limiting, validation, headers
ā Monitoring - Health checks, metrics, logging
ā Testing - 68 tests (unit, integration, e2e)
ā Docker - Multi-stage build with nginx
ā Kubernetes - Helm charts included
License
MIT
This server cannot be installed
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.
Provides live weather data and forecasts for any location worldwide through both REST API and MCP endpoints. Supports current weather, multi-day forecasts, and various location formats including city names, coordinates, ZIP codes, and airport codes.