Environment
Data source: OpenAQ
MCP Protocol
Endpoint
https://context.gnist.ai/mcp/openaq/
claude_desktop_config.json
{
"mcpServers": {
"gnist-openaq": {
"url": "https://context.gnist.ai/mcp/openaq/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Shell
curl -X POST "https://context.gnist.ai/mcp/openaq/" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_air_quality", "arguments": {"lat": 1.0, "lon": 1.0}}}'
REST API
API Root
https://context.gnist.ai/rest/openaq/
4 endpoints available:
GET /rest/openaq/get_air_qualityGET /rest/openaq/get_aqi_summaryGET /rest/openaq/get_air_quality_historyGET /rest/openaq/report_feedback
Shell
curl "https://context.gnist.ai/rest/openaq/get_air_quality?lat=1.0&lon=1.0" \ -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx
resp = httpx.get(
"https://context.gnist.ai/rest/openaq/get_air_quality",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
params={
"lat": 1.0,
"lon": 1.0
},
)
print(resp.json())
Command Line
Command
gc openaq
CLI documentation will be available when the GnistAI SDK is published.
Install
pip install gnistai
Available Tools (4)
get_air_qualityGet current air quality at the nearest monitoring station.
| Parameter | Type | Required | Description |
|---|---|---|---|
lat | number | required | Latitude of the location (-90 to 90). |
lon | number | required | Longitude of the location (-180 to 180). |
get_aqi_summaryGet city-level AQI summary with dominant pollutant.
| Parameter | Type | Required | Description |
|---|---|---|---|
city | string | required | City name (e.g. "Oslo", "London", "New York"). |
get_air_quality_historyGet PM2.5 readings from the nearest station over the last N hours.
| Parameter | Type | Required | Description |
|---|---|---|---|
lat | number | required | Latitude of the location (-90 to 90). |
lon | number | required | Longitude of the location (-180 to 180). |
hours | integer | optional | Number of hours of history to retrieve (1–72, default 24). (default: 24) |
report_feedbackReport a bug, feature request, or general feedback for this data source.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |