Skip to main content
Glama
Thermal Sentinel MCP Server

Thermal Sentinel MCP Server

by 0xConsole

🌑️ Thermal Sentinel

Heat-risk monitoring agent powered by the FortyGuard Temperature API. Detects heat waves and temperature anomalies, generates alerts with urban-planning recommendations, and exposes an MCP tool interface. Built for the FortyGuard Hackathon'26 (Agentic AI track).

Live demo: https://thermal-sentinel-agent.vercel.app Β· GitHub: 0xConsole/thermal-sentinel-agent

What It Does

Thermal Sentinel is an AI agent that:

  1. Queries the FortyGuard Temperature API for real-time urban temperature data

  2. Detects heat waves and anomalies using Sentinel-style multi-signal anomaly detection (WHO heat bands + z-score + sustained-heat + rate-of-change)

  3. Generates heat-risk alerts with actionable urban-planning recommendations

  4. Exposes 11 tools via the MCP (Model Context Protocol) β€” any AI agent can call them

  5. Displays a live dashboard with city grid, alerts, charts, and one-click demo

Related MCP server: Weather MCP Server

Quick Start

# Clone
git clone https://github.com/0xConsole/thermal-sentinel-agent.git
cd thermal-sentinel-agent

# Install deps
pip install -r requirements.txt

# Run locally (no API key needed β€” mock data works out of the box)
uvicorn app.main:app --reload --port 8000

# Open dashboard
open http://localhost:8000

With Real FortyGuard API

export FORTYGUARD_API_KEY="your-api-key"
export FORTYGUARD_API_BASE="https://api.fortyguard.com"  # default
uvicorn app.main:app --reload --port 8000

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Dashboard UI (static)                 β”‚
β”‚              REST API  +  MCP Tool Interface              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                     FastAPI (app/main.py)                β”‚
β”‚         /api/* routes  +  /mcp/tools  /mcp/call          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    Agent (app/agent.py)                   β”‚
β”‚     scan_cities β†’ monitor_city β†’ heat_risk_report        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ FortyGuard   β”‚  Anomaly Detector β”‚     Store (SQLite)    β”‚
β”‚  Client      β”‚  (Sentinel-style) β”‚   /tmp persistence    β”‚
β”‚ Real or mock β”‚  4 signals + score β”‚  readings + alerts   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

MCP Tools (11)

Tool

Endpoint

Description

scan_cities

POST /mcp/call

Scan multiple cities for heat risk

get_temperature

POST /mcp/call

Current temperature for a city

get_temperature_history

POST /mcp/call

Hourly temperature history

detect_heat_anomaly

POST /mcp/call

Run anomaly detection

monitor_city

POST /mcp/call

Deep single-city monitoring

get_heat_risk_report

POST /mcp/call

Consolidated risk report

get_alerts

POST /mcp/call

Active alerts from log

acknowledge_alert

POST /mcp/call

Dismiss an alert

list_monitored_cities

POST /mcp/call

List monitorable cities

get_monitoring_stats

POST /mcp/call

Monitoring statistics

run_demo

POST /mcp/call

One-click demo scan

List tools: GET /mcp/tools Call tool: POST /mcp/call with {"name": "scan_cities", "arguments": {"cities": ["Dubai", "Phoenix"]}}

REST API

Method

Path

Description

GET

/

Dashboard UI

GET

/health

Health check (shows live/mock mode)

POST

/api/scan

Scan cities

GET

/api/temperature/{city}

Current temperature

GET

/api/history/{city}?hours=24

Temperature history

GET

/api/monitor/{city}?hours=24

Deep city monitoring

GET

/api/report?city=...

Heat-risk report

GET

/api/alerts?city=...&limit=50

Active alerts

POST

/api/alerts/{id}/ack

Acknowledge alert

GET

/api/stats

Monitoring stats

GET

/api/cities

List cities

POST

/api/demo

One-click demo

Anomaly Detection

Multi-signal, composite 0-100 risk score:

Signal

Max Points

Catches

WHO heat-risk band

40

Absolute heat level

Z-score (vs 24h baseline)

25

Statistical outlier

Sustained heat-wave (consecutive β‰₯38Β°C)

20

Heat wave declaration

Rate-of-change (β‰₯5Β°C/hr)

15

Rapid shifts

Severity: info β†’ low β†’ medium β†’ high β†’ critical

Project Structure

thermal-sentinel-agent/
β”œβ”€β”€ api/
β”‚   └── index.py              # Vercel entry
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ main.py               # FastAPI app + routes
β”‚   β”œβ”€β”€ fortyguard_client.py  # API client + mock transport
β”‚   β”œβ”€β”€ anomaly_detector.py   # Sentinel-style detection
β”‚   β”œβ”€β”€ agent.py              # Orchestration
β”‚   β”œβ”€β”€ mcp_server.py         # MCP tool registry
β”‚   └── store.py              # SQLite persistence
β”œβ”€β”€ static/
β”‚   └── index.html            # Dashboard UI
β”œβ”€β”€ CONCEPT.md
β”œβ”€β”€ README.md
β”œβ”€β”€ vercel.json
β”œβ”€β”€ requirements.txt
└── .gitignore

What's Real vs Mocked

  • βœ… Real: FortyGuard API integration (when FORTYGUARD_API_KEY set), anomaly detection engine, MCP tool protocol, alert generation, dashboard UI, Vercel deployment

  • πŸ”Ά Mock (fallback): When no API key, temperature data is generated from per-city climate baselines with realistic diurnal variation and anomaly injection β€” for zero-credential demos

Deploy

# Vercel (auto-creates project on first deploy)
vercel --prod --yes --token "$VERCEL_TOKEN"

# Or set env var on Vercel
vercel env add FORTYGUARD_API_KEY production

License

MIT

Built For

FortyGuard Hackathon'26 β€” Agentic AI track

  • Prize: $6K + NVIDIA Jetson

  • Judging: Impact (40%), Technical Execution (35%), Innovation (15%), Communication (10%)

  • See CONCEPT.md for full concept and judging-criteria alignment

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Exposes public weather and climate data through a standardized API, allowing AI agents to retrieve current conditions, 7-day forecasts, and historical data. It enables weather-aware automation and data enrichment for conversational agents and travel planning.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Global weather intelligence for AI assistants providing 10 weather tools β€” forecasts, historical data, air quality, marine, geocoding, elevation, and climate projections at 1km resolution with 80+ years of archive.
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides AI agents with access to CO2 emissions data, climate projections, and risk assessments for heat, flooding, and drought, supporting ESG analysis and CSRD compliance.
      MIT