viafrei 0.0.2 → 0.0.9

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/README.md CHANGED
@@ -1,3 +1,196 @@
1
1
  # viafrei
2
2
 
3
- This package name is reserved. Nothing to see here yet.
3
+ **German road, rail, parking, charging and fuel data — live, inside your AI
4
+ assistant.**
5
+
6
+ ```
7
+ npx viafrei
8
+ ```
9
+
10
+ ## Ask your assistant things like
11
+
12
+ **Welche Züge fahren als Nächstes ab Hamburg Hbf?**
13
+
14
+ ```
15
+ Abfahrten ab Hamburg Hbf (nächste 60 Minuten):
16
+ 09:45 ICE 519 → München Hbf, Gleis 14, +3 min (ca. 09:48)
17
+ 09:51 IC 306 → Stockholm Central, Gleis 12, pünktlich
18
+ 09:51 ICE 707 → Berlin Hbf, Gleis 8A-F, +1 min (ca. 09:52)
19
+ … seven more
20
+
21
+ Stand 09:43 · Quelle: Fahrplandaten: Deutsche Bahn AG, DB API Marketplace,
22
+ CC BY 4.0, bearbeitet (…) · Bahnhofsdaten: Deutsche Bahn AG,
23
+ DB API Marketplace, CC BY 4.0, bearbeitet (…)
24
+ ```
25
+
26
+ Every answer ends with a line like that last one. It is the licence talking,
27
+ and it is meant to be shown to whoever reads the answer — see
28
+ [Using the data you get back](#using-the-data-you-get-back). **Reproduce the
29
+ line the server sends you, not this one:** it has been shortened here, and the
30
+ real one names each source's URL, which the licence requires you to keep.
31
+
32
+ **No account, no API key, no sign-up — ask and the answer comes back.**
33
+
34
+ ViaFrei is in its stabilisation and testing phase at the time of writing: live
35
+ and free, with some sources thinner than they will be, and the occasional tool
36
+ that answers slowly or not at all. **Tell us when that happens** —
37
+ [open an issue](https://github.com/mavrovde/viafrei-bridge/issues) with what you
38
+ asked and what came back. The server necessarily sees the question, and sees
39
+ it fail; what it cannot see is that an answer was useless to you
40
+ (see [What it does not do](#what-it-does-not-do)).
41
+
42
+ Plain German or plain English, whichever you speak — the answers come back in
43
+ the language you asked in, not translated from one house language:
44
+
45
+ - *Gibt es gerade Stau auf der A8?*
46
+ - *Find a rest area with lorry parking on the A9*
47
+ - *Sind auf der A8 Baustellen geplant, wenn ich nächste Woche fahre?*
48
+ - *Wo kann ich in Leipzig mit Typ 2 laden?*
49
+ - *Gibt es eine Unwetterwarnung für Freiburg?*
50
+ - *Brauche ich in Deutschland eine Umweltplakette?*
51
+ - *Tell me when the A8 reopens* — the server can watch a situation and tell
52
+ your assistant when it changes, so you need not keep asking. The watch lives
53
+ in the conversation that opened it: it reaches no inbox and no phone, and
54
+ it ends with the session. Three hours by default; 24 is the longest one can
55
+ be asked to run
56
+
57
+ Thirteen tools at the time of writing, and no list of them on this page. A
58
+ pasted catalogue goes stale the first time a description changes on the server,
59
+ and this page is frozen inside a published tarball — it cannot be corrected
60
+ without a release. So there is one source of truth and it is the running
61
+ server: connect any MCP client and call `tools/list` for the catalogue as it
62
+ is today. (<https://viafrei.de> is the live national traffic digest, not a
63
+ catalogue.)
64
+
65
+ ## Quick start
66
+
67
+ Node 22 or newer. Nothing to install — `npx` fetches the bridge when your
68
+ client starts it.
69
+
70
+ **Claude Desktop** (`claude_desktop_config.json`). The same three lines fit any
71
+ client that takes an stdio MCP server, including the `.mcp.json` an IDE reads:
72
+
73
+ ```json
74
+ {
75
+ "mcpServers": {
76
+ "viafrei": {
77
+ "command": "npx",
78
+ "args": ["-y", "viafrei"]
79
+ }
80
+ }
81
+ }
82
+ ```
83
+
84
+ Restart the client and ask it one of the questions above. There is no account,
85
+ no API key and no sign-up.
86
+
87
+ ## Do you actually need this package?
88
+
89
+ Probably not — and that is deliberate.
90
+
91
+ Most MCP clients speak Streamable HTTP and should connect straight to
92
+ `https://mcp.viafrei.de/mcp`. **They do not need this package at all.**
93
+
94
+ Some clients still speak only stdio. This bridge is for those: it runs locally,
95
+ exposes a stdio MCP server, and relays every request to the public endpoint. It
96
+ is a transport shim — it holds no data and no credentials, and it makes no
97
+ decision about any answer.
98
+
99
+ ## Configuration
100
+
101
+ | option | what it does |
102
+ |---|---|
103
+ | `--url <url>` | endpoint to relay to. Default `https://mcp.viafrei.de/mcp` — see the note below |
104
+ | `--header "Name: value"` | extra HTTP header on every request, repeatable. For an API key, when there is one |
105
+ | `--timeout <ms>` | per-request timeout, default 30000. The event stream is never timed out |
106
+ | `--version`, `--help` | print and exit |
107
+
108
+ `VIAFREI_MCP_URL` and `VIAFREI_MCP_TIMEOUT_MS` do the same for clients that
109
+ pass environment variables rather than arguments. A flag wins over the
110
+ variable; the variable wins over the built-in default.
111
+
112
+ **There is no self-hosted ViaFrei.** The server is a hosted service, so `--url`
113
+ is not a way to run your own — it is there for a proxy or gateway in front of
114
+ the service, and for the stub server this repository's test suite starts.
115
+ Leave it unset and the bridge goes to the hosted endpoint, which is what you
116
+ want.
117
+
118
+ ## When something is wrong
119
+
120
+ One line to stderr and an exit code that says what happened. No stack traces:
121
+
122
+ ```
123
+ viafrei: cannot reach https://mcp.viafrei.de/mcp: DNS lookup failed (EAI_AGAIN) - check your network connection; --url only if you relay through a proxy
124
+ ```
125
+
126
+ | exit | meaning |
127
+ |---|---|
128
+ | `0` | clean shutdown (the client closed stdin, or sent SIGINT/SIGTERM) |
129
+ | `1` | something else went wrong; the line says what |
130
+ | `2` | bad usage — a flag or a value the bridge does not accept |
131
+ | `3` | the endpoint could not be reached, stopped answering, or never answered in time |
132
+ | `4` | the endpoint answered and this cannot continue: it refused (the line names the HTTP status), it forgot the session, it answered with something that is not MCP, or it redirected to another origin |
133
+ | `5` | protocol version mismatch; the line names the version the server speaks |
134
+
135
+ An established session is allowed to wobble — a dropped event stream is a
136
+ warning, not an exit, and the bridge reconnects. It is not allowed to be dead
137
+ in silence: several failures in a row with nothing succeeding in between end
138
+ the process with the code above, so the client that started it finds out.
139
+
140
+ ## What it does not do
141
+
142
+ No telemetry, no analytics, no usage counter, no update check. It writes no
143
+ file outside the OS temp directory, and it stores no credential — `--header` is
144
+ passed through to the endpoint and never persisted or logged.
145
+
146
+ It also does not follow a redirect off the origin you pointed it at. Your
147
+ headers go to that origin and nowhere else: a cross-origin redirect is refused
148
+ with one line naming both ends, so a server cannot forward your API key
149
+ somewhere you did not choose. Same-origin redirects are followed normally.
150
+
151
+ ## Using the data you get back
152
+
153
+ Every result carries an attribution line. **Show it to the person reading the
154
+ answer.** The full register lives at the resource `viafrei://attribution`, and
155
+ **[SOURCES.md](SOURCES.md)** is the readable version of it: every publisher,
156
+ what they cover, the licence, and the exact attribution line to reproduce.
157
+
158
+ Two constraints matter more than the rest, because getting them wrong is a
159
+ licence breach rather than a style problem:
160
+
161
+ - **MTS-K fuel prices are consumer information only.** No redistribution in any
162
+ form — that includes aggregates, comparisons, price tables and anything
163
+ derived. Answer the person who asked; do not build a product out of it.
164
+ - **DELFI public-transport data is CC BY-SA 4.0.** Share-alike travels with
165
+ anything derived from it, and it must not be blended into a result under a
166
+ different licence.
167
+
168
+ Everything else — where each answer comes from, and what each licence asks of
169
+ you — is in [SOURCES.md](SOURCES.md). See also [NOTICE](NOTICE) and
170
+ [LICENSE](LICENSE).
171
+
172
+ ## The server itself
173
+
174
+ The MCP server is offered as a **hosted service**, and its source is closed. It
175
+ is not in this repository and is not published. What is public is the part that
176
+ is meant to be: the tool names, their descriptions, their input schemas, the
177
+ shape of the results and the attribution lines — everything a client reads from
178
+ `tools/list`, which is the product surface.
179
+
180
+ This is said plainly so nobody spends an evening looking for the server code.
181
+
182
+ ## Contributing
183
+
184
+ Yes, please — see [CONTRIBUTING.md](CONTRIBUTING.md). Issues and discussions
185
+ are open. The bridge is small and self-contained, which is exactly what makes
186
+ it a reasonable thing to send a first patch to.
187
+
188
+ ## Security
189
+
190
+ Never open a public issue for a key, a token or anything that looks like one.
191
+ See [SECURITY.md](SECURITY.md) for the private reporting path.
192
+
193
+ ## Licence
194
+
195
+ [Apache-2.0](LICENSE) for this code. Data obtained through the server keeps its
196
+ provider's licence — see [NOTICE](NOTICE).
package/SOURCES.md ADDED
@@ -0,0 +1,454 @@
1
+ # Where the answers come from
2
+
3
+ Every answer the ViaFrei MCP server gives is built from **official open data**,
4
+ and every result says which source it came from. This page is the human-readable
5
+ copy of that list: who publishes each dataset, what it covers, how often the
6
+ publisher releases it, under which licence, and the **attribution line** that has
7
+ to travel with the answer — shortened by one part, for a reason given where the
8
+ lines are printed.
9
+
10
+ It is not only a credits page. Several of these licences put obligations on
11
+ **you** — the person or product that receives a tool result — and two of them
12
+ can be breached without noticing. Those two are first, before the catalogue.
13
+
14
+ The authoritative, always-current register is the resource
15
+ **`viafrei://attribution`** on the server itself. Any MCP client can read it. If
16
+ this page and that resource ever disagree, the resource is right and this page is
17
+ stale: tell us and we will fix it.
18
+
19
+ ---
20
+
21
+ ## Two obligations that bind the reader
22
+
23
+ ### Fuel prices are consumer information only
24
+
25
+ Fuel prices come from **MTS-K**, the Markttransparenzstelle für Kraftstoffe at
26
+ the Bundeskartellamt, through Tankerkönig. German competition law
27
+ (§ 47k GWB) lets a consumer-information service receive them **for one purpose
28
+ only**: telling consumers what fuel costs right now.
29
+
30
+ What that means for you, in plain words:
31
+
32
+ - **Show the price to the person who asked. Do not redistribute it.** Not the
33
+ raw price, not a table, not a comparison, not an average, not a chart, not a
34
+ "derived" dataset. The Bundeskartellamt's guidance says the form makes no
35
+ difference — real-time or old, raw, reformatted or aggregated — and names
36
+ analyses built from the data as caught too. Tankerkönig's own terms forbid
37
+ passing the data on outright.
38
+ - **Never let it reach the fuel industry.** Not mineral-oil companies, station
39
+ operators, their trade bodies, and not the IT providers working for them
40
+ (price reporters, till-system and fuel-card vendors, station IT). If your
41
+ recipient might pass it on to that sector, you may not supply them either.
42
+ - The consequence of getting this wrong is not a style complaint: misuse costs
43
+ the licence to receive the data at all — ours, and yours.
44
+
45
+ ### Public-transport realtime is share-alike
46
+
47
+ Realtime public-transport data comes from **DELFI e.V.** under
48
+ **CC BY-SA 4.0**. Share-alike means the obligation travels:
49
+
50
+ - anything you derive from it — a table of delays, a punctuality figure, a
51
+ screen that reuses the numbers — has to be offered under CC BY-SA 4.0 too;
52
+ - you may not blend it into a work you publish under a different licence, which
53
+ in practice means **do not merge a DELFI delay with data you hold under a
54
+ non-compatible licence and ship the mixture**;
55
+ - the attribution line stays with it.
56
+
57
+ If that is not what you want for your product, ask for the same answer from a
58
+ source that is not BY-SA, or keep the two apart.
59
+
60
+ ### And one that applies only if you get an address back
61
+
62
+ Address lookups, **where a deployment has imported the data**, are answered from
63
+ **OpenStreetMap** under the **ODbL 1.0**. The public service has not imported it
64
+ and answers no house numbers today, so this binds nobody using that service
65
+ right now — it is stated because the moment it does, it binds everybody.
66
+
67
+ ODbL's share-alike is on the *database*, not on the sentence: if you build your
68
+ own database out of address results and use it publicly, you owe your recipients
69
+ the same offer we make. **Our side of that offer stands** — ODbL § 4.6 — and the
70
+ server states it in `viafrei://attribution`: ask, and you get our address extract
71
+ and our alterations to it under ODbL 1.0. An issue on this repository reaches
72
+ us, and the server's own register names the contact route as well.
73
+
74
+ ---
75
+
76
+ ## The catalogue
77
+
78
+ **Status is not a promise, it is a measurement.** Every "live" below was checked
79
+ by calling the public endpoint on **2026-09-21** and reading which source the
80
+ answer named. A source can be licensed, cleared and loaded and still not answer
81
+ a question today; where that is so, this page says it.
82
+
83
+ - **live** — an answer came back naming it when this page was checked;
84
+ - **in the service** — licensed and loaded, and the spot check produced no
85
+ answer that named it, so it is reported as unconfirmed rather than as live;
86
+ - **not on the public service today** — cleared and built, and it does not
87
+ answer right now. Do not design around it yet;
88
+ - **read** — the licence is read and cleared, and nothing uses it yet.
89
+
90
+ | Source | Publisher | Covers | Publisher's rhythm | Licence | Status |
91
+ |---|---|---|---|---|---|
92
+ | Motorway traffic | Die Autobahn GmbH des Bundes | Roadworks, warnings, closures, webcams, lorry parking, charging points on the Bundesautobahnen | continuous | open, no licence text published — see below | live |
93
+ | Roadworks (DATEX II) | Bundesanstalt für Straßen- und Verkehrswesen (BASt), via the national access point | Arbeitsstellen on the Bundesautobahnen | a few times a day | CC BY 4.0 | live |
94
+ | Lorry parking, static | Lkw-Parken BAB Deutschland / BMV, via the national access point | Nationwide lorry parking sites on the Bundesautobahnen | a few releases a year | GeoNutzV | live |
95
+ | Fuel prices (MTS-K) | Tankerkönig / Markttransparenzstelle für Kraftstoffe | Prices and station details for German filling stations | continuous, in the publisher's own cycle | CC BY 4.0 **plus the MTS-K purpose limit** | live, **limited coverage** |
96
+ | Timetables | Deutsche Bahn AG (DB API Marketplace) | Planned and changed rail departures per station | continuous | CC BY 4.0 | live |
97
+ | StaDa — Station Data | Deutsche Bahn AG (DB API Marketplace) | Station master data: name, number, address, coordinates, facilities | static master data | CC BY 4.0 | live |
98
+ | Official weather warnings | Deutscher Wetterdienst (DWD) | Amtliche Wetterwarnungen per municipality | as issued | CC BY 4.0, with a source note fixed by law | live |
99
+ | Place gazetteer | GeoNames | Populated places and administrative units worldwide, with alternate names | rebuilt daily, taken per release | CC BY 4.0 | live |
100
+ | Charging point master data | Eco-Movement, via the national access point | AFIR charge-point master data across many operators | static releases | CC BY 4.0 | live |
101
+ | Charging point master data | EnBW AG, via the national access point | AFIR charge-point master data for EnBW mobility+ | static releases | CC BY 4.0 | in the service |
102
+ | Charging point availability | Tesla Germany GmbH and Volkswagen Group Charging GmbH, via the national access point | AFIR dynamic status for their own networks | live status | **CC0 1.0** | in the service |
103
+ | German road rules | ViaFrei, compiled from official sources | Environmental zones, tolls, equipment duties, charging rules | reviewed at least twice a year | our own text | live |
104
+ | Public-transport realtime (GTFS-RT Trip Updates) | DELFI e.V., via the national access point (Mobilithek) | Germany-wide departure and arrival forecasts | real time | **CC BY-SA 4.0** | **not dependable today** — see below |
105
+ | FaSta — Facility Status | Deutsche Bahn AG (DB API Marketplace) | Live state of lifts and escalators at stations | live status | CC BY 4.0 | **not on the public service today** |
106
+ | Geocoding (addresses) | OpenStreetMap contributors | Street and house-number points in Germany | refreshed from the OSM extract | **ODbL 1.0** | **not on the public service today** |
107
+ | Timetable data (static GTFS) | DELFI e.V. | Germany-wide scheduled public transport | weekly release | CC BY 4.0 | read |
108
+ | Stop directory (zHV) | DELFI e.V. | Every public-transport stop in Germany with its identifier and coordinates | weekly release | CC BY 4.0 | read |
109
+ | Administrative units and place names | Bundesamt für Kartographie und Geodäsie (BKG), product GN250 | Länder, Regierungsbezirke, Kreise, Gemeinden with their official keys and names | yearly release | **dl-de/by-2-0** | read |
110
+ | Police traffic events | Landesbetrieb Straßenbau NRW (VIZ.NRW), via the national access point | Police traffic reports, Germany-wide | continuous | **Datenlizenz Deutschland – Zero – 2.0** | read |
111
+
112
+ Four of those rows need saying out loud rather than in a cell. All four are
113
+ places where it would have been easier to write "live" and leave it.
114
+
115
+ - **Fuel coverage is not nationwide.** We watch a limited set of stations, on
116
+ the terms the publisher sets, and we ask for a station's details only when
117
+ somebody actually asks a question. Outside that set you may get nothing back.
118
+ That is a consequence of the MTS-K rules, not a gap we are hiding.
119
+ - **Public-transport realtime is not dependable yet.** The licence is cleared
120
+ and the feed is in the service, but the tool that exposes it was answering
121
+ with an internal error when this page was checked on 2026-09-21. Do not build
122
+ on it until this row says otherwise.
123
+ - **Lift and escalator status does not answer today, and the reason is one step
124
+ earlier than the feed.** The licence is read and the tool exists; what is
125
+ missing is the station directory that turns a name like "Köln Hbf" into the
126
+ station number this feed is keyed by. Without it the lookup cannot even be
127
+ attempted, so the tool refuses — naming the missing directory and stating that
128
+ this is not an all-clear — instead of returning an empty list that would read
129
+ as "nothing is broken".
130
+ - **Address lookup is not available on the public service.** Address data is
131
+ imported per deployment and the public one has none, so the service answers
132
+ places, stations and motorways but not house numbers. Where it *is* imported,
133
+ the ODbL obligations below apply in full.
134
+
135
+ ## The sources in detail
136
+
137
+ Each block gives the licence in the publisher's own words where we have it, and
138
+ the attribution line that belongs to that source.
139
+
140
+ **Reproduce the line as you received it from the server, not as it is printed
141
+ here.** The lines below are shortened: every attribution line in a real tool
142
+ result ends with the source URI in parentheses, and this page leaves that URI
143
+ off on purpose — a public page in this repository does not carry deep links into
144
+ the catalogues we fetch through. CC BY 4.0 § 3(a)(1)(A)(iv) makes you retain a
145
+ URI the licensor supplied, so the copy in the tool result is the one that
146
+ discharges the obligation and the copies here are for reading, not for pasting.
147
+ Same text, one part deliberately missing; if you have the result, use the
148
+ result, and `viafrei://attribution` carries every line in full.
149
+
150
+ The obligation itself is not a suggestion: CC BY 4.0 § 3 and its equivalents
151
+ terminate the grant when the condition is not met.
152
+
153
+ Why several lines end in `bearbeitet` ("edited"): CC BY 4.0 § 3(a)(1)(B) makes
154
+ you indicate that you changed the material. An answer is always a derived form —
155
+ a parsed timetable, a summarised warning, a shortened list — so the indication is
156
+ owed, and it is part of the string rather than an afterthought.
157
+
158
+ ### Die Autobahn GmbH des Bundes — motorway traffic
159
+
160
+ Roadworks, warnings, closures, webcams, lorry parking and charging points on the
161
+ Bundesautobahnen. Open interface, no key, no account.
162
+
163
+ ```
164
+ Verkehrsdaten: Autobahn GmbH des Bundes
165
+ ```
166
+
167
+ **Read this before you redistribute.** Autobahn GmbH publishes the data openly
168
+ but publishes **no reuse licence text** alongside it — we checked again on
169
+ 2026-09-21 and found none. We therefore do not claim a grant we cannot quote:
170
+ we name the source on every answer, and we treat redistribution beyond showing
171
+ the answer as an open question with the publisher rather than as something the
172
+ absence of a licence permits. If you intend to republish it, ask them.
173
+
174
+ Publisher: <https://www.autobahn.de>
175
+
176
+ ### DELFI e.V. — public-transport realtime · CC BY-SA 4.0
177
+
178
+ Germany-wide GTFS-RT Trip Updates — the live forecast behind a departure board
179
+ — published by DELFI e.V. through the national access point (Mobilithek), and
180
+ listed on GovData with the licence **CC-BY-SA 4.0** (checked 2026-09-21).
181
+
182
+ ```
183
+ Echtzeitdaten: DELFI e.V. via Mobilithek, CC BY-SA 4.0
184
+ ```
185
+
186
+ Share-alike. See [the obligation above](#public-transport-realtime-is-share-alike):
187
+ what you derive from this stays CC BY-SA 4.0, and it may not be blended into a
188
+ result you publish under another licence.
189
+
190
+ **It is not dependable yet.** Asked twice on 2026-09-21, the tool that exposes
191
+ this feed answered with an internal error. The licence work is done and the data
192
+ is there; the answer is not, so plan for it rather than on it.
193
+
194
+ Licence: <https://creativecommons.org/licenses/by-sa/4.0/> ·
195
+ publisher: <https://www.opendata-oepnv.de>
196
+
197
+ Two more DELFI datasets are cleared and not yet in use: the Germany-wide static
198
+ timetable (`Fahrplandaten: DELFI e.V., CC BY 4.0, bearbeitet`) and the central
199
+ stop directory
200
+ (`Haltestellendaten: DELFI e.V. (zentrales Haltestellenverzeichnis), CC BY 4.0, bearbeitet`).
201
+ Both are **CC BY 4.0**, not BY-SA — the share-alike is on the realtime feed.
202
+
203
+ ### Tankerkönig / MTS-K — fuel prices · CC BY 4.0 **plus a purpose limit**
204
+
205
+ ```
206
+ Tankstellenpreise: Tankerkönig.de — MTS-K, CC BY 4.0, bearbeitet
207
+ ```
208
+
209
+ This is the one line whose **link is part of the obligation** rather than part
210
+ of the server's formatting: naming the source is required and the publisher
211
+ names a link as the way to do it ("insbesondere ist eine Namensnennung nötig",
212
+ read 2026-09-21), so the line must carry
213
+ <https://creativecommons.tankerkoenig.de> wherever it appears.
214
+
215
+ The CC BY licence is **not** the binding constraint here. The MTS-K purpose
216
+ limitation sits on top of it and is stricter: consumer information only, no
217
+ redistribution in any form, and never to the fuel industry or its IT providers.
218
+ The full statement is [at the top of this page](#fuel-prices-are-consumer-information-only).
219
+ The publisher's own terms put it bluntly: attempts to pull the data in bulk are
220
+ blocked and the key deactivated.
221
+
222
+ Terms: <https://creativecommons.tankerkoenig.de> · MTS-K guidance for consumer
223
+ services: <https://www.bundeskartellamt.de>
224
+
225
+ The historical price archive published beside the API is licensed
226
+ **CC BY-NC-SA** — non-commercial. It is not a source for any answer this
227
+ service gives, and it never will be while that licence stands.
228
+
229
+ ### Deutsche Bahn AG — timetables, stations, facilities · CC BY 4.0
230
+
231
+ Three products on the DB API Marketplace, each read at its own product page.
232
+
233
+ ```
234
+ Fahrplandaten: Deutsche Bahn AG, DB API Marketplace, CC BY 4.0, bearbeitet
235
+ Bahnhofsdaten: Deutsche Bahn AG, DB API Marketplace, CC BY 4.0, bearbeitet
236
+ Aufzüge und Fahrtreppen: Deutsche Bahn AG, DB API Marketplace, CC BY 4.0, bearbeitet
237
+ ```
238
+
239
+ The product pages say it in one sentence: *"Dieser Datensatz wird bereitgestellt
240
+ unter der Lizenz Creative Commons Attribution 4.0 International (CC BY 4.0)."*
241
+ DB adds one carve-out, and it is narrower than it looks: once the data has been
242
+ contributed to OpenStreetMap, a mention of Deutsche Bahn AG in the contributor
243
+ list is enough. That is a relaxation **for OSM**, not permission to drop the
244
+ line from your own results.
245
+
246
+ Facility status — the live state of lifts and escalators — **does not answer on
247
+ the public service today**, and not because of this feed: the station directory
248
+ that resolves a station name to the number the feed is keyed by is not loaded
249
+ there, so the lookup stops before it starts. Do not build on it yet.
250
+
251
+ Publisher: <https://developers.deutschebahn.com>
252
+
253
+ ### Deutscher Wetterdienst — official weather warnings · CC BY 4.0
254
+
255
+ ```
256
+ Quelle: Deutscher Wetterdienst
257
+ ```
258
+
259
+ The DWD's copyright page, read 2026-09-21: *"Alle frei zugänglichen Geodaten und
260
+ Geodatendienste sowie die als hochwertige Datensätze / high value datasets (HVD)
261
+ festgelegten Leistungen des DWD dürfen unter den Bedingungen der Lizenz Creative
262
+ Commons BY 4.0 (CC BY 4.0) unter Beigabe eines Quellenvermerks weiterverwendet
263
+ werden."*
264
+
265
+ The wording of that source note is **prescribed by law** (§ 7 DWD-Gesetz), which
266
+ is why it is three words and why they may not be reworded, translated or
267
+ abbreviated. It also has to sit immediately next to the DWD information it
268
+ belongs to.
269
+
270
+ There is a second line, and the difference matters:
271
+
272
+ ```
273
+ Datenbasis: Deutscher Wetterdienst, zusammengefasst
274
+ ```
275
+
276
+ An **amtliche Wetterwarnung** is official text. Where an answer reproduces the
277
+ warning as issued, it carries `Quelle: Deutscher Wetterdienst`. Where it shows
278
+ our summary instead of the DWD's own words, the DWD requires the Quellenvermerk
279
+ to be **removed** and a changed-data note put in its place — an altered warning
280
+ must not look official. That is why you will see one line or the other and never
281
+ both. If you rewrite a warning further, the same rule applies to you.
282
+
283
+ Licence: <https://www.dwd.de/copyright>
284
+
285
+ ### AFIR charging data — CC BY 4.0 and CC0 1.0
286
+
287
+ Charge-point data reaches us through the national access point under the EU
288
+ alternative-fuels rules (AFIR). The licences are **not uniform**, so they are
289
+ listed one by one:
290
+
291
+ ```
292
+ Ladepunkte: Eco-Movement via Mobilithek, CC BY 4.0, bearbeitet
293
+ Ladepunkte: EnBW AG via Mobilithek, CC BY 4.0, bearbeitet
294
+ Ladepunkt-Verfügbarkeit: Tesla Germany GmbH via Mobilithek, CC0 1.0
295
+ Ladepunkt-Verfügbarkeit: Volkswagen Group Charging GmbH via Mobilithek, CC0 1.0
296
+ ```
297
+
298
+ The pattern so far, across the offers we have actually read: the **static**
299
+ master-data publications are CC BY 4.0, the **dynamic** availability feeds are
300
+ CC0 1.0. It is a pattern and not a rule — "AFIR data is mostly CC0" is a guess
301
+ that has been wrong twice — so each new offer gets its licence read before it is
302
+ used.
303
+
304
+ CC0 waives copyright and database rights and attaches **no** condition; we name
305
+ those publishers anyway, because an answer should say where it came from. CC0
306
+ does not waive trade marks: a name there identifies the source of the data and
307
+ nothing else.
308
+
309
+ Master data — where the posts are, which plug, how many kW — answers today.
310
+ **Live availability does not exist for most of Germany**, because only some
311
+ operators publish it; a result says how many nearby sites had no status rather
312
+ than quietly leaving them out or calling them free.
313
+
314
+ ### OpenStreetMap — geocoding · ODbL 1.0
315
+
316
+ ```
317
+ Geokodierung: © OpenStreetMap-Mitwirkende, ODbL 1.0
318
+ ```
319
+
320
+ Carried on every answer whose input was an address, and on no other answer: a
321
+ result about a station or a place is not OSM-derived and does not pretend to be.
322
+
323
+ Address data is imported **per deployment**, and the public service has none —
324
+ asked for a house number on 2026-09-21 it answers that it can find places,
325
+ stations and motorways but not house numbers, which is the right answer rather
326
+ than a guessed coordinate. So nothing you get from the public service today
327
+ carries this line or this obligation. Where an operator has imported the
328
+ extract, both apply in full.
329
+
330
+ Our ODbL § 4.6 offer is [above](#and-one-that-applies-only-if-you-get-an-address-back).
331
+
332
+ Licence: <https://opendatacommons.org/licenses/odbl/1-0/> ·
333
+ copyright: <https://www.openstreetmap.org/copyright>
334
+
335
+ ### BASt and Lkw-Parken — motorway roadworks and lorry parking
336
+
337
+ Both arrive through the national access point, and both answer today: planned
338
+ roadworks come from BASt, lorry parking sites from the static file below.
339
+
340
+ ```
341
+ Arbeitsstellen: Bundesanstalt für Straßen- und Verkehrswesen (BASt) via Mobilithek, CC BY 4.0, bearbeitet
342
+ ```
343
+
344
+ The lorry-parking file is published under **GeoNutzV**, which requires a source
345
+ note *and* a note that the data was changed. The year in it is the year of the
346
+ last download, filled in when the file is taken:
347
+
348
+ ```
349
+ LKW-Parken: © Lkw-Parken BAB Deutschland / Bundesministerium für Verkehr (BMV) <Jahr des letzten Datenbezugs> — GeoNutzV, Daten verändert
350
+ ```
351
+
352
+ ### BKG — administrative units · dl-de/by-2-0
353
+
354
+ The Bundesamt für Kartographie und Geodäsie publishes GN250 ("Geographische
355
+ Namen 1:250 000") free of charge under **Datenlizenz Deutschland –
356
+ Namensnennung 2.0**. Openness at the BKG is decided **per product**, so this
357
+ covers that one file and nothing else in their catalogue.
358
+
359
+ The source note is printed on the product's own terms, character for character,
360
+ and must be reproduced with the year of the last download filled in — plus a
361
+ note that the data was changed, which dl-de/by-2-0 § 3 requires and which we owe
362
+ twice over, because we keep a fraction of the rows and reproject every point:
363
+
364
+ ```
365
+ Verwaltungseinheiten: © BKG (Jahr des letzten Datenbezugs) dl-de/by-2-0, Datenquellen: https://sgx.geodatenzentrum.de/web_public/gdz/datenquellen/datenquellen_gn250.pdf (Daten verändert)
366
+ ```
367
+
368
+ Licence: <https://www.govdata.de/dl-de/by-2-0> ·
369
+ product: <https://gdz.bkg.bund.de>
370
+
371
+ ### GeoNames — place gazetteer · CC BY 4.0
372
+
373
+ ```
374
+ Ortsdaten: © GeoNames (CC BY 4.0), bearbeitet
375
+ ```
376
+
377
+ *"This work is licensed under a Creative Commons Attribution 4.0 License"* —
378
+ the project's own statement, checked 2026-09-21. Places and administrative
379
+ units, with multilingual alternate names; **no streets and no house numbers**,
380
+ so it can never answer an address question.
381
+
382
+ This is what turns "Munich" or "Kreis Fulda" into the coordinates the other
383
+ sources are queried with, which is why the line turns up under answers that are
384
+ otherwise about weather, fuel or charging: the place came from here.
385
+
386
+ Licence: <https://www.geonames.org>
387
+
388
+ ### Police traffic events · Datenlizenz Deutschland – Zero – 2.0
389
+
390
+ ```
391
+ Verkehrsmeldungen der Polizei: Landesbetrieb Straßenbau NRW (VIZ.NRW) via Mobilithek, Datenlizenz Deutschland – Zero – Version 2.0
392
+ ```
393
+
394
+ DL-DE/Zero-2.0 attaches **no** condition at all: "Jede Nutzung ist ohne
395
+ Einschränkungen oder Bedingungen zulässig." We name the publisher anyway, for
396
+ the same reason as the CC0 feeds.
397
+
398
+ ### German road rules — our own text
399
+
400
+ ```
401
+ Verkehrsregeln: ViaFrei, eigene Zusammenstellung aus amtlichen Quellen (StVO, StVZO, 35. BImSchV, StVG, EmoG, AFIR); jede Aussage mit Quelle und Prüfdatum — informativ, keine Rechtsberatung
402
+ ```
403
+
404
+ Environmental zones, tolls, equipment duties and charging rules are not a feed —
405
+ they are a compilation we write ourselves from the statutes, EU law, the
406
+ Umweltbundesamt's own lists and the Court of Justice. German statutes are
407
+ amtliche Werke and free of copyright; we summarise rather than reproduce, so no
408
+ provider licence attaches and we claim none. What every statement does carry is
409
+ its official source and the date it was last read, and a statement that lacks
410
+ either fails our build rather than reaching you.
411
+
412
+ It is information, never legal advice.
413
+
414
+ ---
415
+
416
+ ## What we deliberately do not use
417
+
418
+ Leaving a dataset out is as much a part of "we use all legal ways" as using one:
419
+
420
+ - **Two motorway datasets on the national access point** are published as
421
+ "restricted use, free of charge" with **no terms behind the label** — one
422
+ attaches a technical document by a different authority, the other attaches
423
+ nothing. No readable terms means no grant to interpret, so nothing is served
424
+ from them and no attribution line for them exists.
425
+ - **Eight of the nine DB RIS products** publish no licence at all; their terms
426
+ arrive as a contract after screening. They are not used, and the server
427
+ cannot even name them.
428
+ - **The Tankerkönig historical archive** is CC BY-**NC**-SA. Non-commercial is
429
+ incompatible with a commercial service, so it is not in any answer path.
430
+
431
+ ## How this page is kept honest
432
+
433
+ - The attribution lines live **in the server**, not in this document. Every tool
434
+ result carries the one that belongs to the data that answered it, and the
435
+ register at `viafrei://attribution` is generated from the same place. A line
436
+ that existed only in documentation would be a line nobody emits.
437
+ - Every row in our internal register records the licence, the operative sentence,
438
+ the date it was read and who may do what with the data. Rows are re-verified
439
+ **quarterly** and whenever a provider announces a change.
440
+ - The dates in this page are the dates the relevant page was read, not the dates
441
+ it was written.
442
+ - **The statuses are measured, not declared.** Each one was checked on
443
+ 2026-09-21 by asking the public endpoint a question and reading which source
444
+ the answer named. That is why four rows say a source does not answer today
445
+ where the register says the licence is cleared: cleared is not live, and a
446
+ page that blurred the two would be the one thing this page exists not to be.
447
+ - Where a source's terms are unknown or unreadable, this page says so instead of
448
+ rounding it up to "open data" — the motorway interface above is named on every
449
+ answer for exactly that reason, and the datasets in the section before this
450
+ one are left alone entirely.
451
+
452
+ Found something wrong here — a licence that changed, a line that is no longer
453
+ what the provider asks for? Open an issue. Getting this right matters more to us
454
+ than getting it quickly.
@@ -0,0 +1,23 @@
1
+ import { type ExitCode, type Options } from './config.js';
2
+ export interface BridgeHooks {
3
+ /** One line, no newline, for the human watching stderr. */
4
+ warn: (line: string) => void;
5
+ /** Called once when the bridge cannot continue. Never called twice. */
6
+ fatal: (line: string, exitCode: ExitCode) => void;
7
+ }
8
+ export interface BridgeHandle {
9
+ close: () => Promise<void>;
10
+ }
11
+ /**
12
+ * Relay every JSON-RPC message between a local stdio client and a remote
13
+ * Streamable-HTTP MCP endpoint, in both directions, unchanged.
14
+ *
15
+ * The bridge is deliberately a *message* relay and not a client/server pair
16
+ * that re-implements the protocol: it never has an opinion about a method it
17
+ * has not heard of, so a tool added on the server works here the same day
18
+ * without a release. The only messages it looks inside are `initialize` and its
19
+ * answer - because the session's protocol version has to end up on the HTTP
20
+ * headers, and because a version the server cannot speak deserves a sentence
21
+ * rather than a stack trace.
22
+ */
23
+ export declare function startBridge(options: Options, hooks: BridgeHooks): Promise<BridgeHandle>;