Skip to main content
Glama
WeatherAPI MCP Server

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-mcp

Get 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.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • Linux: ~/.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

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

Location Formats

The q parameter accepts:

  • City name: London, New York, Tokyo

  • Coordinates: 51.5,-0.1

  • US zip: 10001

  • UK postcode: SW1A 1AA

  • IATA airport: iata:LHR

  • IP address: 100.0.0.1

  • Auto-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

License

MIT

Available Tools

11 tools
get_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

    A4/5.0

    Scored across 11 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness5/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      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.
      1
      -
    • A
      license
      A
      quality
      C
      maintenance
      Provides 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.
      6
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides 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
    • A
      license
      Not graded
      quality
      D
      maintenance
      Global 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.
      1
      MIT