yharuto0917/JPWeatherMCP
3.2
If you are the rightful owner of JPWeatherMCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
JPWeatherMCP is a Model Context Protocol server that provides access to weather forecast data for regions in Japan using data from the Japan Meteorological Agency.
Tools
2
Resources
0
Prompts
0
🌦️ JPWeatherMCP
日本の気象庁のデータを利用して、指定した地域の天気情報を取得するためのMCP (Model Context Protocol) サーバーです。
📝 概要
このプロジェクトは、AIアシスタントやその他のエージェントが日本の天気予報データに簡単にアクセスできるようにするためのツールを提供します。
@modelcontextprotocol/sdk を使用して構築されており、2つの主要な機能を提供します。
🛠️ 主な機能
このMCPサーバーは、以下のツールを登録・提供します。
1. getWeatherAreaCodeData
気象情報を取得するために必要となる、各地域のエリアコードを取得します。
- 📜 説明: 全国のエリアコードデータを取得します。
- 📥 入力: なし
- 📤 出力: JSON形式のエリアコードデータ
2. getWeather
指定したエリアコードに基づいて、その地域の天気予報データを取得します。
- 📜 説明: 指定した
cityCodeの天気予報を取得します。cityCodeが不明な場合は、まずgetWeatherAreaCodeDataツールを使用してください。 - 📥 入力:
cityCode(string) - 📤 出力: JSON形式の天気予報データ
🚀 セットアップと実行方法
✅ 前提条件
- Node.js
📦 インストール
GitHubからソースコードを取得し、プロジェクトのルートディレクトリに移動します。
git clone https://github.com/yharuto0917/JPWeatherMCP.git
cd JPWeatherMCP
プロジェクトの依存関係をインストールします。
npm install
🔨 ビルド
TypeScriptソースコードをJavaScriptにコンパイルします。
npm run build
💻 実装
- Claude Desktop
~/Library/Application Support/Claudeへ移動します。
cd ~/Library/Application Support/Claude
claude_desktop_config.jsonを編集します。
code claude_desktop_config.json
- 以下の内容を追加します。
{
"mcpServers": {
"jpweathermcp": {
"command": "node",
"args": [
"<ディレクトリの絶対パスで指定>/build/index.js"
]
}
}
}
- Gemini CLI
- GeminiCLIのルートディレクトリへ移動します。
settings.jsonを編集します。
code settings.json
- 以下の内容を追加します。
{
"mcpServers": {
"jpweathermcp": {
"command": "node",
"args": [
"<ディレクトリの絶対パスで指定>/build/index.js"
]
}
}
}
🔧 使用技術
- TypeScript
- Node.js
- @modelcontextprotocol/sdk - MCPサーバー構築用SDK
- Zod - 型スキーマの定義とバリデーション