● Communauté
ezh0v
⚡ Instantané
weather-mcp-server
par 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.
Pourquoi l'utiliser
Fonctionnalités clés
- One tool:
current_weather by city - Single-binary Go server — compile once, run anywhere
- Dockerfile included
- Data source: WeatherAPI.com (generous free tier)
- No state, no persistence — fully stateless
Démo en direct
Aperçu en pratique
Cas d'usage
Usages concrets : weather-mcp-server
Quand l'utiliser : You ask Claude for weather and it keeps saying 'I don't have real-time data'. Fix that in 5 minutes.
Prérequis
- WeatherAPI.com free API key — weatherapi.com/signup — 1M calls/month free
Déroulement
-
Set up and connect
Install weather-mcp-server via Docker with WEATHER_API_KEY=... and connect from Claude Desktop.✓ Copié
→ current_weather tool visible
-
Ask naturally
What's the weather like in Tokyo right now? Should I bring a jacket for a walk?✓ Copié
→ Real-time conditions + actionable suggestion
Résultat : Instant weather checks without a separate app.
Pièges
- 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
Quand l'utiliser : 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.
Déroulement
-
Call per city
Get current weather for New York, London, Tokyo, São Paulo. Summarize in one sentence each.✓ Copié
→ 4-city brief
Résultat : 30-second daily ops awareness across your distributed team.
Pièges
- API rate limit if called every minute across many cities — Cache for 15 minutes; weather doesn't change that fast
Combinaisons
Associez-le à d'autres MCPs pour un effet X10
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.✓ Copié
Coût et limites
Coût d'exécution
- Quota d'API
- WeatherAPI free: 1M calls/month, 10/sec
- Tokens par appel
- ~200 tokens per response
- Monétaire
- Free for personal use; paid plans start at $4/mo for higher tiers
- Astuce
- Cache results for 10-15 minutes — weather doesn't change faster than that.
Sécurité
Permissions, secrets, portée
Stockage des identifiants : WEATHER_API_KEY env var
Sortie de données : Outbound to api.weatherapi.com only
- Compiled from source or Docker — verify the build yourself for production use; small-audience Go repo.
- No built-in forecast — single-endpoint tool by design.
Dépannage
Erreurs courantes et correctifs
401 from WeatherAPI
WEATHER_API_KEY not set or invalid. Get one at weatherapi.com/my/.
Vérifier : 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.
Alternatives
weather-mcp-server vs autres
| Alternative | Quand l'utiliser | Compromis |
| Open-Meteo MCP | You want no API key at all | Free, no key, but requires lat/lng (no city name geocoding) |
| National Weather Service MCP | US-only and you want forecasts + alerts | US-only; richer data |