@thelord/mcp-arr 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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jim Christian
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,363 @@
1
+ # MCP *arr Server
2
+
3
+ [![npm version](https://img.shields.io/npm/v/mcp-arr-server.svg)](https://www.npmjs.com/package/mcp-arr-server)
4
+ [![CI](https://github.com/aplaceforallmystuff/mcp-arr/actions/workflows/ci.yml/badge.svg)](https://github.com/aplaceforallmystuff/mcp-arr/actions/workflows/ci.yml)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+ [![MCP](https://img.shields.io/badge/MCP-Compatible-blue)](https://modelcontextprotocol.io)
7
+
8
+ MCP server for the [*arr media management suite](https://wiki.servarr.com/) - Sonarr, Radarr, Lidarr, Readarr, Prowlarr, and [Lingarr](https://github.com/lingarr/lingarr) (subtitle translation).
9
+
10
+ ## Why Use This?
11
+
12
+ - **Unified media management** - Control all your *arr applications from one interface
13
+ - **Natural language queries** - Ask about your library in plain English
14
+ - **Cross-service search** - Find content across TV, movies, music, and books simultaneously
15
+ - **Download monitoring** - Check queue status and progress across all services
16
+ - **Calendar integration** - See upcoming releases for all media types
17
+ - **Configuration review** - Get AI-powered suggestions for optimizing your setup
18
+ - **Flexible configuration** - Enable only the services you use
19
+
20
+ ## Features
21
+
22
+ | Category | Capabilities |
23
+ |----------|-------------|
24
+ | **Sonarr (TV)** | List series, view episodes, search shows, trigger downloads, check queue, view calendar, review setup |
25
+ | **Radarr (Movies)** | List movies, search films, trigger downloads, check queue, view releases, review setup |
26
+ | **Lidarr (Music)** | List artists, view albums, search musicians, trigger downloads, check queue, view calendar, review setup |
27
+ | **Readarr (Books)** | List authors, view books, search writers, trigger downloads, check queue, view calendar, review setup |
28
+ | **Prowlarr (Indexers)** | List indexers, search across all trackers, test health, view statistics |
29
+ | **Lingarr (Subtitles)** | Translate subtitles, view translation queue, manage requests, sync media, view statistics |
30
+ | **Cross-Service** | Status check, unified search across all configured services |
31
+ | **Configuration** | Quality profiles, download clients, naming conventions, health checks, storage info |
32
+ | **TRaSH Guides** | Reference quality profiles, custom formats, naming conventions, compare against recommendations |
33
+
34
+ ## Prerequisites
35
+
36
+ - Node.js 18+
37
+ - At least one *arr application running with API access:
38
+ - [Sonarr](https://sonarr.tv/) for TV series
39
+ - [Radarr](https://radarr.video/) for movies
40
+ - [Lidarr](https://lidarr.audio/) for music
41
+ - [Readarr](https://readarr.com/) for books
42
+ - [Prowlarr](https://prowlarr.com/) for indexer management
43
+ - [Lingarr](https://github.com/lingarr/lingarr) for subtitle translation
44
+
45
+ ## Installation
46
+
47
+ ### Using npm (Recommended)
48
+
49
+ ```bash
50
+ npx mcp-arr-server
51
+ ```
52
+
53
+ ### From Source
54
+
55
+ ```bash
56
+ git clone https://github.com/aplaceforallmystuff/mcp-arr.git
57
+ cd mcp-arr
58
+ npm install
59
+ npm run build
60
+ ```
61
+
62
+ ## Configuration
63
+
64
+ ### Getting API Keys
65
+
66
+ Each *arr application has an API key in Settings > General > Security:
67
+
68
+ 1. Open your *arr application's web interface
69
+ 2. Go to **Settings** > **General**
70
+ 3. Find the **API Key** under the Security section
71
+ 4. Copy the API key for use in configuration
72
+
73
+ ### For Claude Desktop
74
+
75
+ Add to your Claude Desktop config file:
76
+
77
+ **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
78
+ **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
79
+
80
+ ```json
81
+ {
82
+ "mcpServers": {
83
+ "arr": {
84
+ "command": "npx",
85
+ "args": ["-y", "mcp-arr-server"],
86
+ "env": {
87
+ "SONARR_URL": "http://localhost:8989",
88
+ "SONARR_API_KEY": "your-sonarr-api-key",
89
+ "RADARR_URL": "http://localhost:7878",
90
+ "RADARR_API_KEY": "your-radarr-api-key",
91
+ "LIDARR_URL": "http://localhost:8686",
92
+ "LIDARR_API_KEY": "your-lidarr-api-key",
93
+ "READARR_URL": "http://localhost:8787",
94
+ "READARR_API_KEY": "your-readarr-api-key",
95
+ "PROWLARR_URL": "http://localhost:9696",
96
+ "PROWLARR_API_KEY": "your-prowlarr-api-key",
97
+ "LINGARR_URL": "http://localhost:9877",
98
+ "LINGARR_API_KEY": "your-lingarr-api-key"
99
+ }
100
+ }
101
+ }
102
+ }
103
+ ```
104
+
105
+ ### For Claude Code
106
+
107
+ Add to `~/.claude.json`:
108
+
109
+ ```json
110
+ {
111
+ "mcpServers": {
112
+ "arr": {
113
+ "command": "npx",
114
+ "args": ["-y", "mcp-arr-server"],
115
+ "env": {
116
+ "SONARR_URL": "http://localhost:8989",
117
+ "SONARR_API_KEY": "your-sonarr-api-key",
118
+ "RADARR_URL": "http://localhost:7878",
119
+ "RADARR_API_KEY": "your-radarr-api-key"
120
+ }
121
+ }
122
+ }
123
+ }
124
+ ```
125
+
126
+ **Note**: Only configure the services you have running. The server automatically detects which services are available based on the environment variables you provide.
127
+
128
+ ## Usage Examples
129
+
130
+ ### Library Management
131
+ - "Show me all my TV series"
132
+ - "What movies do I have in Radarr?"
133
+ - "List all artists in my music library"
134
+ - "How many books do I have by this author?"
135
+
136
+ ### Searching for Content
137
+ - "Search for sci-fi shows on Sonarr"
138
+ - "Find action movies from the 90s"
139
+ - "Search for jazz albums"
140
+ - "Look up fantasy book series"
141
+
142
+ ### Download Queue
143
+ - "What's downloading right now?"
144
+ - "Check the Sonarr queue"
145
+ - "Show Radarr download progress"
146
+
147
+ ### Upcoming Releases
148
+ - "What TV episodes are coming this week?"
149
+ - "Show upcoming movie releases"
150
+ - "Any new albums coming out this month?"
151
+ - "Show me upcoming book releases"
152
+
153
+ ### Downloading Content
154
+ - "What episodes of this show am I missing?"
155
+ - "Download the missing episodes for that series"
156
+ - "Search for this specific movie"
157
+ - "Grab that album I'm missing"
158
+ - "Download all missing books for this author"
159
+
160
+ ### Indexer Management
161
+ - "Are my indexers healthy?"
162
+ - "How are my indexers performing?"
163
+ - "Test all my Prowlarr indexers"
164
+
165
+ ### Subtitle Translation (Lingarr)
166
+ - "What movies have untranslated subtitles?"
167
+ - "Show me shows that need subtitle translation"
168
+ - "Translate the French subtitles for this movie to English"
169
+ - "What's the current translation queue?"
170
+ - "Show translation statistics"
171
+ - "Cancel that translation request"
172
+ - "Sync movies from Radarr to Lingarr"
173
+
174
+ ### Configuration Review
175
+ - "Review my Sonarr setup and suggest improvements"
176
+ - "Show me my quality profiles in Radarr"
177
+ - "Are there any health issues with my Lidarr?"
178
+ - "What naming convention am I using for TV shows?"
179
+ - "Help me understand my quality profiles - why am I not getting 4K?"
180
+ - "Check my download client configuration"
181
+ - "How much free space do I have on my root folders?"
182
+
183
+ ### Cross-Service
184
+ - "Check status of all my *arr services"
185
+ - "Search for 'comedy' across all services"
186
+
187
+ ## Available Tools
188
+
189
+ ### General Tools
190
+
191
+ | Tool | Description |
192
+ |------|-------------|
193
+ | `arr_status` | Get connection status for all configured *arr services |
194
+ | `arr_search_all` | Search across all configured services simultaneously |
195
+
196
+ ### Sonarr Tools (TV)
197
+
198
+ | Tool | Description |
199
+ |------|-------------|
200
+ | `sonarr_get_series` | List all TV series in your library |
201
+ | `sonarr_search` | Search for TV series to add |
202
+ | `sonarr_get_queue` | View current download queue |
203
+ | `sonarr_get_calendar` | See upcoming episodes |
204
+ | `sonarr_get_episodes` | List episodes for a series (shows missing vs available) |
205
+ | `sonarr_search_missing` | Trigger search for all missing episodes in a series |
206
+ | `sonarr_search_episode` | Trigger search for specific episode(s) |
207
+
208
+ ### Radarr Tools (Movies)
209
+
210
+ | Tool | Description |
211
+ |------|-------------|
212
+ | `radarr_get_movies` | List all movies in your library |
213
+ | `radarr_search` | Search for movies to add |
214
+ | `radarr_get_queue` | View current download queue |
215
+ | `radarr_get_calendar` | See upcoming releases |
216
+ | `radarr_search_movie` | Trigger search to download a movie in your library |
217
+
218
+ ### Lidarr Tools (Music)
219
+
220
+ | Tool | Description |
221
+ |------|-------------|
222
+ | `lidarr_get_artists` | List all artists in your library |
223
+ | `lidarr_search` | Search for artists to add |
224
+ | `lidarr_get_queue` | View current download queue |
225
+ | `lidarr_get_albums` | List albums for an artist (shows missing vs available) |
226
+ | `lidarr_search_album` | Trigger search for a specific album |
227
+ | `lidarr_search_missing` | Trigger search for all missing albums for an artist |
228
+ | `lidarr_get_calendar` | See upcoming album releases |
229
+
230
+ ### Readarr Tools (Books)
231
+
232
+ | Tool | Description |
233
+ |------|-------------|
234
+ | `readarr_get_authors` | List all authors in your library |
235
+ | `readarr_search` | Search for authors to add |
236
+ | `readarr_get_queue` | View current download queue |
237
+ | `readarr_get_books` | List books for an author (shows missing vs available) |
238
+ | `readarr_search_book` | Trigger search for specific book(s) |
239
+ | `readarr_search_missing` | Trigger search for all missing books for an author |
240
+ | `readarr_get_calendar` | See upcoming book releases |
241
+
242
+ ### Prowlarr Tools (Indexers)
243
+
244
+ | Tool | Description |
245
+ |------|-------------|
246
+ | `prowlarr_get_indexers` | List all configured indexers |
247
+ | `prowlarr_search` | Search across all indexers |
248
+ | `prowlarr_test_indexers` | Test all indexers and return health status |
249
+ | `prowlarr_get_stats` | Get indexer statistics (queries, grabs, failures) |
250
+
251
+ ### Lingarr Tools (Subtitle Translation)
252
+
253
+ | Tool | Description |
254
+ |------|-------------|
255
+ | `lingarr_get_movies` | List movies with translation status (translated, pending, untranslated) |
256
+ | `lingarr_get_shows` | List TV shows with translation status |
257
+ | `lingarr_get_statistics` | Get translation statistics (totals, by language, by status) |
258
+ | `lingarr_get_daily_statistics` | Get daily translation statistics for a date range |
259
+ | `lingarr_get_languages` | List available source and target languages |
260
+ | `lingarr_get_models` | List available AI translation models |
261
+ | `lingarr_get_translation_requests` | View translation request queue with filtering |
262
+ | `lingarr_get_active_translations` | Get currently active/in-progress translations |
263
+ | `lingarr_translate_subtitle` | Start a subtitle translation job |
264
+ | `lingarr_cancel_translation` | Cancel a pending or in-progress translation |
265
+ | `lingarr_retry_translation` | Retry a failed translation request |
266
+ | `lingarr_get_subtitles` | Get subtitle files for a specific media path |
267
+ | `lingarr_get_jobs` | List scheduled jobs and their status |
268
+ | `lingarr_run_automation` | Manually trigger the automated translation job |
269
+ | `lingarr_sync_media` | Sync movies or shows from Radarr/Sonarr |
270
+ | `lingarr_exclude_media` | Toggle exclusion of media from automatic translation |
271
+ | `lingarr_get_version` | Get Lingarr version information |
272
+
273
+ ### Configuration Review Tools
274
+
275
+ These tools are available for Sonarr, Radarr, Lidarr, and Readarr. Replace `{service}` with the service name (e.g., `sonarr_get_quality_profiles`).
276
+
277
+ | Tool | Description |
278
+ |------|-------------|
279
+ | `{service}_get_quality_profiles` | Detailed quality profile information with allowed qualities and custom format scores |
280
+ | `{service}_get_health` | Health check warnings and issues detected by the application |
281
+ | `{service}_get_root_folders` | Storage paths, free space, and accessibility status |
282
+ | `{service}_get_download_clients` | Download client configurations and settings |
283
+ | `{service}_get_naming` | File and folder naming conventions |
284
+ | `{service}_get_tags` | Tag definitions for content organization |
285
+ | `{service}_review_setup` | **Comprehensive configuration dump for AI-assisted setup analysis** |
286
+
287
+ The `{service}_review_setup` tool returns all configuration in a single call, enabling natural language conversations about optimizing your setup. Claude can analyze your quality profiles, suggest improvements, explain why certain content isn't being grabbed, and help configure complex settings like custom formats.
288
+
289
+ > **⚠️ Disclaimer**: The configuration review tools provide **read-only** access to your *arr settings. Any changes to your configuration must be made directly in the *arr application interfaces. The AI's suggestions are recommendations only - always back up your configuration before making significant changes. The maintainers are not responsible for any configuration changes, data loss, or other issues that may arise from following AI-generated recommendations.
290
+
291
+ ### TRaSH Guides Tools
292
+
293
+ Access community-curated quality profiles, custom formats, and naming conventions from [TRaSH Guides](https://trash-guides.info/) directly through Claude. These tools work without any *arr configuration - they fetch reference data from the TRaSH Guides GitHub repository.
294
+
295
+ | Tool | Description |
296
+ |------|-------------|
297
+ | `trash_list_profiles` | List available TRaSH quality profiles for Radarr or Sonarr |
298
+ | `trash_get_profile` | Get detailed profile with custom formats, scores, and quality settings |
299
+ | `trash_list_custom_formats` | List custom formats with optional category filter (hdr, audio, resolution, etc.) |
300
+ | `trash_get_naming` | Get recommended naming conventions for Plex, Emby, Jellyfin, or standard |
301
+ | `trash_get_quality_sizes` | Get recommended min/max/preferred sizes for each quality level |
302
+ | `trash_compare_profile` | Compare your profile against TRaSH recommendations (requires *arr configured) |
303
+ | `trash_compare_naming` | Compare your naming config against TRaSH recommendations (requires *arr configured) |
304
+
305
+ **Example usage:**
306
+ - "What quality profiles does TRaSH recommend for 4K movies?"
307
+ - "Show me the remux-web-1080p profile details"
308
+ - "Compare my Radarr profile 4 against the TRaSH uhd-bluray-web profile"
309
+ - "What naming convention should I use for Plex?"
310
+ - "List HDR-related custom formats for Radarr"
311
+
312
+ Data is cached for 1 hour to minimize GitHub API calls.
313
+
314
+ ## Development
315
+
316
+ ```bash
317
+ # Watch mode for development
318
+ npm run watch
319
+
320
+ # Build TypeScript
321
+ npm run build
322
+
323
+ # Run locally
324
+ SONARR_URL="http://localhost:8989" SONARR_API_KEY="your-key" node dist/index.js
325
+ ```
326
+
327
+ ## Troubleshooting
328
+
329
+ ### "No *arr services configured"
330
+ Ensure you have set at least one pair of URL and API_KEY environment variables:
331
+ ```bash
332
+ SONARR_URL="http://localhost:8989"
333
+ SONARR_API_KEY="your-api-key"
334
+ ```
335
+
336
+ ### "API error: 401 Unauthorized"
337
+ The API key is incorrect. Verify it in your *arr application under Settings > General > Security.
338
+
339
+ ### "fetch failed" or "ECONNREFUSED"
340
+ The *arr application is not running or the URL is incorrect. Verify:
341
+ - The application is running
342
+ - The URL and port are correct
343
+ - There's no firewall blocking the connection
344
+
345
+ ### "Sonarr/Radarr/etc not configured"
346
+ You tried to use a tool for a service that isn't configured. Add the corresponding URL and API_KEY environment variables.
347
+
348
+ ## Contributing
349
+
350
+ Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
351
+
352
+ ## License
353
+
354
+ MIT - see [LICENSE](LICENSE) for details.
355
+
356
+ ## Links
357
+
358
+ - [Servarr Wiki](https://wiki.servarr.com/) - Documentation for all *arr applications
359
+ - [TRaSH Guides](https://trash-guides.info/) - Quality profiles, custom formats, and setup guides
360
+ - [Lingarr](https://github.com/lingarr/lingarr) - Subtitle translation service
361
+ - [Sonarr API Docs](https://sonarr.tv/docs/api/)
362
+ - [Model Context Protocol](https://modelcontextprotocol.io)
363
+ - [GitHub Repository](https://github.com/aplaceforallmystuff/mcp-arr)