npm package: @neuroequalityorg/mcp-weather-server
Description: MCP server for weather data using wttr.in - provides current weather, forecasts, alerts, and temperature conversion
Author: ttracx
Latest version: 1.0.0

# MCP Weather Server 🌤️

A Model Context Protocol (MCP) server that provides weather data using the free [wttr.in](https://wttr.in) API. Works with Claude Desktop, Cline, and any MCP-compatible client.

## Features

- **get_weather** - Current weather conditions for any city
- **get_forecast** - Weather forecast up to 3 days
- **get_alerts** - Smart weather alerts based on conditions
- **convert_temp** - Temperature conversion (Celsius ↔ Fahrenheit ↔ Kelvin)

## Installation

### From npm (recommended)

```bash
npm install -g mcp-weather-server
```

### From source

```bash
git clone https://github.com/ttracx/mcp-weather-server.git
cd mcp-weather-server
npm install
npm run build
```

## Usage

### Claude Desktop Configuration

Add this to your Claude Desktop config file:

**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`  
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`  
**Linux**: `~/.config/Claude/claude_desktop_config.json`

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

Or if installed globally:

```json
{
  "mcpServers": {
    "weather": {
      "command": "mcp-weather-server"
    }
  }
}
```

Or from source:

```json
{
  "mcpServers": {
    "weather": {
      "command": "node",
      "args": ["/path/to/mcp-weather-server/dist/index.js"]
    }
  }
}
```

### Running Standalone

```bash
# Development mode
npm run dev

# Production mode
npm run build
npm start
```

## Tools

### get_weather

Get current weather conditions for a city.

**Parameters:**
- `city` (string, required): City name (e.g., "London", "New York", "Tokyo")

**Example response:**
```json
{
  "location": "London, United Kingdom",
  "temperature": "15°C (59°F)",
  "condition": "Partly cloudy",
  "humidity": "72%",
  "wind": "13 km/h WSW",
  "feelsLike": "14°C (57°F)",
  "visibility": "10 km",
  "pressure": "1015 mb"
}
```

### get_forecast

Get weather forecast for a city (up to 3 days).

**Parameters:**
- `city` (string, required): City name
- `days` (number, optional): Number of forecast days (1-3, default: 3)

**Example response:**
```json
[
  {
    "date": "2024-01-15",
    "maxTemp": "12°C (54°F)",
    "minTemp": "5°C (41°F)",
    "condition": "Light rain",
    "sunrise": "07:45 AM",
    "sunset": "04:30 PM",
    "chanceOfRain": "65%"
  }
]
```

### get_alerts

Get weather alerts and warnings for a region. Generates smart alerts based on current conditions.

**Parameters:**
- `region` (string, required): Region or city name

**Alert types:**
- 🔥 Heat advisory (>35°C)
- ❄️ Freeze warning (≤0°C)
- 💨 High wind warning (>50 km/h)
- 💧 High humidity alert (≥90%)
- 🌫️ Low visibility warning (<2km)
- ⛈️ Thunderstorm warning
- 🌨️ Snow advisory
- 🌫️ Fog advisory

### convert_temp

Convert temperature between units.

**Parameters:**
- `value` (number, required): Temperature value
- `from` (string, required): Source unit (celsius, fahrenheit, kelvin)
- `to` (string, required): Target unit (celsius, fahrenheit, kelvin)

**Example response:**
```json
{
  "input": { "value": 100, "unit": "celsius" },
  "output": { "value": 212, "unit": "fahrenheit" },
  "formatted": "100 celsius = 212°F"
}
```

## Data Source

This server uses [wttr.in](https://wttr.in) - a free, open-source weather service. No API key required!

## Requirements

- Node.js 18+
- Internet connection for weather data

## License

MIT

## Author

[ttracx](https://github.com/ttracx)