Enables querying movie library, viewing recently added movies and upcoming releases, checking system status and disk space, managing download queue, refreshing metadata, and triggering movie searches.
Enables querying TV series library, viewing recently added shows and upcoming episodes, checking system status and disk space, managing download queue, refreshing metadata, and triggering episode searches.
Click on "Install 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 & Radarr MCP Serverwhat movies were added to Radarr this month?"
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 & Radarr MCP Server
A secure, production-ready Model Context Protocol (MCP) server for interacting with Sonarr and Radarr APIs. This server enables Claude to query your media library, check recent additions, view upcoming releases, and perform basic management tasks.
Features
Sonarr
Get recently added TV series
View upcoming episode calendar
Search series in your library
Check system status and disk space
View download queue
Refresh series metadata
Trigger episode searches
Radarr
Get recently added movies
View upcoming movie releases
Search movies in your library
Check system status and disk space
View download queue
Refresh movie metadata
Trigger movie searches
Security Features
This MCP server is built with security as a priority:
Non-root container execution: Runs as user ID 1000 (non-root)
Read-only root filesystem: Container filesystem is immutable
No privilege escalation: Container cannot gain additional privileges
Dropped capabilities: All Linux capabilities dropped
Secrets management: API keys stored in Kubernetes secrets
Network policies: Restricts network access to only necessary services
Resource limits: CPU and memory limits prevent resource exhaustion
Secure defaults: Follows security best practices from the ground up
Prerequisites
Docker (for containerization)
Kubernetes cluster (for deployment)
Sonarr instance with API access
Radarr instance with API access
Python 3.12+ (for local development)
Quick Start
1. Clone and Configure
2. Set Up Environment Variables
Copy the example environment file:
Edit .env with your actual values:
Finding your API keys:
Sonarr: Settings → General → Security → API Key
Radarr: Settings → General → Security → API Key
3. Build the Docker Image
4. Test Locally with Docker Compose
Kubernetes Deployment
1. Update Secrets
Edit k8s/deployment.yaml and replace the placeholder API keys in the Secret:
Security Note: For production, use kubectl create secret instead of storing secrets in YAML:
2. Deploy to Kubernetes
3. Verify Deployment
Connecting to Claude
To use this MCP server with Claude Desktop, add it to your MCP settings:
Using Docker
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
Using Python (Development)
Usage Examples
Once connected to Claude, you can ask questions like:
"What TV shows were added to Sonarr this week?"
"What movies are coming out in the next 30 days?"
"Search for Breaking Bad in my library"
"What's currently downloading in Radarr?"
"Show me Sonarr's system status"
"Refresh the metadata for series ID 123"
API Reference
Environment Variables
Variable | Required | Default | Description |
| No* | - | Sonarr base URL (e.g., http://sonarr:8989) |
| No* | - | Sonarr API key |
| No* | - | Radarr base URL (e.g., http://radarr:7878) |
| No* | - | Radarr API key |
| No | 30 | HTTP request timeout in seconds |
*At least one service (Sonarr or Radarr) must be configured
Available Tools
Sonarr Tools
sonarr_get_recent_series- Get recently added seriessonarr_get_calendar- Get upcoming episodessonarr_search_series- Search for seriessonarr_get_system_status- Get system statussonarr_get_queue- Get download queuesonarr_refresh_series- Refresh series metadatasonarr_search_episodes- Search for missing episodes
Radarr Tools
radarr_get_recent_movies- Get recently added moviesradarr_get_calendar- Get upcoming releasesradarr_search_movies- Search for moviesradarr_get_system_status- Get system statusradarr_get_queue- Get download queueradarr_refresh_movie- Refresh movie metadataradarr_search_movie- Search for a movie
Development
Local Development Setup
Create a virtual environment:
Install dependencies:
Run the server:
Testing
Test the server using the MCP Inspector:
Troubleshooting
Connection Issues
Problem: Cannot connect to Sonarr/Radarr
Solutions:
Verify URLs are correct (include http:// or https://)
Check API keys are valid
Ensure Sonarr/Radarr are accessible from the container
Check network policies in Kubernetes
Permission Errors
Problem: Container fails with permission errors
Solutions:
Verify the container runs as non-root (UID 1000)
Check volume mount permissions
Ensure read-only filesystem is properly configured
API Rate Limiting
Problem: Getting rate limited by APIs
Solutions:
Increase
REQUEST_TIMEOUTif requests are timing outReduce frequency of queries
Check Sonarr/Radarr logs for issues
Security Considerations
Production Deployment Checklist
Use Kubernetes Secrets for API keys (not ConfigMaps)
Enable Pod Security Standards (restricted profile)
Configure network policies to limit egress traffic
Set appropriate resource limits
Enable audit logging
Use private container registry
Scan images for vulnerabilities
Rotate API keys regularly
Use TLS for Sonarr/Radarr connections
Implement monitoring and alerting
API Key Security
Never commit API keys to version control!
For production:
Use Kubernetes secrets
Consider using a secrets manager (Vault, Sealed Secrets, etc.)
Rotate keys regularly
Use separate API keys for different environments
Enable API key authentication logging in Sonarr/Radarr
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Guidelines
Follow existing code style
Add tests for new features
Update documentation
Ensure security best practices
Test in both Docker and Kubernetes
License
MIT License - See LICENSE file for details
Support
For issues, questions, or contributions, please open an issue on GitHub.
Acknowledgments
Built with the Model Context Protocol SDK
Uses Sonarr API
Uses Radarr API