- Home
- MCP servers
- OpenWeather
OpenWeather
- typescript
0
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": {
"madhurtoshniwal-openweather-mcp-server": {
"command": "node",
"args": [
"/absolute/path/to/openweather-mcp-server/dist/index.js"
],
"env": {
"OPENWEATHER_API_KEY": "your_api_key_here"
}
}
}
}You can run an MCP server that fetches real-time weather data, forecasts, coordinates-based weather, and air quality from OpenWeather and makes it available to Claude conversations. This guide shows you how to install, configure, and use the server with an MCP client, so you can ask for weather in any city or by coordinates directly in chat.
How to use
You interact with the OpenWeather MCP Server through your MCP client. Once it is configured, you can query current conditions, request a 5-day forecast with 3-hour intervals, fetch data by latitude and longitude, and check air pollution information. Use natural language prompts like “What’s the weather in Paris right now?”, “Give me a 5-day forecast for London,” or “What’s the air quality in Beijing?” The server exposes endpoints that your client can invoke to retrieve weather data and air quality metrics in structured responses.
How to install
Prerequisites you need before installation are Node.js v18 or higher, Claude Desktop, and an OpenWeather API key (free tier available). Ensure you have a working OpenWeather API key before proceeding.
Step 1 — Get OpenWeather API Key: sign up at OpenWeather, go to My API keys, and copy your API key. Note that new keys can take up to 2 hours to activate.
Step 2 — Clone and Setup the MCP server: clone the project, install dependencies, and build.
git clone https://github.com/MadhurToshniwal/OpenWeather-MCP-server.git
cd OpenWeather-MCP-server
# Install dependencies
npm install
# Build the project
npm run build
Configure Claude Desktop
Add the following MCP server configuration to Claude Desktop so it can launch and communicate with the OpenWeather MCP server.
{
"mcpServers": {
"openweather": {
"command": "node",
"args": [
"/absolute/path/to/openweather-mcp-server/dist/index.js"
],
"env": {
"OPENWEATHER_API_KEY": "your_api_key_here"
}
}
}
}
Restart Claude Desktop
Fully quit Claude Desktop and start it again so the new MCP server configuration is loaded.
Notes on Windows paths
If you are on Windows, use double backslashes in paths when configuring the command arguments.
"args": ["C:\\Users\\YourName\\Desktop\\openweather-mcp-server\\dist\\index.js"]
Available tools
get_current_weather
Fetches current weather conditions for a specified city, with an optional country code to refine results.
get_forecast
Provides a 5-day weather forecast with 3-hour intervals for a specified city, with an optional country code.
get_weather_by_coordinates
Retrieves current weather data using latitude and longitude coordinates.
get_air_pollution
Returns air quality data for specified geographic coordinates.