convez.ai
MCP ServerDados & AnalyticsIntermediário
cohere-llc

env-data-mcp

cohere-llc/env-data-mcp

Acesso integrado a dados ambientais via MCP para consultas climáticas e geoespaciais

Ver no GitHub
InicialPluginScore · de 0 a 100

MCP Server que expõe dados ambientais (clima, solo, composição atmosférica, observações de satélite) como ferramentas chamáveis por assistentes IA compatíveis com MCP. Integra 9 fontes de dados operacionais (NASA POWER, SSURGO, SoilGrids, GBIF, Sentinel-5P, OCO-2, EMIT, ESS-DIVE, OpenAQ) e retorna JSON estruturado com proveniência completa.

Instalação

$npx convez-ai cohere-llc/env-data-mcp

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
4
Acompanhando
0
Saúde
50%
Último commit
há 1 mês
Versão
—
Issues abertas
19
Contribuidores
1

Casos de uso

  • Análise climática e meteorológica
  • Pesquisa ambiental e sustentabilidade
  • Consultas de qualidade do ar e solo

Veredito

Ferramenta robusta para quem precisa de dados ambientais estruturados em workflows IA. Prototipagem completa com 9 fontes operacionais, CI/CD estabelecido e documentação clara; requer conhecimento técnico para integração e configuração de credenciais.

README

A tradução para o português deste README ainda está na fila.

env-data-mcp

CI codecov

MCP server that exposes environmental data — weather, soil, atmospheric composition, and satellite observations — as tools callable by any MCP-compatible AI assistant or workflow. Tools accept a location (point or bounding box) and a date range and return structured JSON with the data and a _meta block that includes the data licence, latency, and enough provenance information to reproduce the query.

Status: Prototype complete — 9 sources operational (NASA POWER, SSURGO, SoilGrids, GBIF, Sentinel-5P, OCO-2, EMIT, ESS-DIVE, OpenAQ). CI matrix on Python 3.11/3.12, nightly integration tests, schema stability assertions.


Quick start

git clone https://github.com/cohere-llc/env-data-mcp.git
cd env-data-mcp
uv sync

# Start the server (stdio transport; runs until killed with Ctrl-C)
uv run env-data-mcp

The server prints no output on start; an MCP client connects via stdio.

Hello-world example

With the server running, verify it works with this self-contained Python snippet:

# hello_world.py — run with: uv run python hello_world.py
import asyncio
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client

async def main():
    params = StdioServerParameters(
        command="uv",
        args=["run", "env-data-mcp"],
    )
    async with stdio_client(params) as (read, write):
        async with ClientSession(read, write) as session:
            await session.initialize()
            result = await session.call_tool(
                "nasa_power_merra2_query",
                arguments={
                    "latitude": 46.253,
                    "longitude": -119.477,
                    "start_date": "2023-05-01",
                    "end_date": "2023-05-03",
                    "temporal_resolution": "daily",
                },
            )
            print(result)

asyncio.run(main())

Expected output shape:

{
  "data": [
    {"date": "2023-05-01", "T2M": 14.2, "T2M_units": "C", "PRECTOTCORR": 0.0, ...},
    {"date": "2023-05-02", "T2M": 15.8, "T2M_units": "C", "PRECTOTCORR": 1.3, ...},
    {"date": "2023-05-03", "T2M": 13.1, "T2M_units": "C", "PRECTOTCORR": 0.0, ...}
  ],
  "_meta": {
    "source": "nasa_power",
    "rows_returned": 3,
    "latency_s": 1.4,
    "auth_required": false,
    "success": true,
    "license": "Public domain (NASA/US Government). Citation requested.",
    "query_params": {"latitude": 46.253, "longitude": -119.477, ...}
  }
}

Register in VS Code (.mcp.json)

Add to your VS Code workspace .mcp.json to make all tools available to GitHub Copilot:

{
  "mcpServers": {
    "env-data": {
      "command": "uv",
      "args": ["--directory", "/path/to/env-data-mcp", "run", "env-data-mcp"],
      "env": {
        "EARTHDATA_TOKEN": "${EARTHDATA_TOKEN}",
        "OPENAQ_API_KEY": "${OPENAQ_API_KEY}",
        "ESSDIVE_TOKEN": "${ESSDIVE_TOKEN}"
      }
    }
  }
}

Replace /path/to/env-data-mcp with the absolute path to your local clone. The ${VAR} syntax reads from your shell environment (or from a .env file if your MCP host supports it).

Register on JupyterHub / Lakehouse

If the package wheel has been installed into the JupyterHub environment:

{
  "mcpServers": {
    "env-data": {
      "command": "uvx",
      "args": ["--from", "env-data-mcp", "env-data-mcp"],
      "env": {
        "EARTHDATA_TOKEN": "${EARTHDATA_TOKEN}",
        "OPENAQ_API_KEY": "${OPENAQ_API_KEY}",
        "ESSDIVE_TOKEN": "${ESSDIVE_TOKEN}"
      }
    }
  }
}

See Credential setup for how to obtain each token.

