Jana MCP Server

Jana MCP Server

Provides natural language access to environmental data including air quality measurements, greenhouse gas emissions, and facility records. It enables users to perform geographic searches, trend analysis, and proximity-based queries using data from sources like OpenAQ and Climate TRACE.

Category
Visit Server

README

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

Tool Description Priority
get_air_quality Query air quality measurements P0
get_emissions Query GHG emissions data P0
find_nearby Proximity-based search P0
get_trends Temporal trend analysis P1
get_data_summary Platform data summary P1
get_system_health Service status check P2

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

Endpoint Method Description
/ GET Server information
/health GET Health check
/sse GET SSE connection for MCP
/messages POST MCP message handling

Configuration

Variable Description Default
JANA_BACKEND_URL Jana backend URL http://web:8000
JANA_USERNAME Auth username (required)
JANA_PASSWORD Auth password (required)
JANA_TOKEN Pre-configured token (optional)
MCP_SERVER_PORT Server port 8080
LOG_LEVEL Logging level INFO

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured