@pipeworx/mcp-nasa-gibs 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mojibake Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,154 @@
1
+ # @pipeworx/nasa-gibs
2
+
3
+ NASA GIBS — the ~1,300-layer global satellite imagery catalogue behind NASA
4
+ Worldview, with daily true-colour mosaics, thermal anomalies, sea-surface
5
+ temperature, aerosols, snow and ice cover and night lights, most of them with a
6
+ multi-decade daily time series.
7
+
8
+ Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1679+ live data sources.
9
+
10
+ ## Tools
11
+
12
+ - `gibs_list_layers(query?, projection?, limit?)` — search the catalogue by subject or
13
+ identifier; returns each layer's id, title, grid and available date range.
14
+ - `gibs_layer_info(layer, projection?)` — one layer's full time coverage, native
15
+ resolution, format, extent, colour map and legend URLs, and tile template.
16
+ - `gibs_tile_url(layer, date?, latitude?, longitude?, zoom?, tile_row?, tile_col?, projection?)` —
17
+ a ready-to-fetch image tile URL, with the tile's own geographic bounds.
18
+
19
+ ## Auth
20
+
21
+ Keyless. No registration, no rate-limit headers.
22
+
23
+ ## Data sources
24
+
25
+ - <https://gibs.earthdata.nasa.gov/wmts/{projection}/best/1.0.0/WMTSCapabilities.xml> —
26
+ the layer catalogue, one document per projection (`epsg4326`, `epsg3857`,
27
+ `epsg3413`, `epsg3031`).
28
+
29
+ ### Things the next person would otherwise rediscover
30
+
31
+ - **There is no JSON layer index.** The WMTS capabilities XML is the only
32
+ machine-readable catalogue and it is ~5 MB per projection. It is parsed once
33
+ per isolate and the (much smaller) result cached in module scope for 6 hours;
34
+ a per-call re-parse would spend seconds of CPU on a document that changes
35
+ about once a day. The cache is populated only inside a request — never at
36
+ module load, where the Workers runtime reports `Date.now()` as 1970 and every
37
+ entry would read as infinitely stale.
38
+ - **Each layer has several `<ResourceURL resourceType="tile">` templates.** Only
39
+ one carries `{Time}`; that is the one worth handing a caller. The others drop
40
+ the date silently and serve whatever GIBS considers current.
41
+ - **`MatrixWidth` is not a power of two** (levels go 2, 3, 5, …), so tile
42
+ row/column cannot be derived from the zoom level alone. They are computed from
43
+ `ScaleDenominator` the way WMTS specifies: `tileSpan = ScaleDenominator ×
44
+ 0.00028 m × TileWidth ÷ metresPerUnit`, with `metresPerUnit` = 111319.49 for
45
+ `epsg4326` (degrees) and 1 for the metre-based projections.
46
+ - **`TopLeftCorner` is written x-then-y** (`-180 90`), not the lat-then-lon axis
47
+ order EPSG:4326 formally prescribes.
48
+ - **Lat/lon → tile conversion is offered for `epsg4326` and `epsg3857` only.**
49
+ The two polar stereographic grids need `tile_row`/`tile_col` directly, and the
50
+ tool says so rather than returning a wrong tile.
51
+
52
+ ## Quick Start
53
+
54
+ Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
55
+
56
+ ```json
57
+ {
58
+ "mcpServers": {
59
+ "nasa-gibs": {
60
+ "url": "https://gateway.pipeworx.io/nasa-gibs/mcp"
61
+ }
62
+ }
63
+ }
64
+ ```
65
+
66
+ ### What this endpoint actually serves
67
+
68
+ `tools/list` at `https://gateway.pipeworx.io/nasa-gibs/mcp` returns the tools in the table
69
+ above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
70
+ `discover_tools`, `search_within`, `remember`/`recall` and the rest of the
71
+ gateway-wide set. So the tool count you see is larger than this table: a
72
+ single-pack endpoint currently lists roughly 30 shared tools alongside the
73
+ pack's own. The connection's `initialize` response states its exact scope, and
74
+ is the authoritative answer for a given day.
75
+
76
+ This is deliberate, not multiplexing by accident. The meta-tools are what let a
77
+ scoped connection answer a question this pack does not cover — via
78
+ `ask_pipeworx`, which routes across the whole catalog — without you adding a
79
+ second MCP server. There is currently no way to mount a pack endpoint without
80
+ them; if the extra schemas cost you more context than the routing is worth,
81
+ connect to the full gateway once rather than to several pack endpoints.
82
+
83
+ Or connect to the full Pipeworx gateway to get every pack's tools listed
84
+ directly, instead of just this one's:
85
+
86
+ ```json
87
+ {
88
+ "mcpServers": {
89
+ "pipeworx": {
90
+ "url": "https://gateway.pipeworx.io/mcp"
91
+ }
92
+ }
93
+ }
94
+ ```
95
+
96
+ Both URLs reach the same gateway and the same 1679+ data sources. The
97
+ only difference is which pack's tools are listed **directly**; `ask_pipeworx`
98
+ reaches all of them from either one.
99
+
100
+ ## No MCP client? Call it over HTTP
101
+
102
+ ```bash
103
+ curl -X POST https://gateway.pipeworx.io/v1/tools/gibs_list_layers \
104
+ -H 'Content-Type: application/json' \
105
+ -d '{"query":"fires","limit":5}'
106
+ ```
107
+
108
+ No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/gibs_list_layers`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.
109
+
110
+ ## Standalone (no gateway account)
111
+
112
+ This package also runs as a local stdio MCP server — no Pipeworx account, no
113
+ gateway round-trip:
114
+
115
+ ```json
116
+ {
117
+ "mcpServers": {
118
+ "nasa-gibs": {
119
+ "command": "npx",
120
+ "args": ["-y", "@pipeworx/mcp-nasa-gibs"]
121
+ }
122
+ }
123
+ }
124
+ ```
125
+
126
+ Or run it directly to confirm it starts:
127
+
128
+ ```bash
129
+ npx -y @pipeworx/mcp-nasa-gibs
130
+ ```
131
+
132
+ It speaks MCP over stdin/stdout and answers `initialize`/`tools/list`/`tools/call`
133
+ for **only** this pack's tools — none of the shared meta-tools the gateway
134
+ connection above adds. Same source, same tools, no ask_pipeworx routing.
135
+
136
+ ## Using with ask_pipeworx
137
+
138
+ Instead of calling tools directly, you can ask questions in plain English —
139
+ this works on the pack endpoint above as well as on the full gateway:
140
+
141
+ ```
142
+ ask_pipeworx({ question: "your question about Nasa Gibs data" })
143
+ ```
144
+
145
+ The gateway picks the right tool and fills the arguments automatically.
146
+
147
+ ## More
148
+
149
+ - [Docs and guides](https://pipeworx.io/docs)
150
+ - [pipeworx.io](https://pipeworx.io)
151
+
152
+ ## License
153
+
154
+ MIT
package/bin/cli.js ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ //
3
+ // Entry point for `npx @pipeworx/mcp-<slug>`.
4
+ //
5
+ // Packs ship as raw TypeScript (no build step — see publish-pack.sh for why:
6
+ // tsx sidesteps every extensionless-import / bare-JSON-import edge case a
7
+ // per-pack tsc build would have to solve one pack at a time). This file
8
+ // registers tsx's ESM loader programmatically, then hands off to src/server.ts,
9
+ // which wraps the pack's {tools, callTool} export in a stdio MCP server.
10
+ //
11
+ // Copied verbatim into every published pack repo by scripts/publish-pack.sh —
12
+ // edit this file, not a per-pack copy.
13
+ import { register } from 'tsx/esm/api';
14
+
15
+ register();
16
+
17
+ await import('../src/server.ts');
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@pipeworx/mcp-nasa-gibs",
3
+ "version": "0.1.0",
4
+ "description": "NASA GIBS MCP — the satellite-imagery layer catalogue behind Worldview.",
5
+ "type": "module",
6
+ "main": "src/index.ts",
7
+ "types": "src/index.ts",
8
+ "bin": {
9
+ "mcp-nasa-gibs": "bin/cli.js"
10
+ },
11
+ "keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "nasa-gibs"],
12
+ "license": "MIT",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/pipeworx-io/mcp-nasa-gibs.git"
16
+ },
17
+ "scripts": {
18
+ "typecheck": "tsc --noEmit"
19
+ },
20
+ "dependencies": {
21
+ "@modelcontextprotocol/sdk": "^1.30.0",
22
+ "tsx": "^4.19.0"
23
+ },
24
+ "devDependencies": {
25
+ "typescript": "^5.9.3",
26
+ "@cloudflare/workers-types": "^4.20260405.1"
27
+ },
28
+ "pipeworx": {
29
+ "sourceHash": "v1-fb7913be99fec47d736f0eab3a346c31281ae3a06de222888f165d4121617bcf",
30
+ "sourceCommit": "b0fb3c31386cf0256dcf1e2f1b3440435a87ec35"
31
+ }
32
+ }
package/server.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.pipeworx-io/nasa-gibs",
4
+ "title": "Nasa Gibs",
5
+ "description": "NASA GIBS MCP — the satellite-imagery layer catalogue behind Worldview.",
6
+ "version": "0.1.0",
7
+ "websiteUrl": "https://pipeworx.io/packs/nasa-gibs",
8
+ "repository": {
9
+ "url": "https://github.com/pipeworx-io/mcp-nasa-gibs",
10
+ "source": "github"
11
+ },
12
+ "remotes": [
13
+ {
14
+ "type": "streamable-http",
15
+ "url": "https://gateway.pipeworx.io/nasa-gibs/mcp"
16
+ }
17
+ ]
18
+ }