Python MCP Korea Weather Service
This is a Korean weather information service using the MCP (Model Control Protocol) server.
How to install
- Clone this repository:
Copy
- uv installation
Copy
- Create a virtual environment using uv and install the necessary packages:
Copy
- Set your Met Office API key in your .env file:
Copy
- Migrate data from the weather grid coordinates in Excel to SQLite.
Copy
How to issue a Meteorological Agency API key
- Access the public data portal , register as a member, and log in.
- Search for and apply for use of the "Korea Meteorological Administration_Short-term Forecast ((old)_Neighborhood Forecast) Inquiry Service" API.
- After approval, set the received API key in the .env file.
Configuring MCP Tools
Open the ~/Library/Application\ Support/Claude/claude_desktop_config.json file and add the weather server.
Copy
How to run
- Launch Claude Desktop to make sure it's added to your tools.
- Try typing "What's the weather like in Yangjae 1-dong, Seocho-gu, Seoul?" in the chat input box.
Function Description
This MCP server provides the following features:
Tools
- Get location coordinates (
get_grid_location
)- Description: Retrieves grid coordinates (nx, ny) used in the Korea Meteorological Administration API. Based on the city/province, district/county, and town/village information entered by the user, it searches the database for and returns the Korea Meteorological Administration grid coordinates for the corresponding area. This tool is essential for obtaining accurate coordinate values required for calling the Korea Meteorological Administration API.
- Parameters:
city
: city/province name (e.g. "Seoul")gu
: District/county name (e.g. "Seocho-gu")dong
: name of a dong/town/village (e.g. "Yangjae 1-dong")
- Data is retrieved from an embedded SQLite database (
data/weather_grid.db
).
- Get weather forecast (
get_forecast
)- Description: Provides weather forecast information for a specific area by calling the Korea Meteorological Administration's short-term forecast API. It retrieves current weather information based on the user-entered area information and grid coordinates. This tool includes detailed weather information such as temperature, precipitation, sky conditions, humidity, wind direction, and wind speed, and provides short-term forecasts of up to 6 hours.
- Parameters:
city
: city/province name (e.g. "Seoul")gu
: District/county name (e.g. "Seocho-gu")dong
: name of a dong/town/village (e.g. "Yangjae 1-dong")nx
: X grid coordinateny
: Y grid coordinate
Resources
Weather Service User Manual ( weather-instructions
)
- URI:
weather-instructions
- Description: A detailed guide explaining how to use the Korea Meteorological Service. This resource provides all the information you need to use the service, including how to use the tool, the workflow, and the response format. It contains structured information to help LLMs effectively utilize the weather tool.
Prompts
Weather information query prompt ( weather-query
)
- Description: A conversational prompt template for querying weather information for the Korean region. This prompt guides a structured conversation between the user and the LLM, suggesting the appropriate tool sequence and response format. It shows how to collect the necessary information from the user and provide a clear weather forecast.
License
Apache License 2.0
This server cannot be installed
MCP server that provides Korean weather information using grid coordinates and the Korea Meteorological Administration API, allowing users to query current weather conditions and forecasts for specific locations in Korea.