Home / MCP / WeatherAPI MCP Server
Provides current weather and air quality data from WeatherAPI for MCP clients.
Configuration
View docs{
"mcpServers": {
"weather": {
"command": "npx",
"args": [
"-y",
"@swonixs/weatherapi-mcp"
],
"env": {
"WEATHER_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}You can query current weather data and air quality for any city through this WeatherAPI MCP Server. It connects to WeatherAPI to fetch live weather information and exposes an MCP endpoint you can call from your MCP clients to get structured weather data on demand.
Use your MCP client to call the get_weather tool with a city name to retrieve current weather data for that location. The response includes the city, country, temperature in Celsius, weather condition, humidity, wind speed, and optional air quality metrics.
Prerequisites: ensure you have Node.js and npm installed on your system.
1) Create a Windsurf MCP config file (or the MCP config you use in your environment) and add the following configuration for the weather MCP server. Replace YOUR_API_KEY_HERE with your WeatherAPI key.
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["-y", "@swonixs/weatherapi-mcp"],
"env": {
"WEATHER_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}Tool availability is focused on the single get_weather tool which fetches current weather data for a given city. The example response includes location, country, temp_c, condition, humidity, wind_kph, and an air_quality object with common air quality metrics.
Fetches current weather data for a specified city. Returns location, country, temp_c, condition, humidity, wind_kph, and optional air_quality metrics.