home / mcp / sonarr & radarr mcp server
Secure MCP server enabling Claude to query Sonarr and Radarr APIs, check status, and manage media tasks.
Configuration
View docs{
"mcpServers": {
"bdfrost-mcp-servarr": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--env-file",
"/path/to/your/.env",
"mcp-servarr:latest"
],
"env": {
"RADARR_URL": "http://localhost:7878",
"SONARR_URL": "http://localhost:8989",
"RADARR_API_KEY": "your-radarr-api-key",
"SONARR_API_KEY": "your-sonarr-api-key"
}
}
}
}You use this MCP server to securely connect Claude to your Sonarr and Radarr instances, enabling you to query your media library, check for new releases, view queues, and refresh metadata from a single, consolidated interface.
Connect Claude to your MCP server to start querying Sonarr and Radarr. You have two practical options depending on how you run the server locally or in your environment.
Option A: Run via Docker (recommended for quick trials). Start the MCP server inside a Docker container and point Claude to it. Use the provided container command to launch with your environment values and run it interactively.
Option B: Run with Python locally (for development). Start the MCP server directly from your development environment by executing the Python script and loading your Sonarr/Radarr credentials through environment variables.
Once running, configure Claude Desktop to use your MCP server by adding a server entry with either the Docker-based runtime or the Python-based runtime, and provide the required environment values. You can then ask Claude to fetch newly added shows, upcoming calendars, search within your libraries, or inspect system status and queues.
Prerequisites you need before installing this MCP server are listed here so you can plan your environment.
- Docker (for containerized deployment) or a Python development environment with dependencies installed.
- Kubernetes cluster (for deployment in a cluster) if you plan to run in production.
- Sonarr instance with API access and a running Radarr instance with API access.
Follow these concrete steps to get started.
# Quick start steps
# 1. Clone and Configure
git clone <your-repo-url>
cd mcp-servarr
# 2. Set Up Environment Variables
cp .env.example .env
# Edit the .env file with your actual values:
# Sonarr Configuration
# SONARR_URL=http://your-sonarr-host:8989
# SONARR_API_KEY=your-sonarr-api-key
# Radarr Configuration
# RADARR_URL=http://your-radarr-host:7878
# RADARR_API_KEY=your-radarr-api-key
# 3. Build the Docker Image
docker build -t mcp-servarr:latest .
# 4. Test Locally with Docker Compose
docker-compose upSecurity is baked in across container execution, filesystem immutability, secrets handling, and network policies. For production deployments, ensure secrets are managed through Kubernetes Secrets, run with non-root users, and enforce resource limits and TLS when connecting to Sonarr/Radarr.
Kubernetes deployment steps are provided to update secrets, apply deployment manifests, and verify the pod status.
Environment variables you typically configure include the API endpoints and keys for both Sonarr and Radarr, as shown in development and runtime examples.
# Connecting to Claude (examples)
# Docker-based config for Claude Desktop
{
"mcpServers": {
"mcp_servarr": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--env-file", "/path/to/your/.env",
"mcp-servarr:latest"
]
}
}
}
# Python development config for Claude Desktop
{
"mcpServers": {
"mcp_servarr": {
"command": "python",
"args": [
"/path/to/mcp-servarr/src/server.py"
],
"env": {
"SONARR_URL": "http://localhost:8989",
"SONARR_API_KEY": "your-key",
"RADARR_URL": "http://localhost:7878",
"RADARR_API_KEY": "your-key"
}
}
}
}Get recently added TV series from Sonarr.
Get upcoming episode calendar from Sonarr.
Search for series in your Sonarr library.
Check Sonarr system status and disk space.
View the Sonarr download queue.
Refresh metadata for Sonarr series.
Search for missing episodes in Sonarr.
Get recently added movies from Radarr.
Get upcoming movie releases from Radarr.
Search for movies in your Radarr library.
Check Radarr system status and disk space.
View the Radarr download queue.
Refresh metadata for Radarr movies.
Search for a movie in Radarr.