Weather Query MCP Server
天気クエリMCPサーバー/クライアントの例
このプロジェクトは、MCP (モデル クライアント プロトコル) サーバーと対話して、指定された都市の天気情報を取得して表示する天気クエリ クライアントです。
特徴
MCP サーバーに接続して、利用可能なツールを一覧表示します。
指定された都市の天気情報を照会します。
温度、湿度、風速、天気の説明など、フォーマットされた天気情報を表示します。
Related MCP server: Open Weather13 MCP Server
要件
Python 3.8以上
openaiライブラリdotenvライブラリmcpライブラリ
設定
リポジトリをクローンします。
git clone <repository_url> cd <repository_directory>仮想環境を作成してアクティブ化します。
python -m venv .venv source .venv/bin/activate # On Windows use `.venv\Scripts\activate`必要な依存関係をインストールします。
pip install -r requirements.txtルート ディレクトリに
.envファイルを作成し、OpenAI API キーとその他の構成を追加します。OPENAI_API_KEY=<your_openai_api_key> BASE_URL=<your_base_url> MODEL=<your_model>
使用法
MCP サーバーを起動します。
python server.pyクライアントを実行してサーバーに接続します。
python client.py <path_to_server_script>クライアントと対話する:
天気情報を取得するには、英語で都市名を入力します。
クライアントを終了するには、
quit入力します。
プロジェクト構造
server.py: MCP サーバーの実装と天気クエリ ツールが含まれています。client.py: サーバーと対話するための MCP クライアント実装が含まれています。.env: API キーと構成の環境変数。.gitignore: git によって無視されるファイルとディレクトリを指定します。README.md: プロジェクトのドキュメント。
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server for weather information by @kulybaba
An MCP server for weather information by @kulybaba
MCP server for weather with reasoning — umbrella advice, outdoor checks, city comparisons.
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that provides access to the Interzoid GetWeatherCity API, allowing users to retrieve weather information for specified cities through natural language interactions.-
- FlicenseCqualityDmaintenanceAn MCP server that provides access to current weather data and 5-day forecasts via the Open Weather13 API. It enables users to retrieve weather information using city names or geographic coordinates across various languages.3-
- AlicenseNot gradedqualityDmaintenance基于OpenWeatherMap API的天气查询MCP服务器,支持全球城市天气信息查询,包括温度、湿度和天气描述,并支持摄氏度和华氏度单位切换。MIT
- FlicenseAqualityDmaintenanceMCP server that integrates OpenWeatherMap API to fetch current weather for a specified city.1-