# PurpleAir MCP for AI Agents AI Agent Connect

> PurpleAir MCP gives your AI agent access to real-time air quality and pollution data from over 50,000 sensors worldwide. You can check PM2.5 levels, track wildfire smoke, and pull historical environmental data for any location. It's the quickest way to get hyperlocal air quality metrics into your agent's workflow.

## Overview
- **Category:** iot-hardware
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_8GtJ3PAbFBkLWG7y9DACceyyzK4HYrrtyQiWNSQb/ai-agent-connect
- **Tags:** air-quality, environmental-monitoring, pollution-data, sensor-network, real-time-data, climate-data

## Description

PurpleAir lets you find out why the air smells like smoke or if a specific neighborhood is hitting dangerous pollution levels without hunting through different websites. Instead of trying to find a specific sensor on a map, you just ask your AI agent. This Connector connects your agent directly to the world's largest hyperlocal air quality network. You can grab current readings for a specific street corner, look at how pollution trends have shifted over the last year, or even pull down data files for your own spreadsheets. It makes it easy to see what's happening in the atmosphere right now. You can check the air inside a warehouse or monitor a forest fire hundreds of miles away. The data is just a conversation away. You can find all of these capabilities by adding it to your Vinkius catalog, which makes managing your agent's connections much simpler. It's about getting facts fast without the manual digging. You can check if a nearby park is safe for a run or see if a factory's emissions are affecting the local area. It gives you a clear view of environmental health without the headache of manual data collection. This means you don't have to spend your afternoon copy-pasting values from a web dashboard into a report. You can get precise PM2.5 numbers as a scientist or check your own backyard as a local resident. You get the same high-quality data in seconds. The network covers over 50,000 sensors, giving you a level of detail that most general weather apps just can't match. It turns a complex environmental research task into a simple, direct chat.

## Tools

### get_pm25_sensors
5 (fine particulate matter) measurements. PM2.5 is the most important air quality indicator — particles smaller than 2.5 micrometers that can penetrate deep into lungs and bloodstream. Returns current PM2.5 concentrations along with location data. Essential for health advisories, wildfire smoke tracking, and urban pollution monitoring.

Get sensors with PM2.5 measurements

### get_sensor_data
Fetches real-time measurements like temperature and humidity from a specific sensor. It lets you see exact conditions at a single point.

### get_sensor_history_csv
Downloads historical sensor data in a CSV format. It's the best way to get data for offline spreadsheets or charts.

### get_sensors_by_bounding_box
Finds all sensors within a specific geographic area. It's perfect for mapping out air quality across a whole city.

### get_indoor_sensors
Lists all sensors located inside buildings or homes. It's helpful for checking air quality in offices or schools.

### get_outdoor_sensors
Returns all sensors measuring ambient outdoor air. You can use it to see a broad view of regional pollution levels.

### get_sensor_history
Retrieves time-series data for specific fields over a chosen period. You can see how pollution changed over days or weeks.

### get_sensors_by_index
Pulls fresh readings for specific sensors you already know. It saves time when you only care about a few specific monitors.

### get_sensors_near_me
Locates the closest sensors to a specific GPS coordinate. It's the fastest way to find local air quality near an address.

### list_sensors
Lists all available sensors with optional filters for type and location. It gives you a full overview of the network's coverage.

## Prompt Examples

**Prompt:** 
```
What's the air quality like in downtown Chicago right now?
```

**Response:** 
```
I found 23 outdoor sensors in the downtown Chicago area. Here are the current readings:

| Location | PM2.5 | Temp | Humidity |
| --- | --- | --- | --- |
| Loop District | 8.4 µg/m³ | 72°F | 45% |
| River North | 9.1 µg/m³ | 71°F | 44% |
| West Loop | 7.8 µg/m³ | 73°F | 46% |

**Summary:** The average PM2.5 reading is 8.4 µg/m³, which is considered **Good** air quality. The highest reading is in River North.
```

**Prompt:** 
```
Can you show me the PM2.5 trend for sensor 55432 over the last 48 hours?
```

**Response:** 
```
I've retrieved the hourly PM2.5 data for sensor 55432 over the last 48 hours. 

**Trend Analysis:**
- **Start:** 5.2 µg/m³
- **Peak:** 42.8 µg/m³ (occurred at 2:00 PM yesterday, likely due to local smoke)
- **Current:** 12.4 µg/m³

The data shows a significant spike yesterday afternoon that has since stabilized. Here is the full time series data for your review.
```

**Prompt:** 
```
Find the nearest outdoor air quality sensors to 1600 Pennsylvania Avenue and tell me the readings.
```

