mcpField
S
Sonarr MCP Server

Sonarr MCP Server

Local
github.com/jbydeleyGames & Entertainment2Updated 26w ago

About Sonarr MCP Server

Sonarr MCP Server connects MCP clients to Sonarr, letting them inspect series and episodes, review activity, and add series through a mix of read-only and write tools.

Key features

  1. 01Search TV series
  2. 02Find series episodes
  3. 03View logs and download history
  4. 04List upcoming episodes
  5. 05Add series
  6. 06Read series and episode resources

Use cases

  1. 01Find a series and inspect its episodes
  2. 02Check recent downloads or upcoming episodes
  3. 03Add a series to Sonarr
  4. 04Retrieve quality profiles and definitions

MCP support

Exposes Sonarr search, episode, log, download, calendar, and series-management tools to MCP clients, along with series, episode, and quality-profile resources.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"sonarr": {
"command": "npx",
"args": [
"-y",
"sonarr-mcp"
],
"env": {
"SONARR_URL": "<SONARR_URL>",
"SONARR_API_KEY": "<SONARR_API_KEY>"
}
}
}
}
Run commandnpx -y sonarr-mcp
Environment variables to set
SONARR_URL
SONARR_API_KEYSecret

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmsonarr-mcp

Tools

6

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
tagsarrayNoOptional tag IDs
titlestringYesThe title of the show to add
tvdbIdintegerYesThe TVDB ID of the show to add
monitoredbooleanNoWhether the series is monitored
addOptionsobjectNo
addOptions.searchForMissingEpisodesbooleanNo
seasonFolderbooleanNoWhether to use season folders
rootFolderPathstringNoThe folder where Sonarr stores the series
qualityProfileIdintegerNoThe Sonarr quality profile ID to use
languageProfileIdintegerNoOptional language profile ID

Details

From the project README

Sonarr MCP Server

This is a Model Context Protocol (MCP) server for accessing Sonarr. It provides a set of tools for interacting with Sonarr programmatically.

Prerequisites

  • Node.js >= 20
  • A running Sonarr instance (v3 or v4)
  • Your Sonarr API key (found in Sonarr UI under Settings > General > API Key)

Tools

The following tools are available:

ToolDescriptionRead-only
search-seriesSearch for a TV series by termYes
find-episodesFind episodes for a seriesYes
get-logsGet paginated logs from SonarrYes
list-recent-downloadsList recent download historyYes
list-upcoming-episodesList upcoming episodes from the calendarYes
add-seriesAdd a series to SonarrNo
Example tool calls

Search for a series:

{ "term": "Severance" }

Find episodes:

{ "seriesId": 123, "seasonNumber": 1 }

Add a series:

{
  "title": "Severance",
  "tvdbId": 371980,
  "qualityProfileId": 1,
  "rootFolderPath": "/tv"
}

Resources

The following resources are available:

  • sonarr://series/{id} - Retrieve information about a specific series by ID
  • sonarr://episode/{id} - Retrieve information about a specific episode by ID
  • sonarr://quality-profile - List quality profiles configured in Sonarr
  • sonarr://quality-definition - List quality definitions used by Sonarr

Configuration

Create a .env file or set environment variables:

SONARR_URL=http://localhost:8989
SONARR_API_KEY=your-api-key-here

Usage

With Claude Desktop / MCP Clients

Add this server to your MCP config:

{
  "mcpServers": {
    "sonarr": {
      "command": "npx",
      "args": ["-y", "sonarr-mcp"],
      "env": {
        "SONARR_URL": "http://localhost:8989",
        "SONARR_API_KEY": "<your-sonarr-api-key>"
      }
    }
  }
}
Local Development
npm install
npm run build
npm run test
npm run lint

Run locally with stdio transport:

SONARR_URL=http://localhost:8989 SONARR_API_KEY=xxx npm start

Security

  • Keep your SONARR_API_KEY private. Treat it like a password.
  • Do not commit .env files containing your API key.
  • The server communicates with Sonarr over HTTP(S). Use HTTPS when exposing Sonarr externally.

Troubleshooting

IssuePossible CauseSolution
"fetch failed" or connection errorsWrong SONARR_URLVerify the URL and that Sonarr is running
"Sonarr HTTP 401"Invalid API keyCheck your API key in Sonarr settings
"Invalid environment variables"Missing required env varsSet both SONARR_URL and SONARR_API_KEY

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.