@pipeworx/mcp-earthscope-fdsn 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,162 @@
1
+ # @pipeworx/earthscope-fdsn
2
+
3
+ Seismic station metadata, federated waveform holdings and regional earthquake
4
+ catalogues, over the international FDSN web-service standard.
5
+
6
+ Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1679+ live data sources.
7
+
8
+ This is the **instrument** side of seismology, not the global earthquake
9
+ catalogue — `usgs-earthquakes` and `emsc` already cover "what earthquakes
10
+ happened". `fdsn_events` here adds the REGIONAL agency catalogues, which list
11
+ the local magnitude-1-to-3 seismicity the global catalogues never publish.
12
+
13
+ ## Tools
14
+
15
+ - `fdsn_stations(network?, station?, channel?, level?, lat/lon/radius or bbox, …)` —
16
+ where seismometers are, what they record, who operates them, and when.
17
+ - `fdsn_events(datacenter?, starttime?, min_magnitude?, …)` — regional agency
18
+ earthquake catalogues: `gfz` (global rapid solutions), `ingv` (Italy),
19
+ `resif` (France), `koeri` (Turkey).
20
+ - `fdsn_availability(network, station?, channel?, starttime?, endtime?)` — which FDSN
21
+ data centres hold waveform data for a channel and time window, with each
22
+ centre's dataselect URL.
23
+
24
+ ## Auth
25
+
26
+ Keyless.
27
+
28
+ ## Data sources
29
+
30
+ - <https://service.earthscope.org/fdsnws/station/1/query> — station metadata.
31
+ - <https://service.earthscope.org/irisws/fedcatalog/1/query> — federated holdings.
32
+ - <https://geofon.gfz.de/fdsnws/event/1/query>, <https://webservices.ingv.it/fdsnws/event/1/query>,
33
+ <https://api.franceseisme.fr/fdsnws/event/1/query>,
34
+ <http://www.koeri.boun.edu.tr/services/fdsnws/event/1/query> — regional catalogues.
35
+
36
+ ### Things the next person would otherwise rediscover (all verified 2026-09-17)
37
+
38
+ - **`service.iris.edu` 301-redirects to `service.earthscope.org`.** Both work;
39
+ the old host costs a redirect on every call, so the new one is used directly.
40
+ - **EarthScope serves only `station` and `dataselect` under `/fdsnws/`.** Their
41
+ `event` and `availability` services answer HTTP 404. Availability is behind an
42
+ EarthScope login — it redirects to a trailing-slash path served by `uvicorn`
43
+ with `vary: Cookie`. That is why `fdsn_availability` answers from
44
+ `irisws/fedcatalog` instead: keyless, and it reports the same holdings
45
+ question across every federated data centre rather than one.
46
+ - **`nodata=404` makes an empty result indistinguishable from a retired
47
+ endpoint** — both are a bare 404 with an empty body, which is exactly how the
48
+ retired event service was nearly mistaken for "no earthquakes". These tools
49
+ send `nodata=204`, so an empty result is a 204 and a 404 genuinely means the
50
+ route is gone.
51
+ - **Field names differ between `level=station` and `level=channel`**, and the
52
+ depth column is spelled `Depth/km` at one agency and `Depth/Km` at another, so
53
+ rows are read by header name with aliases rather than by position.
54
+ - **`fedcatalog` answers in its own `format=request` dialect**, not FDSN text:
55
+ blank-line-separated blocks, each opening with `KEY=value` service lines and
56
+ then bare `NET STA LOC CHA START END` rows.
57
+ - **FDSN `maxradius` is in DEGREES of arc**, not km. The tools take km and
58
+ convert (÷ 111.195).
59
+
60
+ ## Quick Start
61
+
62
+ Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
63
+
64
+ ```json
65
+ {
66
+ "mcpServers": {
67
+ "earthscope-fdsn": {
68
+ "url": "https://gateway.pipeworx.io/earthscope-fdsn/mcp"
69
+ }
70
+ }
71
+ }
72
+ ```
73
+
74
+ ### What this endpoint actually serves
75
+
76
+ `tools/list` at `https://gateway.pipeworx.io/earthscope-fdsn/mcp` returns the tools in the table
77
+ above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
78
+ `discover_tools`, `search_within`, `remember`/`recall` and the rest of the
79
+ gateway-wide set. So the tool count you see is larger than this table: a
80
+ single-pack endpoint currently lists roughly 30 shared tools alongside the
81
+ pack's own. The connection's `initialize` response states its exact scope, and
82
+ is the authoritative answer for a given day.
83
+
84
+ This is deliberate, not multiplexing by accident. The meta-tools are what let a
85
+ scoped connection answer a question this pack does not cover — via
86
+ `ask_pipeworx`, which routes across the whole catalog — without you adding a
87
+ second MCP server. There is currently no way to mount a pack endpoint without
88
+ them; if the extra schemas cost you more context than the routing is worth,
89
+ connect to the full gateway once rather than to several pack endpoints.
90
+
91
+ Or connect to the full Pipeworx gateway to get every pack's tools listed
92
+ directly, instead of just this one's:
93
+
94
+ ```json
95
+ {
96
+ "mcpServers": {
97
+ "pipeworx": {
98
+ "url": "https://gateway.pipeworx.io/mcp"
99
+ }
100
+ }
101
+ }
102
+ ```
103
+
104
+ Both URLs reach the same gateway and the same 1679+ data sources. The
105
+ only difference is which pack's tools are listed **directly**; `ask_pipeworx`
106
+ reaches all of them from either one.
107
+
108
+ ## No MCP client? Call it over HTTP
109
+
110
+ ```bash
111
+ curl -X POST https://gateway.pipeworx.io/v1/tools/fdsn_stations \
112
+ -H 'Content-Type: application/json' \
113
+ -d '{"network":"IU","station":"ANMO","level":"channel","channel":"BH*"}'
114
+ ```
115
+
116
+ No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/fdsn_stations`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.
117
+
118
+ ## Standalone (no gateway account)
119
+
120
+ This package also runs as a local stdio MCP server — no Pipeworx account, no
121
+ gateway round-trip:
122
+
123
+ ```json
124
+ {
125
+ "mcpServers": {
126
+ "earthscope-fdsn": {
127
+ "command": "npx",
128
+ "args": ["-y", "@pipeworx/mcp-earthscope-fdsn"]
129
+ }
130
+ }
131
+ }
132
+ ```
133
+
134
+ Or run it directly to confirm it starts:
135
+
136
+ ```bash
137
+ npx -y @pipeworx/mcp-earthscope-fdsn
138
+ ```
139
+
140
+ It speaks MCP over stdin/stdout and answers `initialize`/`tools/list`/`tools/call`
141
+ for **only** this pack's tools — none of the shared meta-tools the gateway
142
+ connection above adds. Same source, same tools, no ask_pipeworx routing.
143
+
144
+ ## Using with ask_pipeworx
145
+
146
+ Instead of calling tools directly, you can ask questions in plain English —
147
+ this works on the pack endpoint above as well as on the full gateway:
148
+
149
+ ```
150
+ ask_pipeworx({ question: "your question about Earthscope Fdsn data" })
151
+ ```
152
+
153
+ The gateway picks the right tool and fills the arguments automatically.
154
+
155
+ ## More
156
+
157
+ - [Docs and guides](https://pipeworx.io/docs)
158
+ - [pipeworx.io](https://pipeworx.io)
159
+
160
+ ## License
161
+
162
+ 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-earthscope-fdsn",
3
+ "version": "0.1.0",
4
+ "description": "FDSN seismic web services MCP — seismometer metadata, data holdings and",
5
+ "type": "module",
6
+ "main": "src/index.ts",
7
+ "types": "src/index.ts",
8
+ "bin": {
9
+ "mcp-earthscope-fdsn": "bin/cli.js"
10
+ },
11
+ "keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "earthscope-fdsn"],
12
+ "license": "MIT",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/pipeworx-io/mcp-earthscope-fdsn.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-8a9be7859c1df39bee283aeaab40fbfba0de77080b367ab878e4548dc213637d",
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/earthscope-fdsn",
4
+ "title": "Earthscope Fdsn",
5
+ "description": "FDSN seismic web services MCP — seismometer metadata, data holdings and",
6
+ "version": "0.1.0",
7
+ "websiteUrl": "https://pipeworx.io/packs/earthscope-fdsn",
8
+ "repository": {
9
+ "url": "https://github.com/pipeworx-io/mcp-earthscope-fdsn",
10
+ "source": "github"
11
+ },
12
+ "remotes": [
13
+ {
14
+ "type": "streamable-http",
15
+ "url": "https://gateway.pipeworx.io/earthscope-fdsn/mcp"
16
+ }
17
+ ]
18
+ }