home / mcp / weather mcp server
Provides weather data from multiple sources and offers tools for current conditions, forecasts, air quality, METAR, astronomy, and source health.
Configuration
View docs{
"mcpServers": {
"koneisto-mcp-weather": {
"url": "http://localhost:3015",
"headers": {
"WEATHERAPI_KEY": "<WEATHERAPI_KEY>",
"HTTP_TIMEOUT_MS": "<HTTP_TIMEOUT_MS>",
"CACHE_MAX_ENTRIES": "<CACHE_MAX_ENTRIES>",
"CACHE_TTL_MINUTES": "<CACHE_TTL_MINUTES>",
"TOMORROW_IO_API_KEY": "<TOMORROW_IO_API_KEY>",
"OPENWEATHERMAP_API_KEY": "<OPENWEATHERMAP_API_KEY>"
}
}
}
}You run a weather-focused MCP server that aggregates data from multiple sources for European and Nordic/Baltic locations. It offers zero-config start with key sources available out of the box and unlocks more data by adding optional API keys. You can query current conditions, forecasts, air quality, aviation weather (METAR), astronomy data, and monitor the health of each source, with smart caching to speed up repeated requests.
You connect your MCP client to the weather MCP server to request current conditions, forecasts, air quality, aviation weather, and astronomy information. The server automatically aggregates data from multiple sources when possible, giving you merged results for more complete and accurate answers.
Prerequisites: You need Node.js (including npm) installed on your system. You may also run this via Docker if you prefer containerized deployment.
Step by step installation and run options are shown below. Pick the approach you prefer and follow the exact commands.
# Option 1: Docker (recommended for quickest start)
git clone https://github.com/Koneisto/mcp-weather.git
cd mcp-weather
cp .env.example .env # optionally add API keys
npm install && npm run build # build TypeScript
docker compose up -d
```
The server will be accessible at http://localhost:3015 via the Streamable HTTP transport.
```bash
# Option 2: Local development (stdio transport)
git clone https://github.com/Koneisto/mcp-weather.git
cd mcp-weather
npm install
npm run build
node build/index.js # runs on stdio transport
```
If you want to run from a client configuration, you can use the following example that runs the MCP server via Node and builds the index locally. It shows how to set API key placeholders for optional sources.All settings are controlled via environment variables. Copy the example to your environment file and customize keys for optional sources.
The following environment variables are shown for enabling API keys and tuning cache behavior.
OPENWEATHERMAP_API_KEY=
WEATHERAPI_KEY=
TOMORROW_IO_API_KEY=
CACHE_TTL_MINUTES=60
CACHE_MAX_ENTRIES=200
HTTP_TIMEOUT_MS=10000
```
OpenWeatherMap, WeatherAPI, and Tomorrow.io keys are optional. Open-Meteo, wttr.in, and METAR do not require keys.If you need to enable additional data sources that require keys, you can supply the keys when starting the server or via your MCP client configuration.
Example client integration shows how to embed the server in your MCP client setup. The following snippet demonstrates a client configuration that runs the weather MCP server as a local process.
Current conditions from up to 5 sources, merged into one result
1-7 day daily forecast (temperature, precipitation, wind, UV)
European AQI with PM2.5, PM10, NO2, O3, SO2, CO levels
Aviation weather (raw + decoded) from aviationweather.gov
Sunrise, sunset, day length, moon phase and illumination
Health check for all sources + cache statistics