
saintdoresh/weather-mcp-claudedesktop
Analytics & monitoringこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
MCP (Model Context Protocol) は、OpenWeatherMap API を使用してリアルタイム気象データ、予測、および履歴気象情報を提供するツールで、特にClaude Desktop 用に設計されています.
概要
MCP (Model Context Protocol) は、OpenWeatherMap API を使用してリアルタイム気象データ、予測、および履歴気象情報を提供するツールで、特にClaude Desktop 用に設計されています。 このツールのセットアップと使用に関する詳細なガイドについては、当社の包括的な中型チュートリアルを参照してください: チュートリアル: Claude Desktop with Weather MCP Toolを使用して、リアルタイム気象データを世界中でアクセス - 任意の場所のリアルタイム気象条件 - 天気予報(最大5日間) - 歴史的気象データ(過去5日間) - 航空品質情報 - 気象警報と警告 - ロケーション検索機能 1。 Python 3.10以上インストールされていることを確認してください 3。 OpenWeatherMapからAPIキーを取得する(利用可能な無料のティア) - 注意:新しいAPIキーは、最大24時間有効にすることができます 4。 APIキー(recommended method):環境変数を設定 - プロジェクトディレクトリに.envファイルを作成する - ファイルにAPIキーを追加: - .gitignoreファイルに.envを追加して、機密データをコミットするのを防ぐ 5.
概要(AI 翻訳)
MCP (Model Context Protocol) は、OpenWeatherMap API を使用してリアルタイム気象データ、予測、および履歴気象情報を提供するツールで、特にClaude Desktop 用に設計されています。
チュートリアル
このツールの設定と使用に関する詳細なガイドについては、当社の包括的な中型チュートリアルをご覧ください。 チュートリアル: 気象MCPツールを使用してClaudeデスクトップを使用して、リアルタイム気象データにアクセス
##特徴
- 任意の場所のためのリアルタイム気象条件
- 天気予報(最大5日間)
- 過去の気象データ(過去5日間)
- 空気の質情報
- 気象警報と警告
- ロケーション検索機能
セットアップ
1。 Python 3.10以上インストールされていることを確認してください
- 依存関係を取付けて下さい:
3。 OpenWeatherMapからAPIキーを取得する(利用可能な無料のティア)
- 注意: 新しい API キーは 24 時間まで有効にするために取ることができます
- APIキー(recommended method)の環境変数をセットアップして下さい:
-
プロジェクトディレクトリに[
.envファイルを作成する -
API キーをファイルに追加します。
-
[
.envを.gitignore] に追加して、機密データのコミットを防ぐ
- 環境変数を使用するために[[
main.pyを更新して下さい:
#Claudeデスクトップとの統合
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Weather MCP Tool for Claude Desktop
An MCP (Model Context Protocol) tool that provides real-time weather data, forecasts, and historical weather information using the OpenWeatherMap API, specifically designed for Claude Desktop.
Tutorial
For a detailed guide on setting up and using this tool, check out our comprehensive Medium tutorial: Tutorial: Using Claude Desktop with Weather MCP Tool to Access Real-Time Weather Data Worldwide
Features
- Real-time weather conditions for any location
- Weather forecasts (up to 5 days)
- Historical weather data (last 5 days)
- Air quality information
- Weather alerts and warnings
- Location search functionality
Setup
-
Ensure you have Python 3.10 or higher installed
-
Install dependencies:
pip install -r requirements.txt
-
Get an API key from OpenWeatherMap (free tier available)
- Note: New API keys may take up to 24 hours to activate
-
Set up environment variables for API key (recommended method):
- Create a
.envfile in the project directory - Add your API key to the file:
OPENWEATHER_API_KEY=your_openweathermap_api_key- Add
.envto your.gitignorefile to prevent committing sensitive data
- Create a
-
Update
main.pyto use the environment variable:# Add these imports at the top import os from dotenv import load_dotenv # Load environment variables load_dotenv() # Replace the API_KEY line with API_KEY = os.getenv("OPENWEATHER_API_KEY")
Integration with Claude Desktop
- Configure your MCP settings in Claude Desktop by adding the following to your MCP configuration:
{
"mcpServers": {
"weather-mcp": {
"command": "py",
"args": ["-3.13", "C:\\Path\\To\\Your\\Weather-MCP-ClaudeDesktop\\main.py"]
}
}
}
- Replace the path with the full path to your main.py file
- Run the server using:
py -3.13 main.py
- Keep the server running while using Claude Desktop
Available Tools
1. get_current_weather
Get real-time weather conditions for a location:
{
"location": {
"name": "New York",
"country": "US",
"lat": 40.7128,
"lon": -74.006
},
"temperature": {
"current": 25.6,
"feels_like": 26.2,
"min": 23.4,
"max": 27.8
},
"weather_condition": {
"main": "Clear",
"description": "clear sky",
"icon": "01d"
},
"wind": {
"speed": 3.6,
"deg": 220
},
"clouds": 5,
"humidity": 65,
"pressure": 1015,
"visibility": 10000,
"sunrise": "2025-03-16T06:12:34",
"sunset": "2025-03-16T18:04:23",
"timestamp": "2025-03-16T14:30:00"
}
2. get_weather_forecast
Get weather forecast for a location:
{
"location": {
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"weather-mcp": {
"command": "py",
"args": ["-3.13", "C:\\Path\\To\\Your\\Weather-MCP-ClaudeDesktop\\main.py"]
}
}
}