Skip to main content
Glama
sonarr-mcp-server

sonarr-mcp-server

by slate63

sonarr-mcp-server

An MCP server for Sonarr that lets Claude (or any MCP client) browse and manage your TV library: see what's airing, check downloads, add shows, run searches, fix stuck imports and more.

  • Zero setup: run it with npx. Nothing to clone, build or download. You only pass your Sonarr URL and API key.

  • No dependencies: ships as a single bundled file, so npx starts it quickly.

  • 36 tools for series, episodes, calendar, missing episodes, queue, history, release search, commands and system status, plus a raw API tool for everything else.

  • Safe by default: tools are labeled read-only or destructive, deletes keep files unless asked, and --read-only mode hides every tool that changes anything.

Targets the Sonarr v5 API (/api/v5).

Quick start

You need Node.js 18.17+ and your Sonarr API key (Sonarr → Settings → General → Security → API Key).

npx -y sonarr-mcp-server --url http://localhost:8989 --api-key YOUR_API_KEY

Claude Desktop

Add this to claude_desktop_config.json (Settings → Developer → Edit Config), then restart Claude Desktop:

{
  "mcpServers": {
    "sonarr": {
      "command": "npx",
      "args": ["-y", "sonarr-mcp-server", "--url", "http://localhost:8989", "--api-key", "YOUR_API_KEY"]
    }
  }
}

Claude Code

claude mcp add sonarr -- npx -y sonarr-mcp-server --url http://localhost:8989 --api-key YOUR_API_KEY

Other MCP clients (Cursor, VS Code, etc.)

Use the command npx with the arguments -y sonarr-mcp-server --url <url> --api-key <key>.

Keeping the API key out of arguments

Every option can also come from an environment variable, which most MCP clients support:

