Skip to main content
Glama
nasa-oceancolor

nasa-oceancolor

by pipeworx-io
README.md
# @pipeworx/nasa-oceancolor

Satellite ocean-colour values at a point: chlorophyll-a, sea surface temperature and the diffuse attenuation coefficient Kd(490) from NASA MODIS-Aqua, VIIRS (Suomi NPP) and PACE OCI, as daily, 8-day and monthly composites on a 4 km global grid.

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

## Tools

- `oceancolor_point_value(product, latitude, longitude, date, period?, sensor?)` -- the value of one product in the 4 km cell containing a point, for the day, the 8-day composite or the calendar-month composite containing the date. Returns the value, units, sensor and platform, granule id, dataset version, the grid cell actually read, the composite's data start and end, and fetch time. A cell with no valid retrieval (land, cloud, sea ice, glint or quality screening) returns `value: null`, `cell_read: true` and the reason. A date before the sensor started, a product the sensor lacks, or a composite that was never published returns an empty answer naming that. If the archive cannot be read (outage, access change) the tool errors; it never reports an unreadable file as an empty value.
- `oceancolor_products(query?)` -- the sensors and products the value tool accepts, with units, resolution, composite periods, first covered date and catalogue collection id.

## Why this is not a duplicate

- `nasa-cmr` lists collections and granules; it returns no values. This reads the value at a place and date.
- `nasa-gibs` serves imagery tiles; this returns the measured number with units and quality context.
- `copernicus-dataspace` is a catalogue of Copernicus collections (including Sentinel-3 OLCI) and returns no pixel values.
- `ornl-modis-subsets` serves MODIS land products (vegetation, land surface); none of its products is a water-column or sea-surface quantity.
- `nasa-power` is land-atmosphere climatology (solar, air temperature, rain) and has no ocean products.
- No other pack carries chlorophyll, ocean SST or Kd.

## Auth

Keyless. NASA's ocean-colour OPeNDAP service answers value requests for the public Level-3 mapped files without an Earthdata Login (verified live 2026-12-03). The pack therefore declares no platform key and no Earthdata token is needed or sent. If NASA puts these files behind login, the tool errors with a message saying so.

## Data sources

- NASA Ocean Biology Distributed Active Archive Center (OB.DAAC): Level-3 mapped (standard mapped image) products for MODIS-Aqua (R2022), VIIRS Suomi NPP (R2022) and PACE OCI (V3.x). NASA data is US public domain. Every response names the granule and the dataset version read from the file.

## Behaviour worth knowing

- Daily composites leave most of the ocean empty (clouds, glint, orbit gaps). A null with `cell_read: true` is normal for a day; the 8-day or monthly period fills far more cells.
- Recent days come from near-real-time files; the quality-controlled file replaces them later. The granule id says which was read.
- VIIRS daily files are missing for some days; MODIS-Aqua and PACE are near-complete. A missing composite is reported as `granule_found: false`.
- 4 km only. The 9 km products, the night-only SST4 product and other PACE products (spectral Kd, particulate carbon) are not served by this tool.
- The cell returned is the one containing the point, not an interpolation. The response carries the cell centre actually read, which the server prints and the tool checks against the cell it computed.

## Quick Start

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

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

### What this endpoint actually serves

`tools/list` at `https://gateway.pipeworx.io/nasa-oceancolor/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-oceancolor/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-oceancolor/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 2098+ 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/oceancolor_point_value \
  -H 'Content-Type: application/json' \
  -d '{"product":"chlor_a","latitude":43,"longitude":-69,"date":"2024-06-15","period":"month"}'
```

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

## Run it from npm

`@pipeworx/mcp-nasa-oceancolor` 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-oceancolor/mcp` endpoint shown above. It needs network access;
there is no offline mode.

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

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 Oceancolor 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