/ Directory / Playground / weather-mcp-server
● Community ezh0v ⚡ Instant

weather-mcp-server

by 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.

Why use it

Key features

Live Demo

What it looks like in practice

weather.replay ▶ ready
0/0

Install

Pick your client

~/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
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

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

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

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

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

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

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

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

Continue uses an array of server objects rather than a map.

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

Add to context_servers. Zed hot-reloads on save.

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

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use weather-mcp-server

Give your personal assistant weather awareness

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

When to use: You ask Claude for weather and it keeps saying 'I don't have real-time data'. Fix that in 5 minutes.

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

Outcome: Instant weather checks without a separate app.

Pitfalls
  • 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

When to use: 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.

Flow
  1. Call per city
    Get current weather for New York, London, Tokyo, São Paulo. Summarize in one sentence each.✓ Copied
    → 4-city brief

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

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

Combinations

Pair with other MCPs for X10 leverage

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.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
current_weather city: str Anything weather-related 1 WeatherAPI call (free up to 1M/mo)

Cost & Limits

What this costs to run

API quota
WeatherAPI free: 1M calls/month, 10/sec
Tokens per call
~200 tokens per response
Monetary
Free for personal use; paid plans start at $4/mo for higher tiers
Tip
Cache results for 10-15 minutes — weather doesn't change faster than that.

Security

Permissions, secrets, blast radius

Credential storage: WEATHER_API_KEY env var
Data egress: Outbound to api.weatherapi.com only

Troubleshooting

Common errors and fixes

401 from WeatherAPI

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

Verify: 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 others

AlternativeWhen to use it insteadTradeoff
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

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills