@thelord/mcp-arr 1.0.0 → 1.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/README.md +70 -15
- package/dist/bazarr-client.d.ts +212 -0
- package/dist/bazarr-client.d.ts.map +1 -0
- package/dist/bazarr-client.js +155 -0
- package/dist/bazarr-client.js.map +1 -0
- package/dist/bazarr-handlers.d.ts +8 -0
- package/dist/bazarr-handlers.d.ts.map +1 -0
- package/dist/bazarr-handlers.js +355 -0
- package/dist/bazarr-handlers.js.map +1 -0
- package/dist/bazarr-tools.d.ts +8 -0
- package/dist/bazarr-tools.d.ts.map +1 -0
- package/dist/bazarr-tools.js +359 -0
- package/dist/bazarr-tools.js.map +1 -0
- package/dist/index.js +31 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bazarr MCP Tool Definitions
|
|
3
|
+
*
|
|
4
|
+
* Defines all the MCP tools available for Bazarr subtitle management.
|
|
5
|
+
*/
|
|
6
|
+
export const bazarrTools = [
|
|
7
|
+
// Status & System
|
|
8
|
+
{
|
|
9
|
+
name: "bazarr_get_status",
|
|
10
|
+
description: "Get Bazarr system status including version info, connected services (Sonarr/Radarr), and system details",
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: "object",
|
|
13
|
+
properties: {},
|
|
14
|
+
required: [],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "bazarr_get_badges",
|
|
19
|
+
description: "Get Bazarr badge counts showing missing subtitles for episodes and movies, and connection status",
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: "object",
|
|
22
|
+
properties: {},
|
|
23
|
+
required: [],
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "bazarr_get_health",
|
|
28
|
+
description: "Get Bazarr health check results showing any issues or warnings",
|
|
29
|
+
inputSchema: {
|
|
30
|
+
type: "object",
|
|
31
|
+
properties: {},
|
|
32
|
+
required: [],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "bazarr_get_languages",
|
|
37
|
+
description: "Get list of available languages in Bazarr, optionally filtered to only enabled languages",
|
|
38
|
+
inputSchema: {
|
|
39
|
+
type: "object",
|
|
40
|
+
properties: {
|
|
41
|
+
enabledOnly: {
|
|
42
|
+
type: "boolean",
|
|
43
|
+
description: "If true, only return enabled languages (default: true)",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
required: [],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "bazarr_get_tasks",
|
|
51
|
+
description: "Get list of scheduled tasks in Bazarr with their status and next run time",
|
|
52
|
+
inputSchema: {
|
|
53
|
+
type: "object",
|
|
54
|
+
properties: {},
|
|
55
|
+
required: [],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "bazarr_run_task",
|
|
60
|
+
description: "Manually trigger a scheduled task in Bazarr",
|
|
61
|
+
inputSchema: {
|
|
62
|
+
type: "object",
|
|
63
|
+
properties: {
|
|
64
|
+
taskId: {
|
|
65
|
+
type: "string",
|
|
66
|
+
description: "The task ID to run (e.g., 'update_series', 'wanted_search_missing_subtitles_series')",
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
required: ["taskId"],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
// Series (TV Shows)
|
|
73
|
+
{
|
|
74
|
+
name: "bazarr_get_series",
|
|
75
|
+
description: "Get list of TV series in Bazarr with their subtitle status and missing counts",
|
|
76
|
+
inputSchema: {
|
|
77
|
+
type: "object",
|
|
78
|
+
properties: {},
|
|
79
|
+
required: [],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: "bazarr_get_series_details",
|
|
84
|
+
description: "Get detailed information about a specific TV series including episodes",
|
|
85
|
+
inputSchema: {
|
|
86
|
+
type: "object",
|
|
87
|
+
properties: {
|
|
88
|
+
seriesId: {
|
|
89
|
+
type: "number",
|
|
90
|
+
description: "The Sonarr series ID",
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
required: ["seriesId"],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "bazarr_get_episodes",
|
|
98
|
+
description: "Get episodes for a TV series with their subtitle status",
|
|
99
|
+
inputSchema: {
|
|
100
|
+
type: "object",
|
|
101
|
+
properties: {
|
|
102
|
+
seriesId: {
|
|
103
|
+
type: "number",
|
|
104
|
+
description: "The Sonarr series ID",
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
required: ["seriesId"],
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "bazarr_get_wanted_episodes",
|
|
112
|
+
description: "Get list of episodes with missing subtitles (wanted list)",
|
|
113
|
+
inputSchema: {
|
|
114
|
+
type: "object",
|
|
115
|
+
properties: {
|
|
116
|
+
page: {
|
|
117
|
+
type: "number",
|
|
118
|
+
description: "Page number (default: 1)",
|
|
119
|
+
},
|
|
120
|
+
pageSize: {
|
|
121
|
+
type: "number",
|
|
122
|
+
description: "Number of results per page (default: 50)",
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
required: [],
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: "bazarr_search_episode_subtitles",
|
|
130
|
+
description: "Search for available subtitles for a specific episode",
|
|
131
|
+
inputSchema: {
|
|
132
|
+
type: "object",
|
|
133
|
+
properties: {
|
|
134
|
+
episodeId: {
|
|
135
|
+
type: "number",
|
|
136
|
+
description: "The Sonarr episode ID",
|
|
137
|
+
},
|
|
138
|
+
language: {
|
|
139
|
+
type: "string",
|
|
140
|
+
description: "Language code (e.g., 'en', 'es', 'pt')",
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
required: ["episodeId", "language"],
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "bazarr_download_episode_subtitle",
|
|
148
|
+
description: "Download a specific subtitle for an episode",
|
|
149
|
+
inputSchema: {
|
|
150
|
+
type: "object",
|
|
151
|
+
properties: {
|
|
152
|
+
episodeId: {
|
|
153
|
+
type: "number",
|
|
154
|
+
description: "The Sonarr episode ID",
|
|
155
|
+
},
|
|
156
|
+
provider: {
|
|
157
|
+
type: "string",
|
|
158
|
+
description: "The subtitle provider name",
|
|
159
|
+
},
|
|
160
|
+
subtitle: {
|
|
161
|
+
type: "string",
|
|
162
|
+
description: "The subtitle identifier from search results",
|
|
163
|
+
},
|
|
164
|
+
language: {
|
|
165
|
+
type: "string",
|
|
166
|
+
description: "Language code (e.g., 'en', 'es')",
|
|
167
|
+
},
|
|
168
|
+
forced: {
|
|
169
|
+
type: "boolean",
|
|
170
|
+
description: "Download as forced subtitle (default: false)",
|
|
171
|
+
},
|
|
172
|
+
hi: {
|
|
173
|
+
type: "boolean",
|
|
174
|
+
description: "Download hearing impaired version (default: false)",
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
required: ["episodeId", "provider", "subtitle", "language"],
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: "bazarr_search_missing_episode_subtitles",
|
|
182
|
+
description: "Trigger a search for missing subtitles for episodes. Can search all or a specific series.",
|
|
183
|
+
inputSchema: {
|
|
184
|
+
type: "object",
|
|
185
|
+
properties: {
|
|
186
|
+
seriesId: {
|
|
187
|
+
type: "number",
|
|
188
|
+
description: "Optional: Sonarr series ID to limit search to specific series",
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
required: [],
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
// Movies
|
|
195
|
+
{
|
|
196
|
+
name: "bazarr_get_movies",
|
|
197
|
+
description: "Get list of movies in Bazarr with their subtitle status",
|
|
198
|
+
inputSchema: {
|
|
199
|
+
type: "object",
|
|
200
|
+
properties: {},
|
|
201
|
+
required: [],
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "bazarr_get_movie_details",
|
|
206
|
+
description: "Get detailed information about a specific movie",
|
|
207
|
+
inputSchema: {
|
|
208
|
+
type: "object",
|
|
209
|
+
properties: {
|
|
210
|
+
movieId: {
|
|
211
|
+
type: "number",
|
|
212
|
+
description: "The Radarr movie ID",
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
required: ["movieId"],
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
name: "bazarr_get_wanted_movies",
|
|
220
|
+
description: "Get list of movies with missing subtitles (wanted list)",
|
|
221
|
+
inputSchema: {
|
|
222
|
+
type: "object",
|
|
223
|
+
properties: {
|
|
224
|
+
page: {
|
|
225
|
+
type: "number",
|
|
226
|
+
description: "Page number (default: 1)",
|
|
227
|
+
},
|
|
228
|
+
pageSize: {
|
|
229
|
+
type: "number",
|
|
230
|
+
description: "Number of results per page (default: 50)",
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
required: [],
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: "bazarr_search_movie_subtitles",
|
|
238
|
+
description: "Search for available subtitles for a specific movie",
|
|
239
|
+
inputSchema: {
|
|
240
|
+
type: "object",
|
|
241
|
+
properties: {
|
|
242
|
+
movieId: {
|
|
243
|
+
type: "number",
|
|
244
|
+
description: "The Radarr movie ID",
|
|
245
|
+
},
|
|
246
|
+
language: {
|
|
247
|
+
type: "string",
|
|
248
|
+
description: "Language code (e.g., 'en', 'es', 'pt')",
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
required: ["movieId", "language"],
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
name: "bazarr_download_movie_subtitle",
|
|
256
|
+
description: "Download a specific subtitle for a movie",
|
|
257
|
+
inputSchema: {
|
|
258
|
+
type: "object",
|
|
259
|
+
properties: {
|
|
260
|
+
movieId: {
|
|
261
|
+
type: "number",
|
|
262
|
+
description: "The Radarr movie ID",
|
|
263
|
+
},
|
|
264
|
+
provider: {
|
|
265
|
+
type: "string",
|
|
266
|
+
description: "The subtitle provider name",
|
|
267
|
+
},
|
|
268
|
+
subtitle: {
|
|
269
|
+
type: "string",
|
|
270
|
+
description: "The subtitle identifier from search results",
|
|
271
|
+
},
|
|
272
|
+
language: {
|
|
273
|
+
type: "string",
|
|
274
|
+
description: "Language code (e.g., 'en', 'es')",
|
|
275
|
+
},
|
|
276
|
+
forced: {
|
|
277
|
+
type: "boolean",
|
|
278
|
+
description: "Download as forced subtitle (default: false)",
|
|
279
|
+
},
|
|
280
|
+
hi: {
|
|
281
|
+
type: "boolean",
|
|
282
|
+
description: "Download hearing impaired version (default: false)",
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
required: ["movieId", "provider", "subtitle", "language"],
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
name: "bazarr_search_missing_movie_subtitles",
|
|
290
|
+
description: "Trigger a search for missing subtitles for movies. Can search all or a specific movie.",
|
|
291
|
+
inputSchema: {
|
|
292
|
+
type: "object",
|
|
293
|
+
properties: {
|
|
294
|
+
movieId: {
|
|
295
|
+
type: "number",
|
|
296
|
+
description: "Optional: Radarr movie ID to limit search to specific movie",
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
required: [],
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
// History
|
|
303
|
+
{
|
|
304
|
+
name: "bazarr_get_series_history",
|
|
305
|
+
description: "Get subtitle download history for TV series",
|
|
306
|
+
inputSchema: {
|
|
307
|
+
type: "object",
|
|
308
|
+
properties: {
|
|
309
|
+
page: {
|
|
310
|
+
type: "number",
|
|
311
|
+
description: "Page number (default: 1)",
|
|
312
|
+
},
|
|
313
|
+
pageSize: {
|
|
314
|
+
type: "number",
|
|
315
|
+
description: "Number of results per page (default: 50)",
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
required: [],
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
name: "bazarr_get_movie_history",
|
|
323
|
+
description: "Get subtitle download history for movies",
|
|
324
|
+
inputSchema: {
|
|
325
|
+
type: "object",
|
|
326
|
+
properties: {
|
|
327
|
+
page: {
|
|
328
|
+
type: "number",
|
|
329
|
+
description: "Page number (default: 1)",
|
|
330
|
+
},
|
|
331
|
+
pageSize: {
|
|
332
|
+
type: "number",
|
|
333
|
+
description: "Number of results per page (default: 50)",
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
required: [],
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
// Sync
|
|
340
|
+
{
|
|
341
|
+
name: "bazarr_sync_series",
|
|
342
|
+
description: "Trigger a sync of TV series from Sonarr",
|
|
343
|
+
inputSchema: {
|
|
344
|
+
type: "object",
|
|
345
|
+
properties: {},
|
|
346
|
+
required: [],
|
|
347
|
+
},
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
name: "bazarr_sync_movies",
|
|
351
|
+
description: "Trigger a sync of movies from Radarr",
|
|
352
|
+
inputSchema: {
|
|
353
|
+
type: "object",
|
|
354
|
+
properties: {},
|
|
355
|
+
required: [],
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
];
|
|
359
|
+
//# sourceMappingURL=bazarr-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bazarr-tools.js","sourceRoot":"","sources":["../src/bazarr-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,CAAC,MAAM,WAAW,GAAW;IACjC,kBAAkB;IAClB;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,yGAAyG;QACtH,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,EAAE;SACb;KACF;I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
20
20
|
import { LingarrClient } from "./lingarr-client.js";
|
|
21
21
|
import { getLingarrTools } from "./lingarr-tools.js";
|
|
22
22
|
import { handleLingarrTool, getLingarrStatus } from "./lingarr-handlers.js";
|
|
23
|
+
import { BazarrClient } from "./bazarr-client.js";
|
|
24
|
+
import { bazarrTools } from "./bazarr-tools.js";
|
|
25
|
+
import { handleBazarrTool } from "./bazarr-handlers.js";
|
|
23
26
|
const services = [
|
|
24
27
|
{ name: 'sonarr', displayName: 'Sonarr (TV)', url: process.env.SONARR_URL, apiKey: process.env.SONARR_API_KEY },
|
|
25
28
|
{ name: 'radarr', displayName: 'Radarr (Movies)', url: process.env.RADARR_URL, apiKey: process.env.RADARR_API_KEY },
|
|
26
29
|
{ name: 'lidarr', displayName: 'Lidarr (Music)', url: process.env.LIDARR_URL, apiKey: process.env.LIDARR_API_KEY },
|
|
27
30
|
{ name: 'readarr', displayName: 'Readarr (Books)', url: process.env.READARR_URL, apiKey: process.env.READARR_API_KEY },
|
|
28
31
|
{ name: 'prowlarr', displayName: 'Prowlarr (Indexers)', url: process.env.PROWLARR_URL, apiKey: process.env.PROWLARR_API_KEY },
|
|
29
|
-
{ name: 'lingarr', displayName: 'Lingarr (
|
|
32
|
+
{ name: 'lingarr', displayName: 'Lingarr (Subtitle Translation)', url: process.env.LINGARR_URL, apiKey: process.env.LINGARR_API_KEY },
|
|
33
|
+
{ name: 'bazarr', displayName: 'Bazarr (Subtitles)', url: process.env.BAZARR_URL, apiKey: process.env.BAZARR_API_KEY },
|
|
30
34
|
];
|
|
31
35
|
// Check which services are configured
|
|
32
36
|
const configuredServices = services.filter(s => s.url && s.apiKey);
|
|
@@ -58,6 +62,9 @@ for (const service of configuredServices) {
|
|
|
58
62
|
case 'lingarr':
|
|
59
63
|
clients.lingarr = new LingarrClient(config);
|
|
60
64
|
break;
|
|
65
|
+
case 'bazarr':
|
|
66
|
+
clients.bazarr = new BazarrClient(config);
|
|
67
|
+
break;
|
|
61
68
|
}
|
|
62
69
|
}
|
|
63
70
|
// Build tools based on configured services
|
|
@@ -509,6 +516,10 @@ if (clients.prowlarr) {
|
|
|
509
516
|
if (clients.lingarr) {
|
|
510
517
|
TOOLS.push(...getLingarrTools());
|
|
511
518
|
}
|
|
519
|
+
// Bazarr tools - imported from separate module
|
|
520
|
+
if (clients.bazarr) {
|
|
521
|
+
TOOLS.push(...bazarrTools);
|
|
522
|
+
}
|
|
512
523
|
// Cross-service search tool
|
|
513
524
|
TOOLS.push({
|
|
514
525
|
name: "arr_search_all",
|
|
@@ -676,6 +687,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
676
687
|
if (lingarrResult) {
|
|
677
688
|
return lingarrResult;
|
|
678
689
|
}
|
|
690
|
+
// Delegate Bazarr tools to separate handler module
|
|
691
|
+
if (name.startsWith('bazarr_') && clients.bazarr) {
|
|
692
|
+
const result = await handleBazarrTool(clients.bazarr, name, (args || {}));
|
|
693
|
+
return {
|
|
694
|
+
content: [{ type: "text", text: result }],
|
|
695
|
+
};
|
|
696
|
+
}
|
|
679
697
|
switch (name) {
|
|
680
698
|
case "arr_status": {
|
|
681
699
|
const statuses = {};
|
|
@@ -685,6 +703,18 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
685
703
|
// Lingarr status handled by separate module
|
|
686
704
|
statuses[service.name] = await getLingarrStatus(clients.lingarr);
|
|
687
705
|
}
|
|
706
|
+
else if (service.name === 'bazarr' && clients.bazarr) {
|
|
707
|
+
// Bazarr has different status format
|
|
708
|
+
const status = await clients.bazarr.getStatus();
|
|
709
|
+
statuses[service.name] = {
|
|
710
|
+
configured: true,
|
|
711
|
+
connected: true,
|
|
712
|
+
version: status.bazarr_version,
|
|
713
|
+
appName: 'Bazarr',
|
|
714
|
+
sonarrVersion: status.sonarr_version || 'Not connected',
|
|
715
|
+
radarrVersion: status.radarr_version || 'Not connected',
|
|
716
|
+
};
|
|
717
|
+
}
|
|
688
718
|
else {
|
|
689
719
|
const client = clients[service.name];
|
|
690
720
|
if (client) {
|