Korea Weather Forecast
STDIOMCP server providing access to Korea Meteorological Administration APIs for weather forecasts.
MCP server providing access to Korea Meteorological Administration APIs for weather forecasts.
This MCP (Multi-platform Communication Protocol) server provides access to Korea Meteorological Administration (KMA) APIs, allowing AI agents to retrieve weather forecast information for locations in South Korea.
git clone https://github.com/jikime/py-mcp-ko-weather.git cd py-mcp-ko-weather
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv -p 3.12 source .venv/bin/activate uv pip install -r requirements.txt
.env
file with your KMA API credentials:cp env.example .env
vi .env
KO_WEATHER_API_KEY=your_api_key_here
uv run src/migrate.py
docker build -t py-mcp-ko-weather .
docker run py-mcp-ko-weather
mcp run src/server.py
mcp dev server.py
Add the server configuration to your MCP settings file:
npx -y @smithery/cli install @jikime/py-mcp-ko-weather --client claude
~/Library/Application Support/Claude/claude_desktop_config.json
Add this to the mcpServers
object:
{ "mcpServers": { "Google Toolbox": { "command": "/path/to/bin/uv", "args": [ "--directory", "/path/to/py-mcp-ko-weather", "run", "src/server.py" ] } } }
open ~/.cursor/mcp.json
Add this to the mcpServers
object:
{ "mcpServers": { "Google Toolbox": { "command": "/path/to/bin/uv", "args": [ "--directory", "/path/to/py-mcp-ko-weather", "run", "src/server.py" ] } } }
{ "mcpServers": { "Google Toolbox": { "command": "docker", "args": [ "run", "-i", "--rm", "py-mcp-ko-weather" ] } } }
Once configured, you can ask Claude questions like:
get_grid_location(city: str, gu: str, dong: str) -> dict
Retrieves the grid coordinates (nx, ny) used by the Korea Meteorological Administration API for the specified location. This tool searches the database for the exact coordinates based on city/province, district/county, and neighborhood/town information.
get_forecast(city: str, gu: str, dong: str, nx: int, ny: int) -> str
Calls the KMA's ultra-short-term forecast API to provide weather forecast information for a specific location. Returns comprehensive weather data including temperature, precipitation, sky condition, humidity, wind direction, and wind speed.
GET weather://instructions
Provides detailed documentation on how to use the Korea Weather MCP server, including tool workflows and response formats.
The server includes a structured prompt template for guiding conversations about weather queries, ensuring efficient information gathering and clear presentation of forecast data.
Weather forecast responses are provided in structured text format, optimized for LLM processing:
Weather forecast for 서울특별시 서초구 양재1동 (coordinates: nx=61, ny=125)
Date: 2025-05-01
Time: 15:00
Current conditions:
Temperature: 22.3°C
Sky condition: Mostly clear
Precipitation type: None
Precipitation probability: 0%
Humidity: 45%
Wind direction: Northwest
Wind speed: 2.3 m/s
Hourly forecast:
16:00 - Temperature: 21.8°C, Sky: Clear, Precipitation: None
17:00 - Temperature: 20.5°C, Sky: Clear, Precipitation: None
18:00 - Temperature: 19.2°C, Sky: Clear, Precipitation: None
...
This project is licensed under the MIT License - see the LICENSE file for details.