WeatherAPI MCP Server
weatherapi-mcp
Official MCP (Model Context Protocol) server for WeatherAPI.com. Gives AI agents like Claude direct access to real-time weather, forecasts, historical data, astronomy, marine weather, air quality, and more.
Quick Start
# Run directly with npx (no install needed)
WEATHERAPI_KEY=your_api_key npx weatherapi-mcpGet a free API key at weatherapi.com/signup.aspx
Related MCP server: Weather MCP Server
Setup in Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"weatherapi": {
"command": "npx",
"args": ["-y", "weatherapi-mcp"],
"env": {
"WEATHERAPI_KEY": "your_api_key_here"
}
}
}
}Config file locations:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Restart Claude Desktop after editing.
Setup in Cursor
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"weatherapi": {
"command": "npx",
"args": ["-y", "weatherapi-mcp"],
"env": {
"WEATHERAPI_KEY": "your_api_key_here"
}
}
}
}Available Tools
Tool | Description |
| Real-time conditions — temp, wind, humidity, UV, pressure, AQI |
| Up to 14-day forecast with hourly breakdown and alerts |
| Historical weather from 1 Jan 2010 onwards |
| Long-range forecast 14–300 days ahead (Pro+ plan) |
| Wave height, swell, tide data for coastal/ocean points |
| Sunrise, sunset, moonrise, moon phase, illumination |
| IANA timezone and local time for any location |
| Autocomplete city/town search with coordinates |
| Geolocate an IP address or auto-detect caller's location |
| Government weather warnings (USA, UK, Europe, worldwide) |
| Upcoming football, cricket, and golf events |
Location Formats
The q parameter accepts:
City name:
London,New York,TokyoCoordinates:
51.5,-0.1US zip:
10001UK postcode:
SW1A 1AAIATA airport:
iata:LHRIP address:
100.0.0.1Auto-detect:
auto:ip
Example Prompts
Once connected, ask Claude:
"What's the weather like in Glasgow right now?"
"Will it rain in London this weekend? Show me hourly."
"What was the weather in Paris on 15 June 2024?"
"What time does the sun rise in Tokyo tomorrow?"
"Are there any weather warnings active for New York?"
"What's the wave height off the coast of Cornwall today?"
"What timezone is Sydney in and what time is it there now?"
Plans
Plan | Price | Calls/month |
Free | $0 | 100,000 |
Starter | $7/mo | 3,000,000 |
Pro+ | $25/mo | 5,000,000 |
Business | $65/mo | 10,000,000 |
Enterprise | Custom | Custom |
Links
License
MIT
Available Tools
11 toolsget_alertsA
Get active government weather alerts and warnings for a location. Covers USA, UK, Europe, and rest of world. Returns headline, severity, urgency, affected areas, and full description.
Inputs: q (required).
get_astronomyB
Get astronomy data for a location and date: sunrise, sunset, moonrise, moonset, moon phase, and moon illumination percentage.
Inputs: q (required), dt (required).
get_current_weatherA
Get real-time current weather for any location. Returns temperature, wind speed and direction, humidity, pressure, UV index, visibility, feels-like temperature, and weather condition. Optionally includes air quality (AQI) data.
Inputs: q (required), aqi.
get_forecastA
Get weather forecast for 1 to 14 days. Returns daily summaries (max/min/avg temp, rain chance, UV, wind) and hourly breakdowns. Also returns current conditions, astronomy data (sunrise/sunset/moon phase), and optionally weather alerts and air quality.
Inputs: q (required), days, alerts, aqi.
get_future_weatherA
Get future weather forecast for a date between 14 and 300 days from today. Returns 3-hourly data. Available on Pro+ plan and above.
Inputs: q (required), dt (required).
get_historyA
Get historical weather data for a specific date from 1 January 2010 onwards. Returns daily summary and full hourly breakdown. Useful for past weather lookups, analytics, and backtesting.
Inputs: q (required), dt (required), end_dt.
get_marine_weatherB
Get marine and sailing weather forecast including significant wave height, swell height, swell direction, swell period, and optionally tide data. Useful for nautical and coastal planning.
Inputs: q (required), days, tides.
get_sportsB
Get upcoming sports events (football/soccer, cricket, golf) for a location, with stadium, country, tournament name, and start time.
Inputs: q (required).
get_timezoneA
Get timezone and current local time for any location. Returns IANA timezone ID (e.g. Europe/London), local time string, and unix epoch.
Inputs: q (required).
ip_lookupA
Look up geolocation data for an IP address: city, region, country, coordinates, timezone, and whether it's in the EU. Pass 'auto:ip' to geolocate the caller's own IP address.
Inputs: q (required).
search_locationsA
Search for cities and towns by partial name or postcode. Returns an array of matching locations with their coordinates, region, country, and URL slug. Useful for building location pickers or resolving ambiguous place names.
Inputs: q (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Every tool has a clearly distinct purpose with no overlap; each targets a specific weather or location-related function (e.g., current weather, alerts, astronomy, marine, sports, timezone), making misselection unlikely. The descriptions reinforce unique scopes, such as separating forecast from history or marine from general weather.
All tools follow a consistent verb_noun pattern (e.g., get_alerts, get_astronomy, get_current_weather), with no deviations in style or convention. This predictability aids in easy identification and usage across the tool set.
With 11 tools, the count is well-scoped for a weather API server, covering diverse aspects like current conditions, forecasts, history, marine data, and location utilities. Each tool earns its place without feeling excessive or insufficient for the domain.
The tool set provides comprehensive coverage for weather and location services, including CRUD-like operations (e.g., get, search) across current, forecast, historical, marine, and astronomy data, plus utilities like timezone and IP lookup. No obvious gaps exist for typical agent workflows in this domain.
Maintenance
Related MCP Connectors
Worldwide weather forecasts hour by hour and day by day: rain, UV, wind, sea state and temperature
Weather data, forecast API, climate data, historical weather, alerts, agricultural & travel weather.
Marine and outdoor weather: multi-model forecasts, official bulletins, tides, anchorages.
Global weather API: forecasts, historical data, marine, ski, astronomy and timezone.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides 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.1-
- AlicenseAqualityCmaintenanceProvides real-time, historical, and forecasted weather data for any location worldwide using the Open-Meteo API. It includes specialized tools for agricultural growing conditions, weather alerts, and up to 16 days of forecasts across multiple transport modes.6ISC
- AlicenseNot gradedqualityDmaintenanceProvides real-time weather information and multi-day forecasts for global locations using city names, coordinates, or ZIP codes. It includes tools for current conditions, forecasting, and weather summaries designed for activity planning.MIT
- AlicenseNot gradedqualityDmaintenanceGlobal weather intelligence for AI assistants providing 10 weather tools — forecasts, historical data, air quality, marine, geocoding, elevation, and climate projections at 1km resolution with 80+ years of archive.1MIT