# OpenWeatherMap

> Real-time and forecast weather data via the OpenWeatherMap API.

[Canonical HTML page](https://top-mcps.com/mcp/openweather) · [server.json](https://top-mcps.com/mcp/openweather.json) · [methodology](https://top-mcps.com/about/methodology)

## Install

### Claude Desktop — `claude_desktop_config.json`

Paste under mcpServers. Fully quit and reopen Claude after editing.

```json
{
  "mcpServers": {
    "openweather": {
      "command": "npx",
      "args": [
        "-y",
        "weather-mcp-server"
      ],
      "env": {
        "OPENWEATHER_API_KEY": "${OPENWEATHER_API_KEY}"
      }
    }
  }
}
```

### Claude Code — `CLI or .mcp.json`

Run from your repo. Commit .mcp.json to share with your team.

```shell
# export OPENWEATHER_API_KEY=your_openweather_key
claude mcp add openweather -- npx -y weather-mcp-server
```

### Cursor — `.cursor/mcp.json`

Global path: ~/.cursor/mcp.json. Reload window after editing.

```json
{
  "mcpServers": {
    "openweather": {
      "command": "npx",
      "args": [
        "-y",
        "weather-mcp-server"
      ],
      "env": {
        "OPENWEATHER_API_KEY": "${OPENWEATHER_API_KEY}"
      }
    }
  }
}
```

### VS Code — `.vscode/mcp.json`

VS Code uses the "servers" key (not "mcpServers").

```jsonc
{
  "servers": {
    "openweather": {
      "command": "npx",
      "args": [
        "-y",
        "weather-mcp-server"
      ],
      "env": {
        "OPENWEATHER_API_KEY": "${OPENWEATHER_API_KEY}"
      }
    }
  }
}
```

### Windsurf — `~/.codeium/windsurf/mcp_config.json`

Open via Cascade → hammer icon → Configure.

```json
{
  "mcpServers": {
    "openweather": {
      "command": "npx",
      "args": [
        "-y",
        "weather-mcp-server"
      ],
      "env": {
        "OPENWEATHER_API_KEY": "${OPENWEATHER_API_KEY}"
      }
    }
  }
}
```

### Cline — `cline_mcp_settings.json`

Open via the Cline sidebar → MCP Servers → Edit.

```json
{
  "mcpServers": {
    "openweather": {
      "command": "npx",
      "args": [
        "-y",
        "weather-mcp-server"
      ],
      "env": {
        "OPENWEATHER_API_KEY": "${OPENWEATHER_API_KEY}"
      }
    }
  }
}
```

### Continue — `~/.continue/config.json`

Continue uses modelContextProtocolServers with a transport block.

```json
{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "npx",
          "args": [
            "-y",
            "weather-mcp-server"
          ],
          "env": {
            "OPENWEATHER_API_KEY": "${OPENWEATHER_API_KEY}"
          }
        }
      }
    ]
  }
}
```

### Codex CLI — `~/.codex/config.toml`

Codex uses TOML. Each server is a [mcp_servers.<name>] subtable.

```shell
# ~/.codex/config.toml
[mcp_servers.openweather]
command = "npx"
args = [
  "-y",
  "weather-mcp-server",
]
env = { OPENWEATHER_API_KEY = "${OPENWEATHER_API_KEY}" }
```

### Zed — `~/.config/zed/settings.json`

Zed calls them "context_servers". Settings live-reload on save.

```jsonc
{
  "context_servers": {
    "openweather": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "weather-mcp-server"
        ]
      },
      "env": {
        "OPENWEATHER_API_KEY": "${OPENWEATHER_API_KEY}"
      }
    }
  }
}
```

### ChatGPT — `ChatGPT → Settings → Connectors → Developer mode`

Enable Developer mode (paid plans) and enter these values in the UI.

```json
{
  "name": "OpenWeatherMap",
  "transport": "stdio",
  "command": "npx",
  "args": [
    "-y",
    "weather-mcp-server"
  ],
  "env": {
    "OPENWEATHER_API_KEY": "${OPENWEATHER_API_KEY}"
  }
}
```

## At a glance

- **Maintainer:** Community
- **Transport:** stdio
- **Auth model:** API key
- **Required secrets:** OPENWEATHER_API_KEY
- **Supported clients:** Claude, Cursor, Any MCP-compatible client
- **License:** MIT
- **Language:** TypeScript
- **Latest version:** latest
- **Last verified:** 2026-04-19
- **GitHub stars:** 3 (fetched 2026-04-19T20:32:57.511Z)
- **Score:** 46/100 (rubric 2026-04 — see https://top-mcps.com/about/methodology)
- **Source:** https://github.com/szypetike/weather-mcp-server

## Security & scope

- **Access scope:** network
- **Sandbox:** Read-only calls to the OpenWeatherMap API using the key in env.
- **Gotchas:**
  - The free tier returns cached data up to ~10 minutes old; do not use it for safety-critical nowcasting.

## Quick answer

**What it does.** Wraps OpenWeatherMap's current, forecast, and one-call APIs as MCP tools. Input: lat/lon or city; output: structured conditions and forecasts.

**Best for:**
- Trip planning assistants
- Logistics weather checks
- Event-day briefings
- Lifestyle + outdoor flows
- Ambient weather in chat

**Not for:**
- Aviation or marine forecasting
- Hyper-local severe-weather alerting

## Recipes

### Plan a week around the weather

```
What will the weather be in Tel Aviv for each of the next 7 days? Return: day, high/low, rain probability, and a 1-sentence summary. Flag any day with >60% rain probability.
```

_Tested with: Claude Desktop, Cursor_

## Description

The OpenWeatherMap MCP gives AI agents current conditions, 5-day forecasts, historical observations, and weather alerts for any location. A lightweight, fast, free-tier-friendly way to add weather context to chat or automation flows.

## Why it matters

Weather changes plans. Travel agents, logistics flows, event coordinators, and outdoor-activity bots all benefit from pulling real conditions into their reasoning loop.

## Key features

- Current weather by coordinates or city
- 5-day / 3-hour forecast
- Historical observations
- Weather alerts where available
- Lightweight, fast

## FAQ

### Is the free plan enough for agent use?

Usually yes. The free tier gives 60 calls/minute and 1M/month, which covers most agent-scale use. Paid plans add historical data beyond the free window and more granular hourly forecasts.

### Can it accept city names or does it need coordinates?

Both. You can pass "Paris" or "Paris,FR" (disambiguated with country code) or explicit lat/lon. Coordinates are more reliable for agent use — city-name resolution can pick the wrong city without context.

### Does it include weather alerts?

Yes where available. The one-call endpoint returns active government weather alerts for most countries. Coverage varies — US/EU are comprehensive, some regions only have basic warnings.

### How recent is the forecast data?

Current conditions refresh every ~10 minutes. The 5-day forecast is updated every 3 hours. For faster-moving weather (thunderstorms, severe events) a specialist radar provider will beat a general API.

## Changelog

- **2026-04-19** — Refreshed install snippets and fact sheet; verified for 2026.
- **2025-02-15** — Initial directory listing.