**Response:** 
```
I found the closest outdoor sensors to that location. 

**Nearby Sensors:**
- **Sensor A (0.4 miles away):** PM2.5: 6.2 µg/m³, Temp: 68°F
- **Sensor B (0.8 miles away):** PM2.5: 7.5 µg/m³, Temp: 69°F
- **Sensor C (1.2 miles away):** PM2.5: 5.9 µg/m³, Temp: 67°F

Air quality in this immediate area is currently very clean.
```

## Capabilities

### Get real-time PM2.5 readings
Fetch current fine particulate matter levels for any specific address or coordinate.

### Pull historical air quality trends
Retrieve time-series data to see how pollution levels have changed over days or months.

### Map out regional air quality
Find all sensors in a specific city or neighborhood to see the spread of pollution.

### Track wildfire smoke spikes
Monitor real-time spikes in PM2.5 levels during active fire events.

### Check indoor workplace air quality
Access data from sensors located inside homes, offices, and warehouses.

### Export data to CSV files
Download historical sensor data in a format ready for offline analysis or spreadsheets.

## Use Cases

### Wildfire Smoke Tracking
A fire chief asks the agent to find PM2.5 spikes in a specific county to see where smoke is heaviest and identify high-risk zones.

### Real Estate Site Assessment
A developer asks the agent to check the air quality in a city center to see if a new building site is in a high-pollution zone.

### Public Health Advisories
A city official asks the agent to find all sensors in a zip code to see if it's safe for people with asthma to go outside.

### Climate Trend Analysis
A scientist asks for a year's worth of temperature and humidity data from a specific sensor to track local climate changes.

## Benefits

- Stop manual searching for air quality data. Find local readings instantly without leaving your chat to check specific coordinates.
- Track wildfire smoke more accurately. Identify high-risk zones for public safety alerts by seeing exactly where fine particulates are peaking.
- Analyze pollution trends over time. Identify recurring pollution spikes or long-term environmental shifts by viewing data over days or weeks.
- Map out regional air quality quickly. Visualize the spread of pollution across entire geographic regions by pulling data for a whole city.
- Simplify data exports for reports. Move historical data into your own spreadsheets for analysis without any manual data entry.
- Monitor indoor workplace health. Get a clear picture of the environment where people spend their time by checking sensors inside offices or warehouses.

## How It Works

The bottom line is you get instant, hyperlocal air quality data through a simple chat interface.

1. Subscribe to this Connector and obtain your PurpleAir API key.
2. Enter your API key into your AI client's configuration settings.
3. Ask your agent for air quality data in any city, coordinate, or specific sensor index.

## Frequently Asked Questions

**Can PurpleAir MCP track wildfire smoke?**
Yes, it can. By monitoring PM2.5 spikes across a global network of sensors, it helps you identify exactly where smoke plumes are affecting the air in real-time.

**Can I get historical data from PurpleAir MCP?**
Yes, you can retrieve time-series data for various fields, including temperature and humidity, to analyze pollution trends over days, weeks, or months.

**Does PurpleAir MCP work for indoor air quality?**
Yes, it includes access to sensors specifically located inside buildings, homes, and workspaces, making it great for HVAC and health monitoring.

**Can I export data from PurpleAir MCP to a spreadsheet?**
Yes, you can request historical data in a CSV format, which is perfect for moving information into Excel or other data analysis tools.

**Can I find sensors in a specific area using PurpleAir MCP?**
Yes, you can query sensors within a specific geographic bounding box to map out air quality for an entire neighborhood, city, or region.

**Is PurpleAir MCP good for real estate research?**
It's a great tool for that. You can quickly check the local pollution levels and environmental health scores for any property location.

**How many sensors does PurpleAir MCP access?**
It connects you to a global network of over 50,000 low-cost air quality sensors, providing high-resolution hyperlocal data.

**How do I find air quality near my address?**
Use the `get_sensors_near_me` tool with your latitude and longitude. Alternatively, search for sensors by bounding box using `get_sensors_by_bounding_box` with corner coordinates. The API will return nearby sensors with current PM2.5, temperature, and humidity readings.

**Can I get historical air quality data?**
Yes. Use `get_sensor_history` with a sensor index and time range (Unix timestamps). You can specify which fields to retrieve (PM2.5, temperature, humidity) and set an averaging interval (e.g. 3600 for hourly averages). For spreadsheet analysis, use `get_sensor_history_csv` to get data in CSV format.

**What does PM2.5 mean and why is it important?**
PM2.5 refers to fine particulate matter smaller than 2.5 micrometers — about 30 times smaller than a human hair. These particles can penetrate deep into lungs and enter the bloodstream, causing respiratory and cardiovascular health effects. The WHO guideline is 5 µg/m³ annual average. PurpleAir sensors measure PM2.5 in real-time, making them essential for health advisories and pollution monitoring.