ris-mcp-ts 1.0.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 +490 -0
- package/dist/client.d.ts +109 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +371 -0
- package/dist/client.js.map +1 -0
- package/dist/constants.d.ts +67 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +168 -0
- package/dist/constants.js.map +1 -0
- package/dist/formatting.d.ts +70 -0
- package/dist/formatting.d.ts.map +1 -0
- package/dist/formatting.js +366 -0
- package/dist/formatting.js.map +1 -0
- package/dist/helpers.d.ts +46 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.js +92 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/parser.d.ts +48 -0
- package/dist/parser.d.ts.map +1 -0
- package/dist/parser.js +240 -0
- package/dist/parser.js.map +1 -0
- package/dist/server.d.ts +11 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +16 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/bezirke.d.ts +6 -0
- package/dist/tools/bezirke.d.ts.map +1 -0
- package/dist/tools/bezirke.js +68 -0
- package/dist/tools/bezirke.js.map +1 -0
- package/dist/tools/bundesgesetzblatt.d.ts +6 -0
- package/dist/tools/bundesgesetzblatt.d.ts.map +1 -0
- package/dist/tools/bundesgesetzblatt.js +55 -0
- package/dist/tools/bundesgesetzblatt.js.map +1 -0
- package/dist/tools/bundesrecht.d.ts +6 -0
- package/dist/tools/bundesrecht.d.ts.map +1 -0
- package/dist/tools/bundesrecht.js +63 -0
- package/dist/tools/bundesrecht.js.map +1 -0
- package/dist/tools/dokument.d.ts +6 -0
- package/dist/tools/dokument.d.ts.map +1 -0
- package/dist/tools/dokument.js +244 -0
- package/dist/tools/dokument.js.map +1 -0
- package/dist/tools/gemeinden.d.ts +6 -0
- package/dist/tools/gemeinden.d.ts.map +1 -0
- package/dist/tools/gemeinden.js +125 -0
- package/dist/tools/gemeinden.js.map +1 -0
- package/dist/tools/history.d.ts +6 -0
- package/dist/tools/history.d.ts.map +1 -0
- package/dist/tools/history.js +65 -0
- package/dist/tools/history.js.map +1 -0
- package/dist/tools/index.d.ts +12 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +36 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/judikatur.d.ts +6 -0
- package/dist/tools/judikatur.d.ts.map +1 -0
- package/dist/tools/judikatur.js +46 -0
- package/dist/tools/judikatur.js.map +1 -0
- package/dist/tools/landesgesetzblatt.d.ts +6 -0
- package/dist/tools/landesgesetzblatt.d.ts.map +1 -0
- package/dist/tools/landesgesetzblatt.js +60 -0
- package/dist/tools/landesgesetzblatt.js.map +1 -0
- package/dist/tools/landesrecht.d.ts +6 -0
- package/dist/tools/landesrecht.d.ts.map +1 -0
- package/dist/tools/landesrecht.js +51 -0
- package/dist/tools/landesrecht.js.map +1 -0
- package/dist/tools/regierungsvorlagen.d.ts +6 -0
- package/dist/tools/regierungsvorlagen.d.ts.map +1 -0
- package/dist/tools/regierungsvorlagen.js +97 -0
- package/dist/tools/regierungsvorlagen.js.map +1 -0
- package/dist/tools/sonstige.d.ts +6 -0
- package/dist/tools/sonstige.d.ts.map +1 -0
- package/dist/tools/sonstige.js +271 -0
- package/dist/tools/sonstige.js.map +1 -0
- package/dist/tools/verordnungen.d.ts +6 -0
- package/dist/tools/verordnungen.d.ts.map +1 -0
- package/dist/tools/verordnungen.js +68 -0
- package/dist/tools/verordnungen.js.map +1 -0
- package/dist/types.d.ts +471 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +151 -0
- package/dist/types.js.map +1 -0
- package/package.json +87 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 philrox
|
|
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,490 @@
|
|
|
1
|
+
# RIS MCP Server
|
|
2
|
+
|
|
3
|
+
[](https://github.com/philrox/ris-mcp-ts/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/ris-mcp-ts)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://nodejs.org/)
|
|
7
|
+
[](https://modelcontextprotocol.io/)
|
|
8
|
+
|
|
9
|
+
An [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server that gives AI assistants access to Austria's official legal database — the **Rechtsinformationssystem (RIS)**.
|
|
10
|
+
|
|
11
|
+
Ask your AI assistant about Austrian law, and it will search and retrieve legal documents directly from the official government API. No API key required.
|
|
12
|
+
|
|
13
|
+
## What You Can Do
|
|
14
|
+
|
|
15
|
+
Once connected, you can ask your AI assistant things like:
|
|
16
|
+
|
|
17
|
+
> "What does Austrian law say about tenancy rights?"
|
|
18
|
+
|
|
19
|
+
> "Find Constitutional Court decisions on freedom of expression."
|
|
20
|
+
|
|
21
|
+
> "Show me §1295 of the ABGB (Austrian Civil Code)."
|
|
22
|
+
|
|
23
|
+
> "What laws about climate protection were published in 2024?"
|
|
24
|
+
|
|
25
|
+
> "Look up the building code for the province of Salzburg."
|
|
26
|
+
|
|
27
|
+
> "Get the full text of document NOR40052761."
|
|
28
|
+
|
|
29
|
+
The server translates these natural language requests into structured API calls against the [RIS Open Government Data API](https://data.bka.gv.at/ris/api/v2.6/).
|
|
30
|
+
|
|
31
|
+
## Features
|
|
32
|
+
|
|
33
|
+
- **12 specialized tools** covering all major RIS collections
|
|
34
|
+
- **Federal law** (ABGB, StGB, UGB, ...) and **state law** for all 9 provinces
|
|
35
|
+
- **Court decisions** from 11 court types (Supreme Court, Constitutional Court, Administrative Court, ...)
|
|
36
|
+
- **Law gazettes** — Federal (BGBl) and state (LGBl)
|
|
37
|
+
- **Government bills**, ministerial decrees, cabinet protocols
|
|
38
|
+
- **Full document retrieval** with smart prefix-based routing
|
|
39
|
+
- **Change history tracking** across 30 application types
|
|
40
|
+
- **Markdown and JSON** output formats
|
|
41
|
+
- **Free and open** — uses Austria's Open Government Data API, no API key needed
|
|
42
|
+
|
|
43
|
+
## Quick Start
|
|
44
|
+
|
|
45
|
+
Run directly without installation:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npx ris-mcp-ts
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Or install globally:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm install -g ris-mcp-ts
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Configuration
|
|
58
|
+
|
|
59
|
+
### Claude Desktop
|
|
60
|
+
|
|
61
|
+
Add to your Claude Desktop config:
|
|
62
|
+
|
|
63
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
64
|
+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"mcpServers": {
|
|
69
|
+
"ris": {
|
|
70
|
+
"command": "npx",
|
|
71
|
+
"args": ["-y", "ris-mcp-ts"]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Claude Code
|
|
78
|
+
|
|
79
|
+
Add to your project or user settings:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
claude mcp add ris -- npx -y ris-mcp-ts
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### VS Code (Copilot)
|
|
86
|
+
|
|
87
|
+
Add to `.vscode/mcp.json` in your project:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"servers": {
|
|
92
|
+
"ris": {
|
|
93
|
+
"command": "npx",
|
|
94
|
+
"args": ["-y", "ris-mcp-ts"]
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Other MCP Clients
|
|
101
|
+
|
|
102
|
+
Any MCP-compatible client can connect via stdio transport:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
npx ris-mcp-ts
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Available Tools
|
|
109
|
+
|
|
110
|
+
| Tool | Description |
|
|
111
|
+
|------|-------------|
|
|
112
|
+
| `ris_bundesrecht` | Search federal laws (ABGB, StGB, UGB, etc.) |
|
|
113
|
+
| `ris_landesrecht` | Search state/provincial laws (all 9 provinces) |
|
|
114
|
+
| `ris_judikatur` | Search court decisions (11 court types) |
|
|
115
|
+
| `ris_bundesgesetzblatt` | Search Federal Law Gazettes (BGBl I/II/III) |
|
|
116
|
+
| `ris_landesgesetzblatt` | Search State Law Gazettes (LGBl) |
|
|
117
|
+
| `ris_regierungsvorlagen` | Search government bills |
|
|
118
|
+
| `ris_dokument` | Retrieve full document text by ID or URL |
|
|
119
|
+
| `ris_bezirke` | Search district authority announcements |
|
|
120
|
+
| `ris_gemeinden` | Search municipal law and regulations |
|
|
121
|
+
| `ris_sonstige` | Search miscellaneous collections (8 sub-apps) |
|
|
122
|
+
| `ris_history` | Track document change history (30 app types) |
|
|
123
|
+
| `ris_verordnungen` | Search state ordinance gazettes |
|
|
124
|
+
|
|
125
|
+
## Tool Reference
|
|
126
|
+
|
|
127
|
+
<details>
|
|
128
|
+
<summary><strong>ris_bundesrecht</strong> — Federal Laws</summary>
|
|
129
|
+
|
|
130
|
+
Search Austrian federal laws such as ABGB, StGB, UGB, and more.
|
|
131
|
+
|
|
132
|
+
**Inputs:**
|
|
133
|
+
|
|
134
|
+
| Parameter | Type | Description |
|
|
135
|
+
|-----------|------|-------------|
|
|
136
|
+
| `suchworte` | string | Full-text search (e.g., "Mietrecht", "Schadenersatz") |
|
|
137
|
+
| `titel` | string | Search in law titles (e.g., "ABGB", "Strafgesetzbuch") |
|
|
138
|
+
| `paragraph` | string | Section number (e.g., "1295" for §1295) |
|
|
139
|
+
| `applikation` | string | "BrKons" (consolidated, default), "Begut" (draft reviews), "Erv" (English version) |
|
|
140
|
+
| `fassung_vom` | string | Date for historical version (YYYY-MM-DD) |
|
|
141
|
+
| `seite` | number | Page number (default: 1) |
|
|
142
|
+
| `limit` | number | Results per page: 10, 20, 50, 100 (default: 20) |
|
|
143
|
+
| `response_format` | string | "markdown" (default) or "json" |
|
|
144
|
+
|
|
145
|
+
All parameters are optional. At least one search parameter (`suchworte`, `titel`, or `paragraph`) should be provided.
|
|
146
|
+
|
|
147
|
+
</details>
|
|
148
|
+
|
|
149
|
+
<details>
|
|
150
|
+
<summary><strong>ris_landesrecht</strong> — State/Provincial Laws</summary>
|
|
151
|
+
|
|
152
|
+
Search state laws of the nine Austrian provinces.
|
|
153
|
+
|
|
154
|
+
**Inputs:**
|
|
155
|
+
|
|
156
|
+
| Parameter | Type | Description |
|
|
157
|
+
|-----------|------|-------------|
|
|
158
|
+
| `suchworte` | string | Full-text search |
|
|
159
|
+
| `titel` | string | Search in law titles |
|
|
160
|
+
| `bundesland` | string | Province: Wien, Niederoesterreich, Oberoesterreich, Salzburg, Tirol, Vorarlberg, Kaernten, Steiermark, Burgenland |
|
|
161
|
+
| `applikation` | string | "LrKons" (consolidated, default) |
|
|
162
|
+
| `seite` | number | Page number |
|
|
163
|
+
| `limit` | number | Results per page |
|
|
164
|
+
| `response_format` | string | "markdown" or "json" |
|
|
165
|
+
|
|
166
|
+
</details>
|
|
167
|
+
|
|
168
|
+
<details>
|
|
169
|
+
<summary><strong>ris_judikatur</strong> — Court Decisions</summary>
|
|
170
|
+
|
|
171
|
+
Search court decisions from Austrian courts.
|
|
172
|
+
|
|
173
|
+
**Inputs:**
|
|
174
|
+
|
|
175
|
+
| Parameter | Type | Description |
|
|
176
|
+
|-----------|------|-------------|
|
|
177
|
+
| `suchworte` | string | Full-text search in decisions |
|
|
178
|
+
| `gericht` | string | Court type (see below) |
|
|
179
|
+
| `norm` | string | Legal norm (e.g., "1319a ABGB") |
|
|
180
|
+
| `geschaeftszahl` | string | Case number (e.g., "5Ob234/20b") |
|
|
181
|
+
| `entscheidungsdatum_von` | string | Decision date from (YYYY-MM-DD) |
|
|
182
|
+
| `entscheidungsdatum_bis` | string | Decision date to (YYYY-MM-DD) |
|
|
183
|
+
| `seite` | number | Page number |
|
|
184
|
+
| `limit` | number | Results per page |
|
|
185
|
+
| `response_format` | string | "markdown" or "json" |
|
|
186
|
+
|
|
187
|
+
**Available courts:**
|
|
188
|
+
|
|
189
|
+
| Value | Court |
|
|
190
|
+
|-------|-------|
|
|
191
|
+
| `Justiz` | Supreme Court (OGH), Higher Regional Courts (OLG), Regional Courts (LG) — default |
|
|
192
|
+
| `Vfgh` | Constitutional Court |
|
|
193
|
+
| `Vwgh` | Supreme Administrative Court |
|
|
194
|
+
| `Bvwg` | Federal Administrative Court |
|
|
195
|
+
| `Lvwg` | Provincial Administrative Courts |
|
|
196
|
+
| `Dsk` | Data Protection Authority |
|
|
197
|
+
| `AsylGH` | Asylum Court (historical) |
|
|
198
|
+
| `Normenliste` | Index of legal norms |
|
|
199
|
+
| `Pvak` | Personnel Representation Supervisory Commission |
|
|
200
|
+
| `Gbk` | Equal Treatment Commission |
|
|
201
|
+
| `Dok` | Disciplinary Commission |
|
|
202
|
+
|
|
203
|
+
</details>
|
|
204
|
+
|
|
205
|
+
<details>
|
|
206
|
+
<summary><strong>ris_bundesgesetzblatt</strong> — Federal Law Gazette</summary>
|
|
207
|
+
|
|
208
|
+
Search the Federal Law Gazette (BGBl) — official publications of federal legislation.
|
|
209
|
+
|
|
210
|
+
**Inputs:**
|
|
211
|
+
|
|
212
|
+
| Parameter | Type | Description |
|
|
213
|
+
|-----------|------|-------------|
|
|
214
|
+
| `bgblnummer` | string | Gazette number (e.g., "120") |
|
|
215
|
+
| `teil` | string | "1" (I = Acts), "2" (II = Regulations), "3" (III = Treaties) |
|
|
216
|
+
| `jahrgang` | string | Year (e.g., "2023") |
|
|
217
|
+
| `suchworte` | string | Full-text search |
|
|
218
|
+
| `titel` | string | Search in titles |
|
|
219
|
+
| `applikation` | string | "BgblAuth" (authentic from 2004, default), "BgblPdf" (PDF), "BgblAlt" (1945–2003) |
|
|
220
|
+
| `seite` | number | Page number |
|
|
221
|
+
| `limit` | number | Results per page |
|
|
222
|
+
| `response_format` | string | "markdown" or "json" |
|
|
223
|
+
|
|
224
|
+
</details>
|
|
225
|
+
|
|
226
|
+
<details>
|
|
227
|
+
<summary><strong>ris_landesgesetzblatt</strong> — State Law Gazette</summary>
|
|
228
|
+
|
|
229
|
+
Search State Law Gazettes (LGBl) — official publications of state legislation.
|
|
230
|
+
|
|
231
|
+
**Inputs:**
|
|
232
|
+
|
|
233
|
+
| Parameter | Type | Description |
|
|
234
|
+
|-----------|------|-------------|
|
|
235
|
+
| `lgblnummer` | string | Gazette number (e.g., "50") |
|
|
236
|
+
| `jahrgang` | string | Year (e.g., "2023") |
|
|
237
|
+
| `bundesland` | string | Province name |
|
|
238
|
+
| `suchworte` | string | Full-text search |
|
|
239
|
+
| `titel` | string | Search in titles |
|
|
240
|
+
| `applikation` | string | "LgblAuth" (authentic, default), "Lgbl" (general), "LgblNO" (Niederoesterreich) |
|
|
241
|
+
| `seite` | number | Page number |
|
|
242
|
+
| `limit` | number | Results per page |
|
|
243
|
+
| `response_format` | string | "markdown" or "json" |
|
|
244
|
+
|
|
245
|
+
</details>
|
|
246
|
+
|
|
247
|
+
<details>
|
|
248
|
+
<summary><strong>ris_regierungsvorlagen</strong> — Government Bills</summary>
|
|
249
|
+
|
|
250
|
+
Search government bills — draft legislation submitted to parliament.
|
|
251
|
+
|
|
252
|
+
**Inputs:**
|
|
253
|
+
|
|
254
|
+
| Parameter | Type | Description |
|
|
255
|
+
|-----------|------|-------------|
|
|
256
|
+
| `suchworte` | string | Full-text search |
|
|
257
|
+
| `titel` | string | Search in titles |
|
|
258
|
+
| `beschlussdatum_von` | string | Approval date from (YYYY-MM-DD) |
|
|
259
|
+
| `beschlussdatum_bis` | string | Approval date to (YYYY-MM-DD) |
|
|
260
|
+
| `einbringende_stelle` | string | Submitting ministry (e.g., BKA, BMF, BMJ, BMK) |
|
|
261
|
+
| `im_ris_seit` | string | Added recently: EinerWoche, ZweiWochen, EinemMonat, DreiMonaten, SechsMonaten, EinemJahr |
|
|
262
|
+
| `sortierung_richtung` | string | Ascending or Descending |
|
|
263
|
+
| `sortierung_spalte` | string | Kurztitel, EinbringendeStelle, Beschlussdatum |
|
|
264
|
+
| `seite` | number | Page number |
|
|
265
|
+
| `limit` | number | Results per page |
|
|
266
|
+
| `response_format` | string | "markdown" or "json" |
|
|
267
|
+
|
|
268
|
+
</details>
|
|
269
|
+
|
|
270
|
+
<details>
|
|
271
|
+
<summary><strong>ris_dokument</strong> — Full Document Retrieval</summary>
|
|
272
|
+
|
|
273
|
+
Retrieve the full text of a legal document by its ID or URL. Uses a dual strategy: direct URL access first, then search API fallback.
|
|
274
|
+
|
|
275
|
+
**Inputs:**
|
|
276
|
+
|
|
277
|
+
| Parameter | Type | Description |
|
|
278
|
+
|-----------|------|-------------|
|
|
279
|
+
| `dokumentnummer` | string | RIS document number (e.g., "NOR40052761") |
|
|
280
|
+
| `url` | string | Direct URL to document content |
|
|
281
|
+
| `response_format` | string | "markdown" (default) or "json" |
|
|
282
|
+
|
|
283
|
+
At least one of `dokumentnummer` or `url` is required. Long documents are truncated to 25,000 characters.
|
|
284
|
+
|
|
285
|
+
**Supported document prefixes:**
|
|
286
|
+
|
|
287
|
+
| Prefix | Type |
|
|
288
|
+
|--------|------|
|
|
289
|
+
| NOR | Federal norms |
|
|
290
|
+
| LBG, LKT, LNO, LOO, LSB, LST, LTI, LVB, LWI | State laws (9 provinces) |
|
|
291
|
+
| JWR, JFR, JWT, BVWG, LVWG, DSB, GBK, PVAK, ASYLGH | Court decisions |
|
|
292
|
+
| BGBLA, BGBL | Federal Law Gazette |
|
|
293
|
+
| REGV | Government bills |
|
|
294
|
+
| BVB | District authorities |
|
|
295
|
+
| VBL | Ordinance gazettes |
|
|
296
|
+
| MRP, ERL | Cabinet protocols, ministerial decrees |
|
|
297
|
+
|
|
298
|
+
</details>
|
|
299
|
+
|
|
300
|
+
<details>
|
|
301
|
+
<summary><strong>ris_bezirke</strong> — District Authority Announcements</summary>
|
|
302
|
+
|
|
303
|
+
Search announcements from district administrative authorities.
|
|
304
|
+
|
|
305
|
+
> **Note:** Only available for: Niederoesterreich, Oberoesterreich, Tirol, Vorarlberg, Burgenland, Steiermark.
|
|
306
|
+
|
|
307
|
+
**Inputs:**
|
|
308
|
+
|
|
309
|
+
| Parameter | Type | Description |
|
|
310
|
+
|-----------|------|-------------|
|
|
311
|
+
| `suchworte` | string | Full-text search |
|
|
312
|
+
| `titel` | string | Search in titles |
|
|
313
|
+
| `bundesland` | string | Province name |
|
|
314
|
+
| `bezirksverwaltungsbehoerde` | string | District authority name |
|
|
315
|
+
| `kundmachungsnummer` | string | Announcement number |
|
|
316
|
+
| `kundmachungsdatum_von` | string | Date from (YYYY-MM-DD) |
|
|
317
|
+
| `kundmachungsdatum_bis` | string | Date to (YYYY-MM-DD) |
|
|
318
|
+
| `im_ris_seit` | string | Added recently: EinerWoche, ZweiWochen, EinemMonat, DreiMonaten, SechsMonaten, EinemJahr |
|
|
319
|
+
| `seite` | number | Page number |
|
|
320
|
+
| `limit` | number | Results per page |
|
|
321
|
+
| `response_format` | string | "markdown" or "json" |
|
|
322
|
+
|
|
323
|
+
</details>
|
|
324
|
+
|
|
325
|
+
<details>
|
|
326
|
+
<summary><strong>ris_gemeinden</strong> — Municipal Law</summary>
|
|
327
|
+
|
|
328
|
+
Search municipal law — local ordinances and regulations.
|
|
329
|
+
|
|
330
|
+
**Inputs:**
|
|
331
|
+
|
|
332
|
+
| Parameter | Type | Description |
|
|
333
|
+
|-----------|------|-------------|
|
|
334
|
+
| `suchworte` | string | Full-text search |
|
|
335
|
+
| `titel` | string | Search in titles |
|
|
336
|
+
| `bundesland` | string | Province name |
|
|
337
|
+
| `gemeinde` | string | Municipality name (e.g., "Graz") |
|
|
338
|
+
| `applikation` | string | "Gr" (municipal law, default) or "GrA" (official gazettes) |
|
|
339
|
+
| `im_ris_seit` | string | Added recently |
|
|
340
|
+
| `seite` | number | Page number |
|
|
341
|
+
| `limit` | number | Results per page |
|
|
342
|
+
| `response_format` | string | "markdown" or "json" |
|
|
343
|
+
|
|
344
|
+
Additional parameters depend on the selected application. See `Gr` (municipal law) and `GrA` (official gazettes) specific parameters in the source code.
|
|
345
|
+
|
|
346
|
+
</details>
|
|
347
|
+
|
|
348
|
+
<details>
|
|
349
|
+
<summary><strong>ris_sonstige</strong> — Miscellaneous Collections</summary>
|
|
350
|
+
|
|
351
|
+
Search miscellaneous legal collections and specialized databases.
|
|
352
|
+
|
|
353
|
+
**Inputs:**
|
|
354
|
+
|
|
355
|
+
| Parameter | Type | Description |
|
|
356
|
+
|-----------|------|-------------|
|
|
357
|
+
| `applikation` | string | **Required.** Collection to search (see below) |
|
|
358
|
+
| `suchworte` | string | Full-text search |
|
|
359
|
+
| `titel` | string | Search in titles |
|
|
360
|
+
| `datum_von` | string | Date from (YYYY-MM-DD) |
|
|
361
|
+
| `datum_bis` | string | Date to (YYYY-MM-DD) |
|
|
362
|
+
| `im_ris_seit` | string | Added recently |
|
|
363
|
+
| `seite` | number | Page number |
|
|
364
|
+
| `limit` | number | Results per page |
|
|
365
|
+
| `response_format` | string | "markdown" or "json" |
|
|
366
|
+
|
|
367
|
+
**Available collections:**
|
|
368
|
+
|
|
369
|
+
| Value | Description |
|
|
370
|
+
|-------|-------------|
|
|
371
|
+
| `Mrp` | Cabinet protocols (Ministerratsprotokolle) |
|
|
372
|
+
| `Erlaesse` | Ministerial decrees |
|
|
373
|
+
| `Upts` | Party transparency reports |
|
|
374
|
+
| `KmGer` | Court announcements |
|
|
375
|
+
| `Avsv` | Social insurance regulations |
|
|
376
|
+
| `Avn` | Veterinary notices |
|
|
377
|
+
| `Spg` | Health structure plans |
|
|
378
|
+
| `PruefGewO` | Trade licensing exams |
|
|
379
|
+
|
|
380
|
+
Each collection has additional specific parameters. See the tool description for details.
|
|
381
|
+
|
|
382
|
+
</details>
|
|
383
|
+
|
|
384
|
+
<details>
|
|
385
|
+
<summary><strong>ris_history</strong> — Document Change History</summary>
|
|
386
|
+
|
|
387
|
+
Track document creation, modification, and deletion across the RIS database.
|
|
388
|
+
|
|
389
|
+
**Inputs:**
|
|
390
|
+
|
|
391
|
+
| Parameter | Type | Description |
|
|
392
|
+
|-----------|------|-------------|
|
|
393
|
+
| `applikation` | string | **Required.** Application type (30 options — see below) |
|
|
394
|
+
| `aenderungen_von` | string | Changes from date (YYYY-MM-DD) |
|
|
395
|
+
| `aenderungen_bis` | string | Changes to date (YYYY-MM-DD) |
|
|
396
|
+
| `include_deleted` | boolean | Include deleted documents (default: false) |
|
|
397
|
+
| `seite` | number | Page number |
|
|
398
|
+
| `limit` | number | Results per page |
|
|
399
|
+
| `response_format` | string | "markdown" or "json" |
|
|
400
|
+
|
|
401
|
+
**Available applications (30):**
|
|
402
|
+
|
|
403
|
+
Federal law: `Bundesnormen`, `BgblAuth`, `BgblAlt`, `BgblPdf`, `RegV`
|
|
404
|
+
State law: `Landesnormen`, `LgblAuth`, `Lgbl`, `LgblNO`, `Vbl`, `Gemeinderecht`, `GemeinderechtAuth`
|
|
405
|
+
Case law: `Justiz`, `Vfgh`, `Vwgh`, `Bvwg`, `Lvwg`, `Dsk`, `Gbk`, `Pvak`, `AsylGH`
|
|
406
|
+
Other: `Bvb`, `Mrp`, `Erlaesse`, `PruefGewO`, `Avsv`, `Spg`, `KmGer`, `Dok`, `Normenliste`
|
|
407
|
+
|
|
408
|
+
</details>
|
|
409
|
+
|
|
410
|
+
<details>
|
|
411
|
+
<summary><strong>ris_verordnungen</strong> — State Ordinance Gazettes</summary>
|
|
412
|
+
|
|
413
|
+
Search state ordinance gazettes (Verordnungsblätter).
|
|
414
|
+
|
|
415
|
+
> **Note:** Currently only data from **Tirol** is available (since January 2022).
|
|
416
|
+
|
|
417
|
+
**Inputs:**
|
|
418
|
+
|
|
419
|
+
| Parameter | Type | Description |
|
|
420
|
+
|-----------|------|-------------|
|
|
421
|
+
| `suchworte` | string | Full-text search |
|
|
422
|
+
| `titel` | string | Search in titles |
|
|
423
|
+
| `bundesland` | string | Province name |
|
|
424
|
+
| `kundmachungsnummer` | string | Announcement number |
|
|
425
|
+
| `kundmachungsdatum_von` | string | Date from (YYYY-MM-DD) |
|
|
426
|
+
| `kundmachungsdatum_bis` | string | Date to (YYYY-MM-DD) |
|
|
427
|
+
| `seite` | number | Page number |
|
|
428
|
+
| `limit` | number | Results per page |
|
|
429
|
+
| `response_format` | string | "markdown" or "json" |
|
|
430
|
+
|
|
431
|
+
</details>
|
|
432
|
+
|
|
433
|
+
## Development
|
|
434
|
+
|
|
435
|
+
### Prerequisites
|
|
436
|
+
|
|
437
|
+
- Node.js >= 20.0.0
|
|
438
|
+
|
|
439
|
+
### Setup
|
|
440
|
+
|
|
441
|
+
```bash
|
|
442
|
+
git clone https://github.com/philrox/ris-mcp-ts.git
|
|
443
|
+
cd ris-mcp-ts
|
|
444
|
+
npm install
|
|
445
|
+
npm run build
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
### Scripts
|
|
449
|
+
|
|
450
|
+
| Script | Description |
|
|
451
|
+
|--------|-------------|
|
|
452
|
+
| `npm run dev` | Start with hot reload (tsx) |
|
|
453
|
+
| `npm run build` | Compile TypeScript |
|
|
454
|
+
| `npm start` | Run compiled version |
|
|
455
|
+
| `npm test` | Run all tests |
|
|
456
|
+
| `npm run check` | Typecheck + lint + format check + tests |
|
|
457
|
+
| `npm run inspect` | Launch MCP Inspector for manual testing |
|
|
458
|
+
|
|
459
|
+
### Project Structure
|
|
460
|
+
|
|
461
|
+
```
|
|
462
|
+
src/
|
|
463
|
+
├── index.ts # Entry point (stdio transport)
|
|
464
|
+
├── server.ts # MCP server setup, delegates to tools/
|
|
465
|
+
├── client.ts # HTTP client for RIS API
|
|
466
|
+
├── types.ts # Zod schemas + TypeScript types
|
|
467
|
+
├── parser.ts # JSON parsing and response normalization
|
|
468
|
+
├── formatting.ts # Output formatting (markdown/json)
|
|
469
|
+
├── helpers.ts # Shared helper functions
|
|
470
|
+
├── constants.ts # Static mappings and configuration
|
|
471
|
+
├── tools/ # One file per tool handler
|
|
472
|
+
│ ├── index.ts
|
|
473
|
+
│ ├── bundesrecht.ts
|
|
474
|
+
│ ├── landesrecht.ts
|
|
475
|
+
│ ├── judikatur.ts
|
|
476
|
+
│ └── ...
|
|
477
|
+
└── __tests__/ # Unit and integration tests
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
## Contributing
|
|
481
|
+
|
|
482
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
483
|
+
|
|
484
|
+
## License
|
|
485
|
+
|
|
486
|
+
[MIT](LICENSE)
|
|
487
|
+
|
|
488
|
+
---
|
|
489
|
+
|
|
490
|
+
Built on the [Open Government Data API](https://data.bka.gv.at/ris/api/v2.6/) provided by the Austrian Federal Chancellery (Bundeskanzleramt).
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP client for the Austrian RIS (Rechtsinformationssystem) API v2.6.
|
|
3
|
+
*
|
|
4
|
+
* This module provides a client for querying the Austrian legal information
|
|
5
|
+
* system API, which includes federal law, state law, case law, and other legal
|
|
6
|
+
* documents.
|
|
7
|
+
*
|
|
8
|
+
* API Documentation: https://data.bka.gv.at/ris/api/v2.6/
|
|
9
|
+
*/
|
|
10
|
+
import type { NormalizedSearchResults } from './types.js';
|
|
11
|
+
/**
|
|
12
|
+
* Base exception for RIS API errors.
|
|
13
|
+
*/
|
|
14
|
+
export declare class RISAPIError extends Error {
|
|
15
|
+
readonly statusCode?: number;
|
|
16
|
+
constructor(message: string, statusCode?: number);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Raised when a request to the RIS API times out.
|
|
20
|
+
*/
|
|
21
|
+
export declare class RISTimeoutError extends RISAPIError {
|
|
22
|
+
constructor(message?: string);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Raised when JSON parsing fails.
|
|
26
|
+
*/
|
|
27
|
+
export declare class RISParsingError extends RISAPIError {
|
|
28
|
+
readonly originalError?: Error;
|
|
29
|
+
constructor(message: string, originalError?: Error);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Validate that a URL points to an allowed RIS domain (HTTPS only).
|
|
33
|
+
*/
|
|
34
|
+
export declare function isAllowedUrl(url: string): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Search federal law (Bundesrecht).
|
|
37
|
+
*/
|
|
38
|
+
export declare function searchBundesrecht(params: Record<string, unknown>, timeout?: number): Promise<NormalizedSearchResults>;
|
|
39
|
+
/**
|
|
40
|
+
* Search state/provincial law (Landesrecht).
|
|
41
|
+
*/
|
|
42
|
+
export declare function searchLandesrecht(params: Record<string, unknown>, timeout?: number): Promise<NormalizedSearchResults>;
|
|
43
|
+
/**
|
|
44
|
+
* Search case law/jurisprudence (Judikatur).
|
|
45
|
+
*/
|
|
46
|
+
export declare function searchJudikatur(params: Record<string, unknown>, timeout?: number): Promise<NormalizedSearchResults>;
|
|
47
|
+
/**
|
|
48
|
+
* Search district administrative authorities (Bezirke).
|
|
49
|
+
*/
|
|
50
|
+
export declare function searchBezirke(params: Record<string, unknown>, timeout?: number): Promise<NormalizedSearchResults>;
|
|
51
|
+
/**
|
|
52
|
+
* Search municipal law (Gemeinden).
|
|
53
|
+
*/
|
|
54
|
+
export declare function searchGemeinden(params: Record<string, unknown>, timeout?: number): Promise<NormalizedSearchResults>;
|
|
55
|
+
/**
|
|
56
|
+
* Search miscellaneous legal collections (Sonstige).
|
|
57
|
+
*/
|
|
58
|
+
export declare function searchSonstige(params: Record<string, unknown>, timeout?: number): Promise<NormalizedSearchResults>;
|
|
59
|
+
/**
|
|
60
|
+
* Search document change history (History).
|
|
61
|
+
*/
|
|
62
|
+
export declare function searchHistory(params: Record<string, unknown>, timeout?: number): Promise<NormalizedSearchResults>;
|
|
63
|
+
/**
|
|
64
|
+
* Fetch HTML content from a document URL.
|
|
65
|
+
*/
|
|
66
|
+
export declare function getDocumentContent(url: string, timeout?: number): Promise<string>;
|
|
67
|
+
/**
|
|
68
|
+
* Validate dokumentnummer contains only safe characters.
|
|
69
|
+
* Defense-in-depth check in addition to Zod schema.
|
|
70
|
+
*
|
|
71
|
+
* Valid dokumentnummern:
|
|
72
|
+
* - Start with uppercase letter
|
|
73
|
+
* - Contain only uppercase letters, digits, and underscores
|
|
74
|
+
* - Length between 5 and 50 characters
|
|
75
|
+
*
|
|
76
|
+
* Examples: NOR40052761, BVWG_W123_2000000_1_00
|
|
77
|
+
*/
|
|
78
|
+
export declare function isValidDokumentnummer(dokumentnummer: string): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Construct a direct document URL based on the Dokumentnummer prefix.
|
|
81
|
+
*
|
|
82
|
+
* @param dokumentnummer - The RIS document number (e.g., "NOR12019037")
|
|
83
|
+
* @returns The constructed URL or null if prefix is unknown or dokumentnummer is invalid
|
|
84
|
+
*/
|
|
85
|
+
export declare function constructDocumentUrl(dokumentnummer: string): string | null;
|
|
86
|
+
/**
|
|
87
|
+
* Result type for direct document fetch.
|
|
88
|
+
*/
|
|
89
|
+
export type DirectDocumentResult = {
|
|
90
|
+
success: true;
|
|
91
|
+
html: string;
|
|
92
|
+
url: string;
|
|
93
|
+
} | {
|
|
94
|
+
success: false;
|
|
95
|
+
error: string;
|
|
96
|
+
statusCode?: number;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Attempt to fetch a document directly by its Dokumentnummer using URL construction.
|
|
100
|
+
*
|
|
101
|
+
* This bypasses the search API and fetches the document directly if the
|
|
102
|
+
* Dokumentnummer prefix is known.
|
|
103
|
+
*
|
|
104
|
+
* @param dokumentnummer - The RIS document number (e.g., "NOR12019037")
|
|
105
|
+
* @param timeout - Request timeout in milliseconds
|
|
106
|
+
* @returns Result object with HTML content on success, or error details on failure
|
|
107
|
+
*/
|
|
108
|
+
export declare function getDocumentByNumber(dokumentnummer: string, timeout?: number): Promise<DirectDocumentResult>;
|
|
109
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,uBAAuB,EAIxB,MAAM,YAAY,CAAC;AAMpB;;GAEG;AACH,qBAAa,WAAY,SAAQ,KAAK;IACpC,SAAgB,UAAU,CAAC,EAAE,MAAM,CAAC;gBAExB,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;CAKjD;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,WAAW;gBAClC,OAAO,SAAiC;CAIrD;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,WAAW;IAC9C,SAAgB,aAAa,CAAC,EAAE,KAAK,CAAC;gBAE1B,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,KAAK;CAKnD;AAcD;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAOjD;AA6HD;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,SAAkB,GACxB,OAAO,CAAC,uBAAuB,CAAC,CAElC;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,SAAkB,GACxB,OAAO,CAAC,uBAAuB,CAAC,CAElC;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,SAAkB,GACxB,OAAO,CAAC,uBAAuB,CAAC,CAElC;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,SAAkB,GACxB,OAAO,CAAC,uBAAuB,CAAC,CAElC;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,SAAkB,GACxB,OAAO,CAAC,uBAAuB,CAAC,CAElC;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,SAAkB,GACxB,OAAO,CAAC,uBAAuB,CAAC,CAElC;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,SAAkB,GACxB,OAAO,CAAC,uBAAuB,CAAC,CAElC;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,SAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAqChG;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAOrE;AAyDD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAiB1E;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAC5B;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC5C;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3D;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,cAAc,EAAE,MAAM,EACtB,OAAO,SAAkB,GACxB,OAAO,CAAC,oBAAoB,CAAC,CAkC/B"}
|