MCP server for WeatherAPI.com — real-time weather, forecasts, history, marine, astronomy, air quality and more for AI agents
MCP server for WeatherAPI.com — real-time weather, forecasts, history, marine, astronomy, air quality and more for AI agents. That is what the weatherapi mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.
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.
The server publishes 11 tools. What each one is for:
get_current_weather — Real-time conditions — temp, wind, humidity, UV, pressure, AQIget_forecast — Up to 14-day forecast with hourly breakdown and alertsget_history — Historical weather from 1 Jan 2010 onwardsget_future_weather — Long-range forecast 14–300 days ahead (Pro+ plan)get_marine_weather — Wave height, swell, tide data for coastal/ocean pointsget_astronomy — Sunrise, sunset, moonrise, moon phase, illuminationget_timezone — IANA timezone and local time for any locationsearch_locations — Autocomplete city/town search with coordinatesip_lookup — Geolocate an IP address or auto-detect caller's locationget_alerts — Government weather warnings (USA, UK, Europe, worldwide)get_sports — Upcoming football, cricket, and golf eventsInstallation goes through your MCP client rather than a global install: point it at weatherapi-mcp on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.
Configuration is passed through the environment: WEATHERAPI_KEY. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Weatherapi's toolset — get_current_weather, get_forecast, get_history and 8 more — is a fair guide to whether it matches your workflow. It is maintained by weatherapicom; worth a glance at recent repository activity before you build anything load-bearing on it.
SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.
| Tool | What it does |
|---|---|
| get_current_weather | Real-time conditions — temp, wind, humidity, UV, pressure, AQI |
| get_forecast | Up to 14-day forecast with hourly breakdown and alerts |
| get_history | Historical weather from 1 Jan 2010 onwards |
| get_future_weather | Long-range forecast 14–300 days ahead (Pro+ plan) |
| get_marine_weather | Wave height, swell, tide data for coastal/ocean points |
| get_astronomy | Sunrise, sunset, moonrise, moon phase, illumination |
| get_timezone | IANA timezone and local time for any location |
| search_locations | Autocomplete city/town search with coordinates |
| ip_lookup | Geolocate an IP address or auto-detect caller's location |
| get_alerts | Government weather warnings (USA, UK, Europe, worldwide) |
| get_sports | Upcoming football, cricket, and golf events |
{
"mcpServers": {
"weatherapi": {
"command": "npx",
"args": ["-y", "weatherapi-mcp"],
"env": {
"WEATHERAPI_KEY": "your-value"
}
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
| Variable | Description | Required |
|---|---|---|
| WEATHERAPI_KEY | Credential the server authenticates with. | Yes |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.