@pipeworx/mcp-meteoswiss 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 +157 -0
- package/bin/cli.js +17 -0
- package/package.json +32 -0
- package/server.json +18 -0
- package/src/index.ts +1230 -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,157 @@
|
|
|
1
|
+
# @pipeworx/meteoswiss
|
|
2
|
+
|
|
3
|
+
Swiss weather and federal geodata from MeteoSwiss and swisstopo on
|
|
4
|
+
data.geo.admin.ch — find SwissMetNet automatic weather stations, radar, pollen,
|
|
5
|
+
ICON forecasts and climate normals, plus elevation and topographic layers, and
|
|
6
|
+
get the direct CSV, GeoTIFF and NetCDF download URLs for each.
|
|
7
|
+
|
|
8
|
+
Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1679+ live data sources.
|
|
9
|
+
|
|
10
|
+
## Tools
|
|
11
|
+
|
|
12
|
+
- `meteoswiss_collections(contains?, scope?, prefix?, limit?)` — MeteoSwiss
|
|
13
|
+
datasets by default (`ch.meteoschweiz.*`); `scope: "all_swiss"` opens the whole
|
|
14
|
+
513-collection federal catalogue (swisstopo, BAFU, Agroscope).
|
|
15
|
+
- `meteoswiss_collection(collection_id)` — one collection in full. The
|
|
16
|
+
SwissMetNet description is where the resolution and recency codes are defined.
|
|
17
|
+
- `meteoswiss_search(collections?, bbox?, datetime?, ids?, limit?, max_assets?)`
|
|
18
|
+
— which stations or tiles cover an area, with their coordinates, human names
|
|
19
|
+
and direct download URLs.
|
|
20
|
+
|
|
21
|
+
## Auth
|
|
22
|
+
|
|
23
|
+
Keyless, metadata *and* assets. Everything is a public HTTPS download on
|
|
24
|
+
data.geo.admin.ch.
|
|
25
|
+
|
|
26
|
+
## Data sources
|
|
27
|
+
|
|
28
|
+
- <https://data.geo.admin.ch/api/stac/v1> — STAC API 1.0, the Swiss
|
|
29
|
+
Confederation's open geodata catalogue. MeteoSwiss OGD is the
|
|
30
|
+
`ch.meteoschweiz.` prefix.
|
|
31
|
+
|
|
32
|
+
Shared client: `shared/src/stac.ts`, also used by `planetary-computer`,
|
|
33
|
+
`earth-search` and `copernicus-dataspace`.
|
|
34
|
+
|
|
35
|
+
## Traps
|
|
36
|
+
|
|
37
|
+
- **An item's `datetime` is when the file was published, not when the weather
|
|
38
|
+
happened**, and this produces a wrong answer rather than an error. One item is
|
|
39
|
+
one *station*, not one observation: station `abo` (Adelboden) carries
|
|
40
|
+
`datetime: 2026-09-17T…` while its assets cover 1980 to today, and the
|
|
41
|
+
collection's temporal extent is a few milliseconds wide. "No station data
|
|
42
|
+
before 2026" is a misreading of a correct payload. The measurements are inside
|
|
43
|
+
the CSV assets.
|
|
44
|
+
- **The asset filename encodes resolution and recency.** In
|
|
45
|
+
`ogd-smn_<station>_<res>_<age>`: res is `t` = 10-minute, `h` = hourly,
|
|
46
|
+
`d` = daily, `m` = monthly, `y` = yearly; age is `now` (since midnight),
|
|
47
|
+
`recent` (this year to yesterday) or `historical_YYYY-YYYY` (ten-year blocks).
|
|
48
|
+
MeteoSwiss asks that you take the coarsest resolution you need rather than
|
|
49
|
+
aggregating 10-minute files.
|
|
50
|
+
- **Station ids are three-letter abbreviations** (`abo`, `ber`, `sma`), not place
|
|
51
|
+
names. The human name is each item's `title` ("Bern / Zollikofen (BER)").
|
|
52
|
+
- A default-scope `meteoswiss_search` with no `collections` searches the whole
|
|
53
|
+
federal catalogue, so it mixes weather stations with topographic tiles.
|
|
54
|
+
|
|
55
|
+
## Quick Start
|
|
56
|
+
|
|
57
|
+
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"mcpServers": {
|
|
62
|
+
"meteoswiss": {
|
|
63
|
+
"url": "https://gateway.pipeworx.io/meteoswiss/mcp"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### What this endpoint actually serves
|
|
70
|
+
|
|
71
|
+
`tools/list` at `https://gateway.pipeworx.io/meteoswiss/mcp` returns the tools in the table
|
|
72
|
+
above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
|
|
73
|
+
`discover_tools`, `search_within`, `remember`/`recall` and the rest of the
|
|
74
|
+
gateway-wide set. So the tool count you see is larger than this table: a
|
|
75
|
+
single-pack endpoint currently lists roughly 30 shared tools alongside the
|
|
76
|
+
pack's own. The connection's `initialize` response states its exact scope, and
|
|
77
|
+
is the authoritative answer for a given day.
|
|
78
|
+
|
|
79
|
+
This is deliberate, not multiplexing by accident. The meta-tools are what let a
|
|
80
|
+
scoped connection answer a question this pack does not cover — via
|
|
81
|
+
`ask_pipeworx`, which routes across the whole catalog — without you adding a
|
|
82
|
+
second MCP server. There is currently no way to mount a pack endpoint without
|
|
83
|
+
them; if the extra schemas cost you more context than the routing is worth,
|
|
84
|
+
connect to the full gateway once rather than to several pack endpoints.
|
|
85
|
+
|
|
86
|
+
Or connect to the full Pipeworx gateway to get every pack's tools listed
|
|
87
|
+
directly, instead of just this one's:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"mcpServers": {
|
|
92
|
+
"pipeworx": {
|
|
93
|
+
"url": "https://gateway.pipeworx.io/mcp"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Both URLs reach the same gateway and the same 1679+ data sources. The
|
|
100
|
+
only difference is which pack's tools are listed **directly**; `ask_pipeworx`
|
|
101
|
+
reaches all of them from either one.
|
|
102
|
+
|
|
103
|
+
## No MCP client? Call it over HTTP
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
curl -X POST https://gateway.pipeworx.io/v1/tools/meteoswiss_collections \
|
|
107
|
+
-H 'Content-Type: application/json' \
|
|
108
|
+
-d '{"contains":"station","limit":5}'
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/meteoswiss_collections`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.
|
|
112
|
+
|
|
113
|
+
## Standalone (no gateway account)
|
|
114
|
+
|
|
115
|
+
This package also runs as a local stdio MCP server — no Pipeworx account, no
|
|
116
|
+
gateway round-trip:
|
|
117
|
+
|
|
118
|
+
```json
|
|
119
|
+
{
|
|
120
|
+
"mcpServers": {
|
|
121
|
+
"meteoswiss": {
|
|
122
|
+
"command": "npx",
|
|
123
|
+
"args": ["-y", "@pipeworx/mcp-meteoswiss"]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Or run it directly to confirm it starts:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
npx -y @pipeworx/mcp-meteoswiss
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
It speaks MCP over stdin/stdout and answers `initialize`/`tools/list`/`tools/call`
|
|
136
|
+
for **only** this pack's tools — none of the shared meta-tools the gateway
|
|
137
|
+
connection above adds. Same source, same tools, no ask_pipeworx routing.
|
|
138
|
+
|
|
139
|
+
## Using with ask_pipeworx
|
|
140
|
+
|
|
141
|
+
Instead of calling tools directly, you can ask questions in plain English —
|
|
142
|
+
this works on the pack endpoint above as well as on the full gateway:
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
ask_pipeworx({ question: "your question about Meteoswiss data" })
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
The gateway picks the right tool and fills the arguments automatically.
|
|
149
|
+
|
|
150
|
+
## More
|
|
151
|
+
|
|
152
|
+
- [Docs and guides](https://pipeworx.io/docs)
|
|
153
|
+
- [pipeworx.io](https://pipeworx.io)
|
|
154
|
+
|
|
155
|
+
## License
|
|
156
|
+
|
|
157
|
+
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-meteoswiss",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Swiss weather and federal geodata from MeteoSwiss and swisstopo on data.geo.admin.ch — find SwissMetNet automatic weather stations, radar, pollen, ICON forecasts and climate normals, plus elevation and topographic layers, and get the direct CSV, GeoTIFF and NetCDF download URLs for each.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
|
+
"types": "src/index.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"mcp-meteoswiss": "bin/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "meteoswiss"],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/pipeworx-io/mcp-meteoswiss.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-9896c50a8d9d7fc8347e43480666eda89d1fe53903477b2b3b8ff60e3dba719b",
|
|
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/meteoswiss",
|
|
4
|
+
"title": "Meteoswiss",
|
|
5
|
+
"description": "Swiss weather and federal geodata from MeteoSwiss and swisstopo on data.geo.admin.ch — find…",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"websiteUrl": "https://pipeworx.io/packs/meteoswiss",
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "https://github.com/pipeworx-io/mcp-meteoswiss",
|
|
10
|
+
"source": "github"
|
|
11
|
+
},
|
|
12
|
+
"remotes": [
|
|
13
|
+
{
|
|
14
|
+
"type": "streamable-http",
|
|
15
|
+
"url": "https://gateway.pipeworx.io/meteoswiss/mcp"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|