Skip to main content
Glama
hlucent

korea-living-weather-index-mcp

by hlucent

korea-living-weather-index-mcp

An MCP server that implements the Living Weather Index Inquiry Service (4.0) (LivingWthrIdxServiceV5) provided by the Korea Meteorological Administration through the Public Data Portal. It can retrieve UV index and air stagnation index forecasts at 3-hour intervals, for up to 75–78 hours ahead, for approximately 3,838 locations nationwide (from the city/county/district down to the eup/myeon/dong level).

This is a separate project from the existing safemap-uv-index-mcp (UV index from the Ministry of the Interior and Safety’s Life Safety Map + the Korea Meteorological Administration forecast).

Provided Tools

get_uv_forecast

Queries the UV index forecast based on the location code (areaNo) and announcement time (time). Returns predictions at 3-hour intervals from 0 to 75 hours ahead.

UV index levels

Level

Index range

Danger

11 and above

Very high

8–10

High

6–7

Moderate

3–5

Low

0–2

get_air_diffusion_forecast

Queries the air stagnation index forecast based on the location code (areaNo) and announcement time (time). Returns predictions at 3-hour intervals from 3 to 78 hours ahead.

Air stagnation index levels

Level

Data value

Very high

100

High

75

Moderate

50

Low

25

search_area_code

Searches for a location code (areaNo) by region name (city/province, city/county/district, or town/township/village).

Related MCP server: safemap-uv-index-mcp

Installation and Execution

pip install -r requirements.txt
cp .env.example .env  # KMA_LIVING_WEATHER_SERVICE_KEY 값 입력
python server.py

Environment Variables

Environment variable

Description

KMA_LIVING_WEATHER_SERVICE_KEY

General authentication key (Decoding) issued from the Public Data Portal for “Korea Meteorological Administration - Living Weather Index Inquiry Service (4.0)”

Deployment

Distribute to fly.io. The detailed steps follow the project bootstrap document.

fly launch --no-deploy
fly secrets set KMA_LIVING_WEATHER_SERVICE_KEY=발급받은키
flyctl deploy

After deployment, append the /mcp path when connecting a connector:

https://<app-name>.fly.dev/mcp

Data Source

  • Provider: Korea Meteorological Administration

  • Platform: Public Data Portal (data.go.kr)

  • API name: Living Weather Index Inquiry Service (4.0) (LivingWthrIdxServiceV5)

  • License: KOGL (Korea Open Government License, in accordance with the Public Data Portal terms of use)

Known Limitations (actual measurements confirmed as of 2026-08-23)

  • When areaNo is sent as an empty string, it works normally as the all-stations search rather than ERROR-10. The response may be very large, however, so this option is not exposed as a tool parameter. Use area_no or area_name to query a specific point.

  • We have confirmed that the UV index response does not include the h78 field (only h0h75 exist; the h78 in the specification example appears to be a typo). Nighttime values are returned as empty strings and are treated as missing (None).

  • Air stagnation index values were confirmed by actual measurement to be exactly one of 25/50/75/100 in observed samples, but the volume of the sample is limited, so the code keeps a conservative approximate mapping logic (with 37.5 / 62.5 / 87.5 boundaries) as a safety measure.

  • Even an error response comes back as JSON when dataType=JSON is requested (not XML). The XML fallback parser is retained as a safety measure.

  • Rate limit: 3 requests per minute (per IP), a 24-hour block if more than 5 requests are made within 1 hour, and a daily cap of 20 requests (this may be effectively raised in proportion to the number of machines when deployed across multiple machines).

  • safemap-uv-index-mcp — Ministry of the Interior and Safety Life Safety Map + Korea Meteorological Administration UV index forecast (existing separate project)

Related MCP Connectors

Related MCP Servers

  • F
    license
    B
    quality
    D
    maintenance
    Connects to the Korea Meteorological Administration (KMA) Open API to provide short-term and ultra-short-term weather forecasts for South Korea. It enables users to query current weather conditions and future forecasts based on latitude and longitude.
    2
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    This MCP server provides UV index information for South Korean cities and districts, sourced from the Ministry of the Interior and Safety's living safety map, enabling filtered lookups by region and returning index values with occurrence times.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables querying Korean air quality forecasts, weekly ultrafine dust forecasts, high-concentration PM2.5 forecasts, particulate matter alarm statuses, ozone advisories, and yellow dust advisories from the AirKorea OpenAPI.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables querying real-time air quality measurements, integrated air quality index (CAI), and monitoring station information from Korea's Air Korea OpenAPI, including station search and nearby station lookup.
    MIT