- Home
- MCP servers
- Weather
Weather
- typescript
1
GitHub Stars
typescript
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"yoyooyooo-mcp-weather-server": {
"command": "npx",
"args": [
"-y",
"mcp-weather-api"
],
"env": {
"QWEATHER_API_KEY": "YOUR_API_KEY",
"QWEATHER_API_URL": "https://devapi.qweather.com/v7",
"QWEATHER_GEO_API_URL": "https://geoapi.qweather.com/v2",
"WEATHER_DEFAULT_UNITS": "metric",
"WEATHER_FORECAST_DAYS": "3",
"WEATHER_INCLUDE_DETAILS": "true",
"WEATHER_DEFAULT_LANGUAGE": "en",
"WEATHER_DEFAULT_LOCATION": "101010100"
}
}
}
}You can run a Weather MCP Server that fetches current conditions, forecasts, hourly data, and city lookups from the QWeather API. It centralizes weather data for your apps and lets you customize units, language, and data detail levels for consistent responses across clients.
How to use
You connect an MCP client to the Weather MCP Server to request current weather, forecasts, hourly data, or city lookups. Use a consistent location format (city name, longitude,latitude, or a QWeather location ID) and set your preferred units and language in the request options. Your client can ask for metric or imperial units and receive data in the language you choose. Use the city lookup to obtain precise location IDs for more accurate results.
How to install
Prerequisites: Node.js 16 or higher and a current npm or yarn installation.
Install the Weather MCP Server package or run it directly with npx.
npm install mcp-weather-api
npx mcp-weather-api
Configuration and usage notes
Configure the server with your QWeather API credentials and default options to tailor responses across your environment.
Additional notes
The server exposes four weather tools for MCP clients: current weather, weather forecast, hourly forecast, and city lookup. It uses the QWeather API behind the scenes and supports setting default location, units, language, and forecast range to fit your application's needs.
Configuration examples
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["-y", "mcp-weather-api"]
}
}
}
Available tools
getWeather
Fetches current weather for a given location with options for units and language.
getWeatherForecast
Retrieves a weather forecast for a location over a specified number of days with unit and language options.
getHourlyWeather
Obtains a 24-hour or tailored hourly forecast for a location with unit and language options.
lookupCity
Looks up city information and IDs to enable precise weather data targeting.