Skip to main content
Glama
wttr.in Weather MCP

wttr.in Weather MCP

by zhbjerry

wttr.in Weather MCP

An open-source stdio MCP server backed by wttr.in. It exposes a convenient structured weather tool and a general request tool for the documented wttr.in formats.

Install

Requires Node.js 20 or newer and network access to https://wttr.in.

npx -y wttr-in-mcp

The server communicates over stdio and waits for an MCP client after startup. It does not open an HTTP port.

Related MCP server: Weather MCP Server

MCP client configuration

npm install wttr-in-mcp

For clients that support npx, add:

{
  "mcpServers": {
    "weather": {
      "command": "npx",
      "args": ["-y", "wttr-in-mcp"]
    }
  }
}

Tools

get_weather

Returns the complete wttr.in JSON response, with the forecast limited to the requested number of days. The original astronomy.moon_phase, moon_illumination, moonrise, and moonset fields are preserved. Each moon phase entry also includes moon_phase_emoji using the wttr.in mapping:

Phase

Emoji

New Moon

πŸŒ‘

Waxing Crescent

πŸŒ’

First Quarter

πŸŒ“

Waxing Gibbous

πŸŒ”

Full Moon

πŸŒ•

Waning Gibbous

πŸŒ–

Last/Third Quarter

πŸŒ—

Waning Crescent

🌘

Arguments:

  • location: a city, airport code, or latitude,longitude. Omit it to let wttr.in locate the server by IP.

  • days: 1 to 3, defaulting to 3.

  • language: an optional wttr.in language code such as zh or en.

The response preserves all top-level fields and units returned by wttr.in.

wttr_request

Provides access to the documented wttr.in output formats:

format

Output

Typical formatCode

json

Full structured JSON

j1 or j2

text

Plain text, custom text, or ANSI-compatible output

1, 2, 3, 4, %l:+%c+%t, %m

html

HTML weather page

omit

prometheus

Prometheus metrics

p1

png

PNG image returned as MCP image content

omit

moon

JSON moon-phase data

j1

Arguments:

  • location: city, airport code, coordinates, IP, domain, Moon, Moon@2026-11-05, or multiple locations separated by :.

  • format: one of json, text, html, prometheus, png, or moon.

  • formatCode: a wttr.in format code such as j1, j2, p1, 3, or %m.

  • shortOptions: short options such as m, u, M, 0, 1, 2, q, T, or PNG options such as 0tqp.

  • params: additional query parameters such as { "lang": "zh" }, { "m": "" }, or { "transparency": "150" }.

Examples:

{"location":"Shanghai","format":"json","formatCode":"j2","params":{"lang":"zh","m":""}}
{"location":"London","format":"text","formatCode":"%m"}
{"location":"Moon@2026-11-05","format":"text","formatCode":"%m"}
{"location":"Paris","format":"png","shortOptions":"0qp"}
{"location":"Detroit","format":"prometheus","formatCode":"p1"}

The server supports the public URL and output conventions documented by wttr.in. It does not proxy undocumented internal endpoints.

Development

npm install
npm test

Open source

This project is released under the MIT License. Weather data is provided by wttr.in; please review its service terms and usage limits before deploying at scale. Contributions and bug reports are welcome through GitHub Issues and Pull Requests.

Available Tools

2 tools
get_weatherA

Get current weather and a forecast of up to three days from wttr.in. Omit location to use the server IP location.

Inputs: days, language, location.

wttr_requestC

Access documented wttr.in output formats and query options, including JSON, text, HTML, Prometheus, PNG, custom formats, and moon phase emoji.

Inputs: format, params, location, formatCode, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 2 tools

    Disambiguation4/5

    get_weather is a convenience tool for current conditions/forecast, while wttr_request exposes wttr.in's raw output formats and query options, so the intent separation is clear. There is some overlap since wttr_request with JSON format could reproduce get_weather's output, but the descriptions steer selection reasonably well.

    Naming Consistency3/5

    get_weather follows a verb_noun convention, but wttr_request mixes a service-prefix with a noun and no action verb. The two names are readable and interpretable but do not follow a single predictable pattern.

    Tool Count3/5

    Two tools is thin for a weather server, and the entire surface leans on one catch-all raw-request tool. It's defensible for a simple wttr.in wrapper, but borderline minimal given typical expectations for forecast, location lookup, and formats.

    Completeness4/5

    Current weather, up to three-day forecast, and arbitrary wttr.in formats/options via wttr_request are all covered, which is close to the full domain of the service. Minor gaps exist (no dedicated geocoding/location search, forecast length capped at three days), but agents can work around these with the raw request tool.

    Maintenance

    ActivityMaintained
    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
      Not graded
      quality
      D
      maintenance
      Provides current weather data and hourly forecasts for any location worldwide using the Open-Meteo API, accessible through HTTP transport without requiring an API key.
      13 npm
      MIT
    • 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 weather data including current conditions, daily forecasts up to 16 days, and hourly forecasts up to 7 days, using the free Open-Meteo API with no API key required.
      1
      MIT