@neuroequalityorg/mcp-weather-server
v1.0.0
Published
MCP server for weather data using wttr.in - provides current weather, forecasts, alerts, and temperature conversion
Downloads
194
Maintainers
Readme
MCP Weather Server 🌤️
A Model Context Protocol (MCP) server that provides weather data using the free 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)
npm install -g mcp-weather-serverFrom source
git clone https://github.com/ttracx/mcp-weather-server.git
cd mcp-weather-server
npm install
npm run buildUsage
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
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["-y", "mcp-weather-server"]
}
}
}Or if installed globally:
{
"mcpServers": {
"weather": {
"command": "mcp-weather-server"
}
}
}Or from source:
{
"mcpServers": {
"weather": {
"command": "node",
"args": ["/path/to/mcp-weather-server/dist/index.js"]
}
}
}Running Standalone
# Development mode
npm run dev
# Production mode
npm run build
npm startTools
get_weather
Get current weather conditions for a city.
Parameters:
city(string, required): City name (e.g., "London", "New York", "Tokyo")
Example response:
{
"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 namedays(number, optional): Number of forecast days (1-3, default: 3)
Example response:
[
{
"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 valuefrom(string, required): Source unit (celsius, fahrenheit, kelvin)to(string, required): Target unit (celsius, fahrenheit, kelvin)
Example response:
{
"input": { "value": 100, "unit": "celsius" },
"output": { "value": 212, "unit": "fahrenheit" },
"formatted": "100 celsius = 212°F"
}Data Source
This server uses wttr.in - a free, open-source weather service. No API key required!
Requirements
- Node.js 18+
- Internet connection for weather data
License
MIT
