Used for storing API credentials securely in a .env file for the OpenWeatherMap API integration
Required as the runtime environment (version 3.10+) for executing the MCP server
Weather MCP Tool (India-Focused)
An MCP (Model Context Protocol) server using the OpenWeatherMap API to provide:
Real-time weather conditions
5-day weather forecasts
Air quality data
Location search
🚀 Setup
Python 3.10+ is required.
Install dependencies:
pip install -r requirements.txtGet an API key from OpenWeatherMap.
Create a in the root folder:
OPENWEATHER_API_KEY=your_api_key_here
🛠 Available Tools
get_current_weather(location: str)
Returns current weather for a given location.
get_weather_forecast(location: str, days: int = 5)
Returns a weather forecast (up to 5 days) for the location.
get_air_quality(location: str)
Returns air quality metrics and AQI level.
search_location(query: str)
Returns up to 5 location matches based on the query.
🧪 Example Output (India)
Current Weather (Delhi)
Weather Forecast (Mumbai)
Air Quality (Bangalore)
Location Search
🧰 Error Handling
All tools return clear error messages:
📌 Notes
Ensure
.env
file is configured correctly.API keys may take time to activate.
OpenWeatherMap free tier: 60 API calls per minute.
🧑💻 Run the Server
Once running, you can use this server with MCP-compatible clients like Claude Desktop or other automation tools.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
An India-focused MCP server that provides real-time weather conditions, forecasts, air quality data, and location search capabilities using the OpenWeatherMap API.
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server that provides real-time weather information including temperature, humidity, wind speed, and sunrise/sunset times through the OpenWeatherMap API.Last updated -12MIT License
- -securityFlicense-qualityAn MCP server implementation that allows users to fetch and display weather information for specified cities, including temperature, humidity, wind speed, and weather descriptions.Last updated -1
- -securityAlicense-qualityAn MCP server that connects to OpenWeatherMap's API to provide current weather data and multi-day forecasts for locations worldwide in different measurement units.Last updated -3MIT License
- -securityFlicense-qualityAn MCP server that provides weather information like forecasts and alerts for US locations using the National Weather Service API.Last updated -4