MCP Hub
Back to servers

Jana MCP Server

A specialized MCP server providing natural language access to global environmental data, including air quality measurements from OpenAQ and greenhouse gas emissions from Climate TRACE and EDGAR.

Tools
6
Updated
Jan 23, 2026

Jana MCP Server

MCP Server for Jana Environmental Data Platform

A Model Context Protocol (MCP) server that provides natural language access to environmental data including air quality measurements, greenhouse gas emissions, and facility data.

Features

  • Air Quality Data — Query PM2.5, PM10, O3, NO2, SO2, CO measurements from OpenAQ
  • Emissions Data — Access facility-level and national GHG emissions from Climate TRACE and EDGAR
  • Geographic Search — Find environmental data by bounding box, point + radius, or country
  • Trend Analysis — Analyze temporal patterns in environmental data
  • System Health — Monitor platform status and data availability

Architecture

This MCP server runs as a hosted HTTP service using FastAPI with SSE (Server-Sent Events) transport. It communicates with the Jana backend API for data access.

┌─────────────────────┐     ┌─────────────────────┐     ┌─────────────────────┐
│  MCP Client         │     │  Jana MCP Server    │     │  Jana Backend       │
│  (Cursor/Claude)    │────▶│  (FastAPI + SSE)    │────▶│  (Django + DRF)     │
└─────────────────────┘     └─────────────────────┘     └─────────────────────┘

Quick Start

Prerequisites

1. Configure Environment

Copy the example environment file and configure:

cp dotenv.example .env

Edit .env with your Jana backend credentials:

JANA_BACKEND_URL=http://host.docker.internal:8000
JANA_USERNAME=your_username
JANA_PASSWORD=your_password

2. Start the Server

Standalone mode (Jana backend running on host):

docker-compose up --build

With Jana stack (same Docker network):

# First, start Jana backend
cd ../Jana
docker-compose up -d

# Then start MCP server with override
cd ../jana-mcp-server
docker-compose -f docker-compose.yml -f docker-compose.override.yml up --build

The MCP server will be available at http://localhost:8080.

3. Configure Your MCP Client

Add to your Cursor or Claude Code MCP configuration:

{
  "mcpServers": {
    "jana": {
      "url": "http://localhost:8080/sse"
    }
  }
}

Available Tools

ToolDescriptionPriority
get_air_qualityQuery air quality measurementsP0
get_emissionsQuery GHG emissions dataP0
find_nearbyProximity-based searchP0
get_trendsTemporal trend analysisP1
get_data_summaryPlatform data summaryP1
get_system_healthService status checkP2

Development

Docker Development (Recommended)

The Docker setup includes live code reload - code changes are immediately reflected without rebuilding the container.

# Start with live reload (standalone mode)
docker-compose up

# Or with Jana stack
docker-compose -f docker-compose.yml -f docker-compose.override.yml up

How it works:

  • Volume mount: ./src:/app/src maps local code into container
  • Uvicorn --reload flag watches for changes and auto-restarts
  • No container rebuild needed for Python code changes

When to rebuild:

  • Changes to pyproject.toml (new dependencies)
  • Changes to Dockerfile
  • System-level changes
docker-compose up --build

Local Development (without Docker)

# Create virtual environment
python -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -e ".[dev]"

# Run server with auto-reload
uvicorn jana_mcp.app:app --reload --port 8080

Running Tests

pytest

# With coverage
pytest --cov=jana_mcp --cov-report=html

Code Quality

# Linting
ruff check .

# Type checking
mypy src/

Production Deployment

For production, use the production compose file (no live reload, optimized):

docker-compose -f docker-compose.prod.yml up -d

API Endpoints

EndpointMethodDescription
/GETServer information
/healthGETHealth check
/sseGETSSE connection for MCP
/messagesPOSTMCP message handling

Configuration

VariableDescriptionDefault
JANA_BACKEND_URLJana backend URLhttp://web:8000
JANA_USERNAMEAuth username(required)
JANA_PASSWORDAuth password(required)
JANA_TOKENPre-configured token(optional)
MCP_SERVER_PORTServer port8080
LOG_LEVELLogging levelINFO

Known Limitations

  • get_data_summary may timeout — The backend summary endpoint aggregates data across 300M+ records which can exceed timeout limits. The tool gracefully returns partial results with available source information when this occurs.

Documentation

License

MIT

Reviews

No reviews yet

Sign in to write a review