Sonarr MCP Server
Provides tools for interacting with a Sonarr instance, including searching for TV series, finding episodes, viewing logs, listing recent downloads and upcoming episodes, and adding series.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Sonarr MCP Server search Sonarr for Severance and list its season 1 episodes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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)
Related MCP server: sonarr-radarr-mcp
Tools
The following tools are available:
Tool | Description | Read-only |
| Search for a TV series by term | Yes |
| Find episodes for a series | Yes |
| Get paginated logs from Sonarr | Yes |
| List recent download history | Yes |
| List upcoming episodes from the calendar | Yes |
| Add a series to Sonarr | No |
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 IDsonarr://episode/{id}- Retrieve information about a specific episode by IDsonarr://quality-profile- List quality profiles configured in Sonarrsonarr://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-hereUsage
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 lintRun locally with stdio transport:
SONARR_URL=http://localhost:8989 SONARR_API_KEY=xxx npm startSecurity
Keep your
SONARR_API_KEYprivate. Treat it like a password.Do not commit
.envfiles containing your API key.The server communicates with Sonarr over HTTP(S). Use HTTPS when exposing Sonarr externally.
Troubleshooting
Issue | Possible Cause | Solution |
"fetch failed" or connection errors | Wrong | Verify the URL and that Sonarr is running |
"Sonarr HTTP 401" | Invalid API key | Check your API key in Sonarr settings |
"Invalid environment variables" | Missing required env vars | Set both |
Available Tools
6 toolsadd-seriesAdd SeriesC
Add series to Sonarr
Inputs: title (required), tvdbId (required), tags, monitored, +5 more.
find-episodesFind EpisodesCRead-only
Find episodes in Sonarr
Inputs: seriesId (required), seasonNumber, episodeFileId, includeSeries, +2 more.
get-logsGet LogsCRead-only
Get logs from Sonarr
Inputs: page, level, sortKey, pageSize, +1 more.
list-recent-downloadsList Recent DownloadsCRead-only
List recent downloads from Sonarr
Inputs: page, quality, sortKey, pageSize, +5 more.
list-upcoming-episodesList Upcoming EpisodesCRead-only
List upcoming episodes from Sonarr
Inputs: end, tags, start, unmonitored, +3 more.
search-seriesSearch SeriesCRead-only
Search for a TV series by term
Inputs: term (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Most tools have distinct resource/action combinations: searching series, adding series, getting logs, and listing downloads are clearly separate. The only mild overlap is between find-episodes and list-upcoming-episodes, since both return episode data, but the specificity of 'upcoming' helps distinguish them.
All tool names follow a consistent hyphenated verb_noun pattern: search-series, add-series, find-episodes, get-logs, list-recent-downloads, list-upcoming-episodes. The verbs vary appropriately by action while the structure remains predictable.
Six tools is a reasonable, well-scoped set for a focused Sonarr MCP server and stays within the typical 3-15 range. It is slightly thin for a full Sonarr management surface, but no individual tool feels redundant.
The server covers searching and adding series, finding episodes, logs, downloads, and upcoming episodes, but it lacks core library operations such as listing existing series, getting series details, updating or deleting series, and managing episode files or the download queue. These gaps would likely block common Sonarr management workflows.
Maintenance
Related MCP Connectors
Web search and page reading for AI agents, including JSON APIs, RSS feeds and YouTube.
Access Pollinations models and API capabilities through agent tools.
Web data for agents. Extract web pages, crawl websites, discover URLs, and search the web.
Enable AI assistants to perform web searches using Perplexity's Sonar Pro.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables AI assistants to manage TV series collections through Sonarr's API using natural language interactions. Supports searching, adding, updating, and deleting TV series with detailed control over quality profiles, season monitoring, and episode downloads.9-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage TV shows and movies via Sonarr and Radarr, including searching, adding, and monitoring downloads.-
- AlicenseBqualityCmaintenanceExposes 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.15MIT
- AlicenseBqualityCmaintenanceConnects 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.13611 npmMIT