Skip to main content
Glama

Weather MCP Server

Model Context Protocol (MCP) サーバーの実装プロジェクトです。天気情報を提供するツールを実装します。

参考ドキュメント

システム要件

  • Python 3.10以上

  • uv (Pythonパッケージマネージャー)

セットアップ

# 仮想環境の作成とアクティベート uv venv source .venv/bin/activate # 依存関係のインストール uv add "mcp[cli]" httpx

実行方法

uv run main.py

提供するツール

ツール名

説明

get_alerts

米国の州の気象警報を取得

get_forecast

緯度・経度から天気予報を取得

Claude for Desktop への統合

~/Library/Application Support/Claude/claude_desktop_config.json を編集:

{ "mcpServers": { "weather": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/weather", "run", "main.py" ] } } }

注意事項

  • STDIOベースのサーバーでは print() を使用しないこと(JSON-RPCメッセージが破損する)

  • ログ出力には logging モジュールを使用する

-
security - not tested
F
license - not found
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kohei-Suzuki22/weather_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server