# OpenWeatherMap MCP

> OpenWeatherMap gives your agent instant access to global meteorological data, covering current conditions, 5-day forecasts, and air quality metrics for any location worldwide. It handles everything from converting city names to precise coordinates to running detailed pollution reports using tools like `get_air_pollution`. Stop relying on patchy weather websites; connect this MCP to your AI client for reliable, real-time environmental data right where you work.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Tags:** meteorology, weather-forecast, air-quality, real-time-data, geospatial, environmental-data

## Description

Need to know what the weather's doing or if the air is breathable in a specific spot? This connector hands your AI agent global meteorological tools. You can pull live readings—like temperature and humidity—for any city or coordinate using `get_current_weather`. If you’re planning something bigger, like a multi-day trip or an industrial site inspection, you've got the 5-day forecast via `get_forecast` or even longer projections through `get_onecall`. It also handles air quality monitoring with `get_air_pollution`, giving you hard numbers on things like PM2.5 and ozone levels. Need to figure out coordinates? You can convert city names into precise locations using `direct_geocoding` or map back from coordinates to a readable city name using `reverse_geocoding`. When you connect this MCP through Vinkius, your AI client instantly accesses all these services without needing separate API keys or messy manual lookups.

## Tools

### get_air_pollution
Retrieves current air pollution data, including metrics like PM2.5 and CO.

### get_current_weather
Gets the live weather conditions for a specified city or coordinate pair.

### direct_geocoding
Converts place names, like 'New York City', into precise latitude and longitude coordinates.

### get_forecast
Pulls a detailed 5-day forecast with three-hour interval predictions.

### get_onecall
Accesses comprehensive weather data, including hourly and daily projections for up to eight days.

### reverse_geocoding
Takes a coordinate pair and converts it back into a human-readable city name or location identifier.

## Prompt Examples

**Prompt:** 
```
What's the current weather in London?
```

**Response:** 
```
Using `get_current_weather` for London... It's currently 15°C with light rain and 82% humidity.
```

**Prompt:** 
```
Give me the 5-day forecast for Tokyo.
```

**Response:** 
```
Fetching the 5-day forecast via `get_forecast`... Tokyo will see mostly clear skies for the next 3 days, with temperatures ranging from 18°C to 24°C.
```

**Prompt:** 
```
Check the air pollution levels at latitude 40.71 and longitude -74.00.
```

**Response:** 
```
Running `get_air_pollution` for those coordinates... The Air Quality Index is 2 (Fair). PM2.5 is at 12.5 μg/m³ and CO is at 320.4 μg/m³.
```

## Capabilities

### Check live weather conditions
Retrieve current temperature, wind speed, and atmospheric descriptions for any specified location.

### Forecast future weather trends
Pull multi-day forecasts or detailed hourly projections spanning multiple days to plan logistics.

### Monitor air quality levels
Get real-time pollution data, including specific metrics like PM2.5 and CO, for environmental assessments.

### Convert city names to coordinates
Translate a place name or zip code into latitude and longitude pairs for precise targeting.

### Determine location from coordinates
Reverse engineer a geographical coordinate pair back into a readable city or place name.

## Use Cases

### Optimizing multi-city travel routes
A travel coordinator needs to check weather for a tour spanning four cities over two weeks. They prompt their agent, which uses `get_forecast` and `get_onecall` sequentially, providing a consolidated report that flags periods of expected rain or high winds.

### Assessing industrial site safety
An engineer needs to know if construction workers are exposed to bad air quality. They prompt the agent with coordinates and run `get_air_pollution`, instantly checking for dangerous levels of ozone or PM10.

### Validating property data
A real estate analyst receives a list of vague addresses. Instead of manual lookups, they use the agent to run `direct_geocoding` on every entry, converting them all into standardized coordinates for mapping.

### Building location-aware applications
A developer builds a service that displays weather. Instead of hardcoding locations, they use the agent to run `reverse_geocoding` on user-provided GPS data, making their application universally adaptable.

## Benefits

- Don't rely on manually checking multiple websites. You can use `get_current_weather` to get live temperature and wind speed in one prompt.
- Need long-term planning? Use `get_onecall` to pull detailed weather patterns for eight days, letting you plan complex logistics cycles.
- For environmental monitoring, running `get_air_pollution` gives immediate, quantitative data on pollutants like PM2.5 and CO levels.
- Stop guessing locations. Use `direct_geocoding` to turn a vague city name into exact coordinates for any API call.
- Need the reverse? If you only have GPS coordinates, use `reverse_geocoding` to identify the nearest major city name.

## How It Works

The bottom line is your AI agent speaks directly to global weather services, getting you actionable data without leaving your workflow.

1. Subscribe to this MCP and enter your OpenWeatherMap API Key within the Vinkius catalog.
2. Ask your AI client—whether it's Claude, Cursor, or any compatible agent—to find data for a specific location or time frame.
3. The MCP runs the necessary tool (like `get_current_weather` or `get_air_pollution`) and sends back structured, usable weather or environmental metrics.

## Frequently Asked Questions

**How do I check multiple locations with OpenWeatherMap MCP?**
You ask your agent to process multiple coordinates or city names in one prompt. The agent will run the required tools, such as `get_current_weather`, for every location you specify.

**Is OpenWeatherMap MCP better than a simple API call?**
Yes. Since this is an MCP, your AI client manages all the tool calling, error handling, and data formatting automatically, giving you clean text answers instead of raw JSON dumps.

**Can I use OpenWeatherMap MCP to check historical weather?**
The primary focus is real-time or forecast data. For specific historical records, you might need a different time-series database tool, but we can get current conditions using `get_current_weather`.

**What if my location name is vague for OpenWeatherMap MCP?**
You should use `direct_geocoding` first. This ensures the agent converts your fuzzy input (like 'the downtown area') into precise coordinates before attempting to get weather data.

**Does OpenWeatherMap MCP handle pollution for different pollutants?**
Yes, when you run `get_air_pollution`, it reports on several key metrics simultaneously, including PM2.5, PM10, and Ozone levels.