Weatherapi MCP Server

MCP server for WeatherAPI.com — real-time weather, forecasts, history, marine, astronomy, air quality and more for AI agents

Local serverstdio

What is the Weatherapi MCP server?

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.

The short version

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 tools it exposes

The server publishes 11 tools. What each one is for:

  • 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

Getting it running

Installation 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.

What it needs from you

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.

How it compares

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.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 11 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Weatherapi.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
get_current_weatherReal-time conditions — temp, wind, humidity, UV, pressure, AQI
get_forecastUp to 14-day forecast with hourly breakdown and alerts
get_historyHistorical weather from 1 Jan 2010 onwards
get_future_weatherLong-range forecast 14–300 days ahead (Pro+ plan)
get_marine_weatherWave height, swell, tide data for coastal/ocean points
get_astronomySunrise, sunset, moonrise, moon phase, illumination
get_timezoneIANA timezone and local time for any location
search_locationsAutocomplete city/town search with coordinates
ip_lookupGeolocate an IP address or auto-detect caller's location
get_alertsGovernment weather warnings (USA, UK, Europe, worldwide)
get_sportsUpcoming football, cricket, and golf events

How to install the Weatherapi MCP server

{
  "mcpServers": {
    "weatherapi": {
      "command": "npx",
      "args": ["-y", "weatherapi-mcp"],
      "env": {
        "WEATHERAPI_KEY": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
WEATHERAPI_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Weatherapi to get current weather.
  • Use Weatherapi to get forecast.
  • Use Weatherapi to get history.

Frequently asked questions

It connects Weatherapi to MCP-compatible AI assistants such as Claude and Cursor, exposing 11 tools (get_current_weather, get_forecast, get_history, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Weatherapi directly.