Python MCP Korea Weather Service

Integrations

  • Enables secure configuration of API credentials for the Korea Meteorological Administration through environment variables.

  • Supports containerized deployment of the Korea Weather MCP server, allowing for isolated and consistent execution across different environments.

  • Stores and provides access to grid coordinates data for Korean administrative regions, enabling location-based weather queries.

韓国天気MCPサーバー

この MCP (マルチプラットフォーム通信プロトコル) サーバーは、韓国気象庁 (KMA) API へのアクセスを提供し、AI エージェントが韓国各地の天気予報情報を取得できるようにします。

概要

  • 韓国の行政地域の正確なグリッド座標を取得する
  • 韓国のあらゆる場所の詳細な短期天気予報を入手
  • 韓国のすべての行政区分(市、区、町)をサポート
  • LLM の利用に最適化された構造化テキスト応答
  • 気温、降水量、空の状態、湿度、風向、風速などの包括的な気象データ

目次

設定

前提条件

  • Python 3.12以上
  • 韓国気象庁 API 認証情報
  • API 資格情報を取得するには、 Public Data Portalにサインアップし、「기상청_단기예보 ((구)_동네예보) 조회서비스」 API へのアクセスをリクエストします。

インストール

  1. リポジトリをクローンします。
git clone https://github.com/jikime/py-mcp-ko-weather.git cd py-mcp-ko-weather
  1. UV設置
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. 仮想環境を作成し、依存関係をインストールします。
uv venv -p 3.12 source .venv/bin/activate uv pip install -r requirements.txt
  1. KMA API 資格情報を使用して.envファイルを作成します。
cp env.example .env vi .env KO_WEATHER_API_KEY=your_api_key_here
  1. グリッド座標データを Excel から SQLite に移行します。
uv run src/migrate.py
Dockerの使用
  1. Docker イメージをビルドします。
docker build -t py-mcp-ko-weather .
  1. コンテナを実行します。
docker run py-mcp-ko-weather
ローカルの使用
  1. サーバーを実行します。
mcp run src/server.py

MCP設定を構成する

MCP 設定ファイルにサーバー構成を追加します。

クロードデスクトップアプリ
  1. Smithery経由で自動的にインストールするには:
npx -y @smithery/cli install @jikime/py-mcp-ko-weather --client claude
  1. 手動でインストールするには~/Library/Application Support/Claude/claude_desktop_config.jsonを開きます。

これをmcpServersオブジェクトに追加します。

{ "mcpServers": { "Google Toolbox": { "command": "/path/to/bin/uv", "args": [ "--directory", "/path/to/py-mcp-ko-weather", "run", "src/server.py" ] } } }
カーソルIDE

~/.cursor/mcp.jsonを開く

これをmcpServersオブジェクトに追加します。

{ "mcpServers": { "Google Toolbox": { "command": "/path/to/bin/uv", "args": [ "--directory", "/path/to/py-mcp-ko-weather", "run", "src/server.py" ] } } }
Docker用
{ "mcpServers": { "Google Toolbox": { "command": "docker", "args": [ "run", "-i", "--rm", "py-mcp-ko-weather" ] } } }

クロードと一緒に使う

設定が完了すると、Claude に次のような質問をすることができます。

  • 「서울특별시 서초구 양재1동의 날씨는?」
  • 「부산광역시 해운대구 우동의 날씨 예보를 알려줘」
  • 「경기도 성남시 분당구의 현재 기온은?」

APIリファレンス

ツール

グリッド位置を取得
get_grid_location(city: str, gu: str, dong: str) -> dict

韓国気象庁APIで使用される、指定された場所のグリッド座標(nx, ny)を取得します。このツールは、市区町村、郡区、町名に基づいてデータベースから正確な座標を検索します。

予報を取得
get_forecast(city: str, gu: str, dong: str, nx: int, ny: int) -> str

KMAの超短期予報APIを呼び出し、特定の場所の天気予報情報を提供します。気温、降水量、空模様、湿度、風向、風速などの包括的な気象データを返します。

リソース

天気予報
GET http://localhost:8000/weather-instructions

ツールのワークフローや応答形式など、Korea Weather MCP サーバーの使用方法に関する詳細なドキュメントを提供します。

プロンプト

天気クエリ

サーバーには、天気に関する質問についての会話をガイドするための構造化されたプロンプト テンプレートが含まれており、効率的な情報収集と予報データの明確な提示が保証されます。

応答フォーマット

天気予報の応答は、LLM 処理に最適化された構造化テキスト形式で提供されます。

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

謝辞

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

グリッド座標と韓国気象庁 API を使用して韓国の天気情報を提供する MCP サーバー。ユーザーは、韓国の特定の場所の現在の天気状況と予報を照会できます。

  1. 概要
    1. 目次
      1. 設定
        1. 前提条件
        2. インストール
      2. MCP設定を構成する
        1. クロードデスクトップアプリ
        2. カーソルIDE
        3. Docker用
        4. クロードと一緒に使う
      3. APIリファレンス
        1. ツール
        2. リソース
        3. プロンプト
      4. 応答フォーマット
        1. 謝辞
          1. ライセンス

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              This is a Model Context Protocol (MCP) server that provides weather information using the National Weather Service (NWS) API. Features Get weather alerts for a US state Get weather forecast for a specific location (using latitude and longitude)
              Last updated -
              Python
              • Linux
              • Apple
            • A
              security
              A
              license
              A
              quality
              An MCP server that provides real-time weather information including temperature, humidity, wind speed, and sunrise/sunset times through the OpenWeatherMap API.
              Last updated -
              1
              Python
              MIT License
              • Linux
              • Apple
            • -
              security
              F
              license
              -
              quality
              An MCP server implementation that allows users to fetch and display weather information for specified cities, including temperature, humidity, wind speed, and weather descriptions.
              Last updated -
              Python
              • Linux
              • Apple
            • -
              security
              A
              license
              -
              quality
              An MCP server that connects to OpenWeatherMap's API to provide current weather data and multi-day forecasts for locations worldwide in different measurement units.
              Last updated -
              51
              TypeScript
              MIT License

            View all related MCP servers

            ID: mnve9iamp0