Skip to main content
Glama
README.md
# @pipeworx/nasa-gesdisc

Point values from NASA GES DISC grids: MERRA-2 reanalysis (hourly temperature, wind, pressure, precipitation), GPM IMERG daily precipitation, and GLDAS and NLDAS-2 monthly land-surface model output (rainfall, soil moisture, air temperature, evapotranspiration), read at the grid cell nearest a latitude and longitude.

Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 2088+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider.

## Tools

- `gesdisc_point_series(variable, latitude, longitude, start, end?)` -- time series of one named variable at a point over a date range. Returns timestamped values, units, dataset and version, granule ids, the grid cell actually read, and fetch time. Outside the variable's spatial or date coverage it returns an empty series with the reason (no token needed for that answer). Up to 31 days of an hourly variable, or 31 files of a daily or monthly one, per call.
- `gesdisc_variables(query?)` -- the variable ids the series tool accepts, with dataset and version, units, time step, grid resolution, spatial coverage and date range. Takes no key.

## Why these are not already in nasa-power

`nasa-power` returns NASA POWER's own agro-climatology product (surface solar and a fixed set of meteorology parameters on a 0.5 degree grid, daily and hourly). It has no GPM IMERG satellite precipitation, no GLDAS or NLDAS land-surface model output (so no soil moisture or modelled evapotranspiration), and no MERRA-2 pressure or 10 m wind components as reanalysis fields. `nasa-cmr` lists collections and granules but returns no values; `gesdisc_point_series` reads the value at a place and time. If you only need solar irradiance or a simple daily temperature or rain history, `nasa-power` is the lighter call.

## Auth

Reading values needs an Earthdata Login bearer token. Pass your own as `_apiKey` (create it at urs.earthdata.nasa.gov under "Generate Token", and approve the "NASA GESDISC DATA ARCHIVE" application on the account). The pack declares the platform key `PLATFORM_EARTHDATA_TOKEN`, so callers need no token of their own; `_apiKey` overrides it. The token is sent only as an Authorization header and is never returned or written to an error. Earthdata tokens expire (the current platform token on 2027-01-31).

No route answers without login: the Hydrology Data Rods time-series service and the on-premises OPeNDAP hosts are retired (HTTP 301 and 410), and the cloud OPeNDAP service redirects an unauthenticated value request to Earthdata Login. Finding the files for a date range (NASA CMR) does need no token, so a range with no data is reported without one.

## Data sources

- NASA GES DISC: MERRA-2 (tavg1 2D single-level diagnostics and flux diagnostics, v5.12.4), GPM IMERG Final Run daily (V07), GLDAS Noah 0.25 degree monthly (v2.1), NLDAS-2 Noah 0.125 degree monthly (v2.0). NASA data is US public domain. Every response names the dataset, version and granule ids.

## Unverified until the token is used

The authenticated value read has not been run against live data: the request shape and the response parser are covered by a stubbed test that follows the OPeNDAP ASCII convention, and the native variable names for the GLDAS and NLDAS entries come from NASA's product documentation, not from a live read. Run each variable once with a token and fix any name or layout difference before relying on it.

## Quick Start

Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):

```json
{
  "mcpServers": {
    "nasa-gesdisc": {
      "url": "https://gateway.pipeworx.io/nasa-gesdisc/mcp"
    }
  }
}
```

### What this endpoint actually serves

`tools/list` at `https://gateway.pipeworx.io/nasa-gesdisc/mcp` returns the tools in the table
above **plus five Pipeworx tools**: `ask_pipeworx`, `discover_tools`, `ask_pipeworx_grounded`, `company_register_search` and `company_facts`.
`ask_pipeworx` answers a question this pack does not cover by routing across the
whole catalog, without adding a second MCP server.

Add an option to the same URL:

- `https://gateway.pipeworx.io/nasa-gesdisc/mcp?meta=1` lists this pack's tools plus **up to 48 shared Pipeworx tools** (48 when this README was
generated; a connection without an account lists fewer, and its own `tools/list` is the
exact answer on any given day).
- `https://gateway.pipeworx.io/nasa-gesdisc/mcp?meta=0` lists this pack's tools alone.

Or connect to the full Pipeworx gateway to get every pack's tools listed
directly, instead of just this one's:

```json
{
  "mcpServers": {
    "pipeworx": {
      "url": "https://gateway.pipeworx.io/mcp"
    }
  }
}
```

Both URLs reach the same gateway and the same 2088+ data sources. The
only difference is which pack's tools are listed **directly**; `ask_pipeworx`
reaches all of them from either one (it is not listed on a `?meta=0` connection).

## No MCP client? Call it over HTTP

```bash
curl -X POST https://gateway.pipeworx.io/v1/tools/gesdisc_point_series \
  -H 'Content-Type: application/json' \
  -d '{"variable":"merra2_t2m","latitude":35.5,"longitude":-97.5,"start":"2020-03-01","end":"2020-03-02"}'
```

No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/gesdisc_point_series`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.

## Run it from npm

`@pipeworx/mcp-nasa-gesdisc` is a local stdio bridge to the Pipeworx gateway: your MCP client
starts it with `npx`, and it forwards every call to the same
`https://gateway.pipeworx.io/nasa-gesdisc/mcp` endpoint shown above. It needs network access;
there is no offline mode.

```json
{
  "mcpServers": {
    "nasa-gesdisc": {
      "command": "npx",
      "args": ["-y", "@pipeworx/mcp-nasa-gesdisc"]
    }
  }
}
```

Without a key it calls anonymously, capped at 50 calls a day. A free account
raises that to 200 a day: get a key at https://pipeworx.io/signup and add
`"env": { "PIPEWORX_API_KEY": "<your key>" }` to the server entry.
The key is sent as a Bearer token, the same way a hosted connection sends it,
so calls are metered and billed exactly as they are there.

It lists **only** this pack's tools by default. Set `PIPEWORX_META_TOOLS=1` to
also list `ask_pipeworx` and the other gateway-wide tools.

Behind an HTTPS proxy: Node's built-in `fetch` does not read `HTTPS_PROXY` by
default. Newer Node releases honour it when `NODE_USE_ENV_PROXY=1` is set; check
your Node version's documentation.

## Using with ask_pipeworx

Instead of calling tools directly, you can ask questions in plain English —
this works on the pack endpoint above as well as on the full gateway:

```
ask_pipeworx({ question: "your question about Nasa Gesdisc data" })
```

The gateway picks the right tool and fills the arguments automatically.

## More

- [Docs and guides](https://pipeworx.io/docs)
- [pipeworx.io](https://pipeworx.io)

## License

MIT