@pipeworx/mcp-earth-search 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 +21 -0
- package/README.md +149 -0
- package/bin/cli.js +17 -0
- package/package.json +32 -0
- package/server.json +18 -0
- package/src/index.ts +1206 -0
- package/src/server.ts +45 -0
- package/tsconfig.json +18 -0
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,149 @@
|
|
|
1
|
+
# @pipeworx/earth-search
|
|
2
|
+
|
|
3
|
+
Sentinel and Landsat imagery catalogue from Element 84's Earth Search over the
|
|
4
|
+
AWS Open Data registry — search Sentinel-1/2, Landsat Collection 2, NAIP and
|
|
5
|
+
Copernicus DEM by area and date and get item ids, footprints, cloud cover and
|
|
6
|
+
cloud-optimised GeoTIFF URLs.
|
|
7
|
+
|
|
8
|
+
Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1679+ live data sources.
|
|
9
|
+
|
|
10
|
+
## Tools
|
|
11
|
+
|
|
12
|
+
- `earth_search_collections(contains?, prefix?, limit?)` — the missions indexed,
|
|
13
|
+
with licence, extent and date range.
|
|
14
|
+
- `earth_search_collection(collection_id)` — one collection in full, including
|
|
15
|
+
the asset keys (bands, thumbnails) its items carry.
|
|
16
|
+
- `earth_search_search(collections?, bbox?, datetime?, ids?, limit?, max_assets?)`
|
|
17
|
+
— which scenes cover an area on given dates. `collections` is **optional**
|
|
18
|
+
here, unlike the sibling catalogues.
|
|
19
|
+
|
|
20
|
+
## Auth
|
|
21
|
+
|
|
22
|
+
Keyless, metadata *and* assets. Hrefs resolve on AWS Open Data with no token and
|
|
23
|
+
no account — this is the catalogue to send a caller to when they need bytes
|
|
24
|
+
rather than metadata. Some buckets are requester-pays when read over `s3://`
|
|
25
|
+
rather than `https://`.
|
|
26
|
+
|
|
27
|
+
## Data sources
|
|
28
|
+
|
|
29
|
+
- <https://earth-search.aws.element84.com/v1> — STAC API 1.0.
|
|
30
|
+
|
|
31
|
+
Shared client: `shared/src/stac.ts`, also used by `planetary-computer`,
|
|
32
|
+
`copernicus-dataspace` and `meteoswiss`.
|
|
33
|
+
|
|
34
|
+
## Traps
|
|
35
|
+
|
|
36
|
+
- **This is the one catalogue in the set that allows a catalogue-wide search.**
|
|
37
|
+
Planetary Computer (422) and the Copernicus Data Space (400) both refuse a
|
|
38
|
+
search with no `collections`. Useful for "is there ANY imagery here" — but the
|
|
39
|
+
result then spans missions with very different resolutions, so read
|
|
40
|
+
`collection` on each item before comparing them.
|
|
41
|
+
- Collection ids are **not portable**. Sentinel-2 L2A is `sentinel-2-c1-l2a`
|
|
42
|
+
here (Collection 1 reprocessing) and `sentinel-2-pre-c1-l2a` for the older
|
|
43
|
+
baseline, while the same mission is `sentinel-2-l2a` on Planetary Computer and
|
|
44
|
+
on the Copernicus Data Space. The wrong id returns an empty result, not an
|
|
45
|
+
error.
|
|
46
|
+
|
|
47
|
+
## Quick Start
|
|
48
|
+
|
|
49
|
+
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"mcpServers": {
|
|
54
|
+
"earth-search": {
|
|
55
|
+
"url": "https://gateway.pipeworx.io/earth-search/mcp"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### What this endpoint actually serves
|
|
62
|
+
|
|
63
|
+
`tools/list` at `https://gateway.pipeworx.io/earth-search/mcp` returns the tools in the table
|
|
64
|
+
above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
|
|
65
|
+
`discover_tools`, `search_within`, `remember`/`recall` and the rest of the
|
|
66
|
+
gateway-wide set. So the tool count you see is larger than this table: a
|
|
67
|
+
single-pack endpoint currently lists roughly 30 shared tools alongside the
|
|
68
|
+
pack's own. The connection's `initialize` response states its exact scope, and
|
|
69
|
+
is the authoritative answer for a given day.
|
|
70
|
+
|
|
71
|
+
This is deliberate, not multiplexing by accident. The meta-tools are what let a
|
|
72
|
+
scoped connection answer a question this pack does not cover — via
|
|
73
|
+
`ask_pipeworx`, which routes across the whole catalog — without you adding a
|
|
74
|
+
second MCP server. There is currently no way to mount a pack endpoint without
|
|
75
|
+
them; if the extra schemas cost you more context than the routing is worth,
|
|
76
|
+
connect to the full gateway once rather than to several pack endpoints.
|
|
77
|
+
|
|
78
|
+
Or connect to the full Pipeworx gateway to get every pack's tools listed
|
|
79
|
+
directly, instead of just this one's:
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"mcpServers": {
|
|
84
|
+
"pipeworx": {
|
|
85
|
+
"url": "https://gateway.pipeworx.io/mcp"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Both URLs reach the same gateway and the same 1679+ data sources. The
|
|
92
|
+
only difference is which pack's tools are listed **directly**; `ask_pipeworx`
|
|
93
|
+
reaches all of them from either one.
|
|
94
|
+
|
|
95
|
+
## No MCP client? Call it over HTTP
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
curl -X POST https://gateway.pipeworx.io/v1/tools/earth_search_collections \
|
|
99
|
+
-H 'Content-Type: application/json' \
|
|
100
|
+
-d '{"contains":"sentinel-2","limit":5}'
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/earth_search_collections`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.
|
|
104
|
+
|
|
105
|
+
## Standalone (no gateway account)
|
|
106
|
+
|
|
107
|
+
This package also runs as a local stdio MCP server — no Pipeworx account, no
|
|
108
|
+
gateway round-trip:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"mcpServers": {
|
|
113
|
+
"earth-search": {
|
|
114
|
+
"command": "npx",
|
|
115
|
+
"args": ["-y", "@pipeworx/mcp-earth-search"]
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Or run it directly to confirm it starts:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npx -y @pipeworx/mcp-earth-search
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
It speaks MCP over stdin/stdout and answers `initialize`/`tools/list`/`tools/call`
|
|
128
|
+
for **only** this pack's tools — none of the shared meta-tools the gateway
|
|
129
|
+
connection above adds. Same source, same tools, no ask_pipeworx routing.
|
|
130
|
+
|
|
131
|
+
## Using with ask_pipeworx
|
|
132
|
+
|
|
133
|
+
Instead of calling tools directly, you can ask questions in plain English —
|
|
134
|
+
this works on the pack endpoint above as well as on the full gateway:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
ask_pipeworx({ question: "your question about Earth Search data" })
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
The gateway picks the right tool and fills the arguments automatically.
|
|
141
|
+
|
|
142
|
+
## More
|
|
143
|
+
|
|
144
|
+
- [Docs and guides](https://pipeworx.io/docs)
|
|
145
|
+
- [pipeworx.io](https://pipeworx.io)
|
|
146
|
+
|
|
147
|
+
## License
|
|
148
|
+
|
|
149
|
+
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-earth-search",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Sentinel and Landsat imagery catalogue from Element 84's Earth Search over the AWS Open Data registry — search Sentinel-1/2, Landsat Collection 2, NAIP and Copernicus DEM by area and date and get item ids, footprints, cloud cover and cloud-optimised GeoTIFF URLs.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
|
+
"types": "src/index.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"mcp-earth-search": "bin/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "earth-search"],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/pipeworx-io/mcp-earth-search.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-e354103a392e22dc7963f990f57369dcb2a92615aebd2cedf2ca3d96414ffd7e",
|
|
30
|
+
"sourceCommit": "70cd53748fc9f9a43ed3681d751bfa96e701efd2"
|
|
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/earth-search",
|
|
4
|
+
"title": "Earth Search",
|
|
5
|
+
"description": "Sentinel and Landsat imagery catalogue from Element 84's Earth Search over the AWS Open Data…",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"websiteUrl": "https://pipeworx.io/packs/earth-search",
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "https://github.com/pipeworx-io/mcp-earth-search",
|
|
10
|
+
"source": "github"
|
|
11
|
+
},
|
|
12
|
+
"remotes": [
|
|
13
|
+
{
|
|
14
|
+
"type": "streamable-http",
|
|
15
|
+
"url": "https://gateway.pipeworx.io/earth-search/mcp"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|