{
  "mcpServers": {
    "sonarr": {
      "command": "npx",
      "args": ["-y", "sonarr-mcp-server"],
      "env": {
        "SONARR_URL": "http://localhost:8989",
        "SONARR_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Related MCP server: sonarr-mcp

Options

Argument

Environment variable

Description

--url, -u

SONARR_URL

Sonarr URL, e.g. http://192.168.1.10:8989. Include your URL base if you use one, e.g. https://example.com/sonarr.

--api-key, -k

SONARR_API_KEY

Sonarr API key.

--read-only

SONARR_READ_ONLY=true

Only expose tools that read data.

--timeout <ms>

SONARR_TIMEOUT_MS

HTTP timeout (default 60000). Release searches always allow up to 3 minutes.

--api-version <v>

SONARR_API_VERSION

API path segment (default v5).

You can also pass the URL and key as positional arguments: npx -y sonarr-mcp-server http://localhost:8989 YOUR_API_KEY.

Tools

Area

Tools

System

sonarr_get_system_status (version, health warnings, disk space, queue summary), sonarr_list_quality_profiles, sonarr_list_root_folders, sonarr_list_tags, sonarr_create_tag, sonarr_parse_title

Series

sonarr_list_series, sonarr_get_series, sonarr_lookup_series, sonarr_add_series, sonarr_update_series, sonarr_delete_series, sonarr_set_season_monitoring

Episodes

sonarr_list_episodes, sonarr_get_episode, sonarr_set_episode_monitoring, sonarr_list_episode_files, sonarr_delete_episode_files

Calendar & wanted

sonarr_get_calendar, sonarr_get_wanted_missing, sonarr_get_wanted_cutoff_unmet

Downloads

sonarr_get_queue, sonarr_remove_queue_items, sonarr_grab_queue_items, sonarr_get_history, sonarr_mark_history_failed, sonarr_search_releases, sonarr_grab_release

Commands

sonarr_search_episodes, sonarr_search_series, sonarr_search_wanted, sonarr_refresh_series, sonarr_run_command, sonarr_get_commands

Anything else

sonarr_list_api_endpoints (every endpoint in the v5 spec, filterable), sonarr_api_request (raw call to any endpoint)

Results are trimmed to the useful fields (no image URLs, translations and so on) so large libraries fit in the model's context.

Things to try

  • "What's airing this week?"

  • "What's downloading right now, and is anything stuck?"

  • "Add Severance and grab all existing episodes in 1080p."

  • "Which episodes of The Expanse am I missing?"

  • "Search for a better release of S02E05 and show me what's available."

  • "Why didn't this import? Show.Name.S01E01.1080p.WEB.h264-GROUP"

Development

npm install
npm run build      # bundle src/ into dist/index.js
npm test           # build, then run end-to-end tests against a fake Sonarr
npm run typecheck

Run your local build: node dist/index.js --url http://localhost:8989 --api-key YOUR_API_KEY.

To try it with the MCP Inspector:

npx @modelcontextprotocol/inspector node dist/index.js --url http://localhost:8989 --api-key YOUR_API_KEY

The endpoint index used by sonarr_list_api_endpoints is generated from the Sonarr OpenAPI spec in openapi/. After updating the spec, run npm run generate.

Publishing

npm login
npm publish

prepublishOnly runs the typecheck and the tests first. Only dist/index.js, this README and the license are published.

License

MIT. The Sonarr OpenAPI document in openapi/ belongs to the Sonarr project and is licensed under GPL-3.0.

Available Tools

36 tools
sonarr_add_seriesAdd a seriesA

Add a series to Sonarr by TVDB ID (find it with sonarr_lookup_series). Quality profile and root folder default to the first ones configured; list them with sonarr_list_quality_profiles / sonarr_list_root_folders to choose explicitly. Set searchForMissingEpisodes=true to start downloading existing episodes immediately.

Inputs: tvdbId (required), tags, monitor, seriesType, +6 more.

sonarr_api_requestRaw Sonarr API requestA
Destructive

Call any Sonarr API endpoint directly and get the raw JSON response. Paths are relative to /api/v5 (e.g. '/indexer', '/blocklist', '/settings/naming'). Find endpoints with sonarr_list_api_endpoints. For PUT, send the complete resource (GET it first and modify it). Prefer dedicated tools when one exists, and confirm with the user before destructive requests.

Inputs: path (required), body, query, method, +1 more.

sonarr_create_tagCreate a tagA
Idempotent

Create a new tag (returns its ID, or the existing tag if one with that label already exists).

Inputs: label (required).

sonarr_delete_episode_filesDelete episode filesA
Destructive

Permanently delete episode files from disk (IDs from sonarr_list_episode_files). The episodes become missing. Confirm with the user first.

Inputs: episodeFileIds (required).

sonarr_delete_seriesDelete a seriesA
Destructive

Remove a series from Sonarr. Files on disk are kept unless deleteFiles=true (permanent). Confirm with the user before deleting files.

Inputs: seriesId (required), deleteFiles, addImportListExclusion.

sonarr_get_calendarGet upcoming / recent episodesB
Read-onlyIdempotent

Episodes airing in a date range (default: today through the next 7 days). Use a past start to see what recently aired.

Inputs: end, days, start, includeSpecials, +1 more.

sonarr_get_commandsGet command statusA
Read-onlyIdempotent

Get the status of a command by ID, or list queued, running and recently finished commands.

Inputs: commandId.

sonarr_get_episodeGet episode detailsA
Read-onlyIdempotent

Get full details for one episode, including overview and file/media info if downloaded.

Inputs: episodeId (required).

sonarr_get_historyGet historyA
Read-onlyIdempotent

Activity history: grabs, imports, failed downloads, deletions and renames. Newest first. Filter by series, episode, event type or download ID.

Inputs: page, sortKey, pageSize, episodeId, +4 more.

sonarr_get_queueGet download queueA
Read-onlyIdempotent

Items currently downloading or waiting to import, with progress, time left, status and any warnings/errors (e.g. import blocked). Queue item ids are used by sonarr_remove_queue_items.

Inputs: page, status, sortKey, pageSize, +3 more.

sonarr_get_seriesGet series detailsA
Read-onlyIdempotent

Get full details for one series in the library: overview, genres, per-season monitoring and file statistics, paths and settings.

Inputs: seriesId (required).

sonarr_get_system_statusSystem status and healthA
Read-onlyIdempotent

Sonarr version and platform info, current health check warnings/errors, disk space, and a queue summary. A good first call to check that the connection works.

Inputs: no named parameters.

sonarr_get_wanted_cutoff_unmetList episodes below quality cutoffA
Read-onlyIdempotent

Episodes that have a file but haven't reached the quality profile's cutoff (upgrade candidates). Paged.

Inputs: page, sortKey, pageSize, monitored, +2 more.

sonarr_get_wanted_missingList missing episodesA
Read-onlyIdempotent

Monitored episodes that have aired but have no file. Paged; newest first by default.

Inputs: page, sortKey, pageSize, monitored, +3 more.

sonarr_grab_queue_itemsForce-grab delayed queue itemsA

Immediately send pending/delayed queue items (e.g. held by a delay profile) to the download client.

Inputs: ids (required).

sonarr_grab_releaseDownload a releaseA

Send a release found by sonarr_search_releases to the download client. Use the guid and indexerId from the search results; Sonarr only remembers search results for about 30 minutes.

Inputs: guid (required), indexerId (required).

sonarr_list_api_endpointsList Sonarr API endpointsA
Read-onlyIdempotent

List the raw Sonarr API endpoints (from the v5.0.0 OpenAPI spec) with their query parameters and body types, for use with sonarr_api_request when no dedicated tool fits. Filter by keyword to keep the list short.

Inputs: filter, method.

sonarr_list_episode_filesList episode files of a seriesA
Read-onlyIdempotent

List the media files Sonarr has for a series: path, size, quality, languages, codec and whether the quality cutoff is met.

Inputs: seriesId (required).

sonarr_list_episodesList episodes of a seriesA
Read-onlyIdempotent

List episodes for a series (optionally one season), with air date, monitored state, whether a file exists and its quality. Episode ids are used by search, monitoring and release tools.

Inputs: seriesId (required), hasFile, monitored, seasonNumber.

sonarr_list_quality_profilesList quality profilesB
Read-onlyIdempotent

Quality profiles with their IDs, allowed qualities (best first), cutoff and upgrade settings.

Inputs: no named parameters.

sonarr_list_root_foldersList root foldersB
Read-onlyIdempotent

Root folders where series are stored, with free space and the number of unmapped (unimported) folders.

Inputs: no named parameters.

sonarr_list_seriesList series in libraryA
Read-onlyIdempotent

List TV series in the Sonarr library with compact details (id, title, status, monitored, episode counts, size, next airing). Use search to filter by title (also matches alternate titles). Use the returned id with other tools.

Inputs: limit, tagId, offset, search, +3 more.

sonarr_list_tagsList tagsB
Read-onlyIdempotent

Tags with their IDs and how many series use each.

Inputs: no named parameters.

sonarr_lookup_seriesSearch for a series to addA
Read-onlyIdempotent

Search TheTVDB (via Sonarr) for series by name, or by ID using 'tvdb:' / 'imdb:'. Returns tvdbId (needed by sonarr_add_series) and whether each result is already in the library.

Inputs: term (required), limit.

sonarr_mark_history_failedMark a grab as failedA

Mark a 'grabbed' history item as failed. Sonarr blocklists that release and, if enabled, searches for another.

Inputs: historyId (required).

sonarr_parse_titleParse a release titleA
Read-onlyIdempotent

Ask Sonarr how it parses a release name or file name: matched series, season/episode numbers, quality, release group, languages and custom format score. Useful for diagnosing why a release isn't matched or imported.

Inputs: title (required).

sonarr_refresh_seriesRefresh and rescan seriesA
Idempotent

Refresh series metadata from TheTVDB and rescan files on disk, for one series or (if seriesId is omitted) the whole library.

Inputs: wait, seriesId.

sonarr_remove_queue_itemsRemove items from the download queueA
Destructive

Remove one or more queue items. By default the download is also removed from the download client. Use blocklistMethod to blocklist the release (and optionally search for a replacement).

Inputs: ids (required), removalMethod, blocklistMethod.

sonarr_run_commandRun a Sonarr commandA

Queue any Sonarr command by name with optional parameters. Common commands: RssSync, RefreshSeries {seriesIds}, RescanSeries {seriesId}, RenameSeries {seriesIds}, RenameFiles {seriesId, files}, DownloadedEpisodesScan {path}, RefreshMonitoredDownloads, EpisodeSearch {episodeIds}, SeasonSearch {seriesId, seasonNumber}, SeriesSearch {seriesId}, MissingEpisodeSearch, CutoffUnmetEpisodeSearch, CheckHealth, Backup, ClearBlocklist, CleanUpRecycleBin, ApplicationUpdate.

Inputs: name (required), wait, parameters.

sonarr_search_episodesSearch for episodesA

Start an automatic search for specific episodes. Sonarr picks the best release and sends it to the download client.

Inputs: episodeIds (required), wait.

sonarr_search_releasesInteractive release searchA
Read-onlyIdempotent

Search all indexers for releases of an episode (episodeId) or a full season (seriesId + seasonNumber), and show Sonarr's verdict for each (approved or rejection reasons). Can take a minute. Grab a result with sonarr_grab_release using its guid and indexerId.

Inputs: limit, seriesId, episodeId, onlyApproved, +1 more.

sonarr_search_seriesSearch for a series or seasonA

Start an automatic search for all monitored missing episodes of a series, or of one season if seasonNumber is given.

Inputs: seriesId (required), wait, seasonNumber.

sonarr_search_wantedSearch all missing or cutoff-unmet episodesA

Start a library-wide automatic search for all monitored missing episodes, or all episodes below their quality cutoff. This can trigger many downloads and indexer requests.

Inputs: kind (required).

sonarr_set_episode_monitoringMonitor or unmonitor episodesB
Idempotent

Set whether specific episodes are monitored (Sonarr only searches for monitored episodes).

Inputs: monitored (required), episodeIds (required).

sonarr_set_season_monitoringMonitor or unmonitor seasonsB
Idempotent

Set whether one or more seasons of a series are monitored.

Inputs: seriesId (required), monitored (required), seasonNumbers (required).

sonarr_update_seriesUpdate series settingsA
Idempotent

Change settings of a series in the library. Only the fields you pass are changed. Changing path with moveFiles=true moves the files on disk.

Inputs: seriesId (required), path, tags, monitored, +5 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 36 tools

    Disambiguation4/5

    Tools are largely organized around distinct resources (series, episodes, files, queue, history, commands), and the descriptions make boundaries clear. The main overlap is the catch-all sonarr_run_command and sonarr_api_request duplicating dedicated operations like search/refresh/rescan, but the descriptions explicitly steer agents toward the specific tools. Minor potential confusion between sonarr_grab_release and sonarr_grab_queue_items, though scopes differ.

    Naming Consistency5/5

    Every tool uses the sonarr_ prefix followed by a clear verb_noun pattern (list_series, get_episode, add_series, search_releases, delete_episode_files) in consistent snake_case. No mixing of conventions or vague verbs.

    Tool Count3/5

    36 tools is on the heavy side for the stated scope, and some dedicated tools are partly redundant with sonarr_run_command and sonarr_api_request. However the Sonarr domain is genuinely broad (library, episodes, files, queue, history, search, monitoring), so most tools do map to real operations.

    Completeness4/5

    The surface covers the full lifecycle well: series CRUD/lookup, episodes, files, monitoring, queue, history, search, tags, quality profiles, root folders, calendar, and wanted lists. A few areas (indexers, blocklist management, notifications/settings) are only reachable via sonarr_api_request rather than dedicated tools, which is a minor gap.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Exposes the Sonarr v3 REST API as MCP tools, enabling LLMs to read and manage a Sonarr instance including series, episodes, downloads, history, and more. Supports both read and write operations, with destructive tools flagged.
      15
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Connects AI agents to Sonarr, exposing 136 tools for managing a TV library — adding series, chasing missing episodes, fixing the download queue, tuning quality profiles, and diagnosing health issues.
      136
      466 npm
      MIT
    • A
      license
      C
      quality
      B
      maintenance
      Enables full control of Sonarr from Claude.ai and Claude Code by exposing all 234 v3 API operations as tools for managing media libraries.
      235
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients to interact with Sonarr for listing series, checking missing episodes, searching for new series, triggering episode searches, and retrieving system status.
      MIT