Available tools

ToolSourceAuthDescription
nasa_power_merra2_queryNASA POWER MERRA-2noneAtmospheric data (T, precip, RH, radiation) at a point
nasa_power_merra2_bbox_queryNASA POWER MERRA-2noneAtmospheric data over a bounding box
nasa_power_syn1deg_queryNASA POWER CERES SYN1degnoneRadiation fluxes at a point
nasa_power_syn1deg_bbox_queryNASA POWER CERES SYN1degnoneRadiation fluxes over a bounding box
ssurgo_*_queryUSDA SSURGOnoneSoil properties for a US point
ssurgo_*_bbox_queryUSDA SSURGOnoneSoil properties within a bounding box
gbif_occurrence_queryGBIFnoneSpecies occurrence records within a radius
gbif_occurrence_bbox_queryGBIFnoneSpecies occurrence records within a bounding box
soilgrids_queryISRIC SoilGrids v2noneGlobal soil properties at a point
soilgrids_bbox_queryISRIC SoilGrids v2noneGlobal soil properties over a bounding box
sentinel5p_querySentinel-5P TROPOMInoneAtmospheric column at a point (CO / NO₂ / CH₄)
sentinel5p_bbox_querySentinel-5P TROPOMInoneAtmospheric column mean over a bounding box
oco2_queryOCO-2 GEOS L3NASA EarthData tokenDaily XCO₂ column at a point
oco2_bbox_queryOCO-2 GEOS L3NASA EarthData tokenDaily XCO₂ column over a bounding box
emit_queryNASA EMIT L2BNASA EarthData tokenMineral identification at a point
emit_bbox_queryNASA EMIT L2BNASA EarthData tokenMineral identification over a bounding box
essdive_queryESS-DIVEESS-DIVE token (free)DOE environmental field datasets near a point
essdive_bbox_queryESS-DIVEESS-DIVE token (free)DOE environmental field datasets within a bounding box
openaq_queryOpenAQ v3API key (free)Surface air quality measurements near a point
openaq_bbox_queryOpenAQ v3API key (free)Surface air quality measurements within a bounding box

* For SSURGO tools, replace the (*) with one of: area_summary, ecological_site, parent_material, seasonal_hydrology, soil_profile, soil_suitability, soil_temperature, or subsurface_barriers.

Environment variables

VariableRequired byDescription
EARTHDATA_TOKENOCO-2, EMITNASA EarthData bearer token — register free at urs.earthdata.nasa.gov
ESSDIVE_TOKENESS-DIVEESS-DIVE API token — register free at ess-dive.lbl.gov
OPENAQ_API_KEYOpenAQFree key from openaq.org — requests without a key are rejected by the API

Development

Requirements

  • Python ≥ 3.11
  • uv (install with pip install uv or curl -Lsf https://astral.sh/uv/install.sh | sh)

Install with dev dependencies

uv sync --extra dev

Run the unit tests (no network required)

uv run pytest tests/unit/ -m "not integration" -v

Expected output: 250+ unit tests pass; all HTTP / S3 calls are mocked.

Run tests with coverage report

uv run pytest tests/unit/ -m "not integration" --cov=env_data_mcp --cov-report=html
# then open htmlcov/index.html

Run integration tests (requires network)

uv run pytest tests/ -m integration -v

OpenAQ integration tests also require OPENAQ_API_KEY to be set.

Run example notebooks

Two demonstration notebooks are included:

NotebookDescription
notebooks/grow_point_sample_demo.ipynbAll 6 sources for 5 real GROW field samples
notebooks/pnnl_bbox_demo.ipynbNASA POWER + Sentinel-5P over the PNNL Richland bbox
# load notebook dependencies
uv sync --extra dev --extra notebook

# Run interactively
jupyter lab notebooks/

# Or run headlessly via nbmake (network required; S5P cells take 30–120 s each)
uv run pytest notebooks/ --no-cov

Data licences

Each data source adapter carries a LICENSE_INFO constant with SPDX identifier, full licence name, and URL. Human-readable licence text and citation requirements for all sources are collected in LICENSES.md.

SourceLicence
NASA POWERPublic domain (NASA)
SSURGOPublic domain (USDA)
SoilGrids v2CC BY 4.0
GBIFCC0 / CC BY / CC BY-NC per record
Sentinel-5PESA Copernicus Open Access
OpenAQCC BY 4.0
OCO-2Public domain (NASA)
EMITPublic domain (NASA)
ESS-DIVEVaries per dataset

Contributing

To add a new data source:

  1. Create src/env_data_mcp/sources/<name>.py with a LICENSE_INFO dict constant and one or more @mcp.tool functions.
  2. Write unit tests in tests/unit/test_<name>.py that mock all HTTP / S3 calls.
  3. Write an integration test in tests/integration/test_<name>.py marked @pytest.mark.integration.
  4. Add licence text to LICENSES.md.
  5. Add a notebook cell to notebooks/api_smoke_test.ipynb demonstrating a real call.
Ver o original no GitHub

Bom para

Relacionados