/ ディレクトリ / プレイグラウンド / weather-mcp-server
● コミュニティ ezh0v ⚡ 即起動

weather-mcp-server

作者 ezh0v · ezh0v/weather-mcp-server

A tiny Go MCP that answers 'what's the weather in X?' using WeatherAPI — one tool, one env var, zero ceremony.

weather-mcp-server is a minimal Go server exposing a single current_weather tool that calls WeatherAPI.com. Useful as a 'hello world' MCP, a building block for location-aware agents, or a quick way to add weather awareness without pulling in a heavier maps MCP.

なぜ使うのか

主な機能

ライブデモ

実際の動作

weather.replay ▶ 準備完了
0/0

インストール

クライアントを選択

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "weather": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/ezh0v/weather-mcp-server"
      ],
      "_inferred": true
    }
  }
}

Claude Desktop → Settings → Developer → Edit Config を開く。保存後、アプリを再起動。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "weather": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/ezh0v/weather-mcp-server"
      ],
      "_inferred": true
    }
  }
}

Cursor は Claude Desktop と同じ mcpServers スキーマを使用。プロジェクト設定はグローバルより優先。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "weather": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/ezh0v/weather-mcp-server"
      ],
      "_inferred": true
    }
  }
}

Cline サイドバーの MCP Servers アイコンをクリックし、"Edit Configuration" を選択。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "weather": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/ezh0v/weather-mcp-server"
      ],
      "_inferred": true
    }
  }
}

Claude Desktop と同じ形式。Windsurf を再起動して反映。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "weather",
      "command": "TODO",
      "args": [
        "See README: https://github.com/ezh0v/weather-mcp-server"
      ]
    }
  ]
}

Continue はマップではなくサーバーオブジェクトの配列を使用。

~/.config/zed/settings.json
{
  "context_servers": {
    "weather": {
      "command": {
        "path": "TODO",
        "args": [
          "See README: https://github.com/ezh0v/weather-mcp-server"
        ]
      }
    }
  }
}

context_servers に追加。保存時に Zed がホットリロード。

claude mcp add weather -- TODO 'See README: https://github.com/ezh0v/weather-mcp-server'

ワンライナー。claude mcp list で確認、claude mcp remove で削除。

ユースケース

実用的な使い方: weather-mcp-server

Give your personal assistant weather awareness

👤 Anyone using Claude as a daily assistant ⏱ ~10 min beginner

使うタイミング: You ask Claude for weather and it keeps saying 'I don't have real-time data'. Fix that in 5 minutes.

前提条件
  • WeatherAPI.com free API key — weatherapi.com/signup — 1M calls/month free
フロー
  1. Set up and connect
    Install weather-mcp-server via Docker with WEATHER_API_KEY=... and connect from Claude Desktop.✓ コピーしました
    current_weather tool visible
  2. Ask naturally
    What's the weather like in Tokyo right now? Should I bring a jacket for a walk?✓ コピーしました
    → Real-time conditions + actionable suggestion

結果: Instant weather checks without a separate app.

注意点
  • Free tier limits + no forecast endpoint here — This tool is current-conditions only; use weatherapi's REST API directly for 7-day forecast or swap to a more feature-rich weather MCP

Generate a morning travel briefing for multiple cities

👤 Frequent travelers, remote teams ⏱ ~5 min beginner

使うタイミング: You coordinate with colleagues in 4 time zones and want to know if the New York team is in a blizzard before your 9 AM call.

フロー
  1. Call per city
    Get current weather for New York, London, Tokyo, São Paulo. Summarize in one sentence each.✓ コピーしました
    → 4-city brief

結果: 30-second daily ops awareness across your distributed team.

注意点
  • API rate limit if called every minute across many cities — Cache for 15 minutes; weather doesn't change that fast

組み合わせ

他のMCPと組み合わせて10倍の力を

weather + google-map

Plan an outdoor trip weighing both route and weather

Plan a route for 3 outdoor stops in LA. For each, also check current weather; warn if precipitation.✓ コピーしました

ツール

このMCPが提供する機能

ツール入力呼び出すタイミングコスト
current_weather city: str Anything weather-related 1 WeatherAPI call (free up to 1M/mo)

コストと制限

運用コスト

APIクォータ
WeatherAPI free: 1M calls/month, 10/sec
呼び出しあたりのトークン
~200 tokens per response
金額
Free for personal use; paid plans start at $4/mo for higher tiers
ヒント
Cache results for 10-15 minutes — weather doesn't change faster than that.

セキュリティ

権限、シークレット、影響範囲

認証情報の保管: WEATHER_API_KEY env var
データ送信先: Outbound to api.weatherapi.com only

トラブルシューティング

よくあるエラーと対処法

401 from WeatherAPI

WEATHER_API_KEY not set or invalid. Get one at weatherapi.com/my/.

確認: curl 'http://api.weatherapi.com/v1/current.json?key=$KEY&q=London'
City not found

Use full name with country: 'Paris, France' not 'Paris'. Or use coordinates 'lat,lng'.

Build fails: go module errors

Requires Go 1.21+. go version to check. Or use the Docker image.

代替案

weather-mcp-server 他との比較

代替案代わりに使う場面トレードオフ
Open-Meteo MCPYou want no API key at allFree, no key, but requires lat/lng (no city name geocoding)
National Weather Service MCPUS-only and you want forecasts + alertsUS-only; richer data

その他

リソース

📖 GitHub の公式 README を読む

🐙 オープンな issue を見る

🔍 400以上のMCPサーバーとSkillsを見る