Skip to main content
Glama
README.md
# media-mcp

An MCP server for a home media stack: **Radarr, Sonarr, SABnzbd, Plex and Seerr**, plus recommendations built from your Plex watch history.

Ask an AI assistant things like:

- "What new movies came out recently that I'd like?"
- "Give me this week's recommendations." Then: "Approve m1383731 and t243316, reject the rest."
- "Where's Project Hail Mary? Is it downloaded and in Plex yet?"
- "Scan the Plex library."
- "Compare my Radarr setup to TRaSH Guides."

## How recommendations work

1. **Taste** comes from Plex only. Episode play counts show which shows you rewatch: 1,600 plays of a 186-episode show is about 9 times through, and that weighs far more than a show you sampled once. Movie plays count too, and movies you keep in the library count a little.
2. **Candidates** come from Seerr, which proxies TMDB recommendations and the trending, popular and upcoming lists. No TMDB key is needed.
3. **Anything you already have is dropped**: titles in Plex, Radarr or Sonarr, anything Seerr marks as requested or available, and anything suggested before.
4. **Scoring** combines which of your favorites point to a title, how well its genres match what you watch, TMDB rating, and how new it is. Languages that are rare in your library score down. Half of each batch is reserved for titles from the last two years or coming soon, and no single show can drive more than two picks.
5. **Approve or reject.** Approving requests the title in Seerr, which sends it to Radarr or Sonarr and starts the download. Rejected titles never come back, and their genres count slightly against future picks.

The queue is a JSON file in `~/.local/share/media-mcp/`.

## Tools

| Area | Tools |
|---|---|
| Pipeline | `media_status`, `media_track` (one title through Seerr, Radarr/Sonarr, SABnzbd and Plex, with a one-line stage and next step) |
| Recommendations | `taste_profile`, `recommend_generate`, `recommend_list`, `recommend_approve`, `recommend_reject`, `recommend_new_releases` |
| Seerr | `seerr_search`, `seerr_discover`, `seerr_get_requests`, `seerr_request`, `seerr_approve_request`, `seerr_decline_request` |
| Radarr | `radarr_get_movies`, `radarr_search`, `radarr_add_movie`, `radarr_get_queue`, `radarr_get_calendar`, `radarr_search_movie`, `radarr_refresh_movie`, `radarr_delete_queue_item`, `radarr_get_movie_files` |
| Sonarr | `sonarr_get_series`, `sonarr_search`, `sonarr_add_series`, `sonarr_get_queue`, `sonarr_get_calendar`, `sonarr_get_episodes`, `sonarr_search_missing`, `sonarr_search_episode`, `sonarr_refresh_series`, `sonarr_get_episode_files` |
| Radarr/Sonarr setup | `*_review_setup`, `*_get_health`, `*_get_quality_profiles`, `*_get_root_folders`, `*_get_naming`, `*_get_download_clients`, `*_get_tags` |
| TRaSH Guides | `trash_list_profiles`, `trash_get_profile`, `trash_list_custom_formats`, `trash_get_quality_sizes`, `trash_get_naming`, `trash_compare_profile`, `trash_compare_naming` (lookups and comparisons only; nothing is changed) |
| SABnzbd | `sab_get_queue`, `sab_get_history`, `sab_pause`, `sab_resume` |
| Plex | `plex_get_libraries`, `plex_scan_library`, `plex_check_title`, `plex_recently_added`, `plex_watch_history` |

Only tools for configured services are listed. Recommendations need both Plex and Seerr.

## Setup

Requires Node.js 20 or newer.

```bash
git clone https://github.com/lemur001/MCP-for-Radarr-Sonarr-SABnzbd-Plex.git
cd MCP-for-Radarr-Sonarr-SABnzbd-Plex
npm install && npm run build
```

Put your keys in `~/.config/media-mcp/.env` (see `.env.example`) and `chmod 600` it. Values in the process environment override the file, and an empty value switches a service off.

| Variable | Where to find it |
|---|---|
| `RADARR_URL`, `RADARR_API_KEY` | Radarr > Settings > General |
| `SONARR_URL`, `SONARR_API_KEY` | Sonarr > Settings > General |
| `SABNZBD_URL`, `SABNZBD_API_KEY` | SABnzbd > Config > General |
| `PLEX_URL`, `PLEX_TOKEN` | [Finding your Plex token](https://support.plex.tv/articles/204059436) |
| `SEERR_URL`, `SEERR_API_KEY` | Seerr > Settings > General |
| `MEDIA_MCP_READ_ONLY=true` | Optional. Hides and refuses every tool that changes something. |
| `MEDIA_MCP_DATA_DIR` | Optional. Where the recommendation queue lives. |

### Claude Code

```bash
claude mcp add --scope user media -- node /path/to/MCP-for-Radarr-Sonarr-SABnzbd-Plex/dist/index.js
```

### Other clients

Any MCP client that runs a local command works the same way: command `node`, argument `/path/to/dist/index.js`.

Remote clients (ChatGPT, claude.ai on the web or phone) need an HTTPS address. `MCP_TRANSPORT=http` serves MCP on `http://127.0.0.1:3000/mcp` (`HOST`, `PORT` and `MCP_PATH` change that). **It has no authentication of its own**: do not expose it to the internet without an authenticating proxy in front.

### Weekly recommendations

```bash
deploy/install-timer.sh
```

Installs a systemd user timer that adds 5 movies and 5 shows to the queue every Monday at 08:00. Edit `OnCalendar` in `deploy/media-mcp-recommend.timer` first for another schedule. To run it once by hand: `node dist/index.js recommend 5`.

## Development

```bash
npm test
```

Tests run against fake services, so they need no real keys.

## Credits

The Radarr/Sonarr client and tools, TRaSH Guides client and tools, read-only mode, argument checks, key redaction and HTTP transport are adapted from [mcp-arr](https://github.com/aplaceforallmystuff/mcp-arr) by Jim Christian (MIT). Each adapted file says so in its header; see `THIRD_PARTY_LICENSE-mcp-arr`.

TDQS

A3.5/5.0

Scored across 9 tools

Disambiguation4/5

Each tool has a distinct target: media_status covers service health, media_track follows a single item through the pipeline, and the trash_* tools split cleanly between listing profiles, getting one profile, listing custom formats, quality sizes, naming, and two different comparison targets (profile vs naming). The only mild overlap is between trash_list_profiles and trash_get_profile, but that is the standard list/detail pair and descriptions make it clear.

Naming Consistency4/5

The trash_* family is highly consistent verb_noun (list_profiles, get_profile, list_custom_formats, get_quality_sizes, get_naming, compare_profile, compare_naming). The media_* pair deviates slightly: media_track is a verb but media_status is a bare noun, where media_get_status would fit the pattern better.

Tool Count5/5

Nine tools is well within the sweet spot and each earns its place: two operational media tools plus seven TRaSH Guides tools that map to distinct reference artifacts. No redundant or filler tools are present.

Completeness3/5

The surface is entirely read-only: it can inspect services, track an item, and compare against TRaSH recommendations, but there is no way to apply an imported profile or naming scheme, add/search media, or manage the download queue. For a media automation server this leaves notable dead ends, though the diagnostic and advisory workflows are covered.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues