A C# .NET-based Model Context Protocol (MCP) server that provides AI assistants like Claude and ChatGPT with access to your Radarr (movies) and Sonarr (TV series) data.
This MCP server allows AI assistants to query and manage your movie and TV show collection via Radarr and Sonarr APIs. Built with the ModelContextProtocol SDK, it implements the standardized protocol for AI context that Claude Desktop, ChatGPT Desktop, and other MCP-compatible clients can use.
- Native MCP Implementation: Built with ModelContextProtocol SDK for seamless AI integration
- Radarr Integration: Full access to your movie collection (list, search, add, update, delete)
- Sonarr Integration: Complete TV show and episode management
- Rich API Access: Quality profiles, root folders, system status, download queue
- Claude Desktop Compatible: Works seamlessly with Claude Desktop via stdio transport
- Windows-Optimized: Easy setup on Windows 11 with PowerShell scripts
- Self-Contained Executable: No .NET runtime installation required
- Well-Tested: Comprehensive xUnit test suite for reliability
-
Clone and Build:
git clone https://github.com/yourusername/radarr-sonarr-mcp.git cd radarr-sonarr-mcp .\publish.ps1 # Or specify a custom output path: # .\publish.ps1 -OutputPath "C:\MyApps\MCP"
-
Configure:
- Edit
RadarrSonarrMcp\bin\Release\net8.0\win-x64\publish\config.json - Add your Radarr/Sonarr API keys and server details
- Edit
-
Connect to Desktop App:
- Claude Desktop: Settings → Developer → Edit Config
- ChatGPT Desktop: Settings → MCP Servers
- Add the executable path (see example config files)
-
Test:
- Restart your desktop app
- Ask: "What movies do I have in Radarr?"
📖 See QUICKSTART.md for the fastest setup
📖 See WINDOWS_SETUP.md for detailed instructions
For development, you can run directly from the Debug build:
# Build
dotnet build
# Run (stdio mode - for Claude Desktop)
dotnet run --project RadarrSonarrMcp
# Run (HTTP mode - for web-based clients)
dotnet run --project RadarrSonarrMcp -- --http
# Test
dotnet testThis MCP server supports two transport modes:
- Best for: Claude Desktop, ChatGPT Desktop, and other desktop MCP clients
- How to use: Run without any flags (default mode)
- Command:
dotnet runor just execute the built .exe - Communication: Standard input/output streams
- Best for: Web-based clients, custom integrations, testing with HTTP tools
- How to use: Add
--httpor--mode=httpflag when running - Command:
dotnet run -- --http - Port: Configured in
config.json(default: 3000) - Endpoint:
http://localhost:3000(or your configured port)
Example HTTP mode:
# Run in HTTP mode
dotnet run --project RadarrSonarrMcp -- --http
# Or from published executable
.\RadarrSonarrMcp.exe --httpThe server will display which mode it's running in at startup:
Radarr/Sonarr MCP Server
========================
Loaded configuration:
Server IP: localhost
Sonarr URL: http://localhost:8989/api/v3
Radarr URL: http://localhost:7878/api/v3
Transport Mode: HTTP
HTTP Port: 3000
Starting HTTP MCP server...
Server listening on: http://localhost:3000
Edit the config.json file in the same directory as the executable:
{
"ServicesServerConfig": {
"Ip": "localhost",
"Port": "7878"
},
"RadarrConfig": {
"ApiKey": "YOUR_RADARR_API_KEY",
"BasePath": "/api/v3",
"Port": "7878"
},
"SonarrConfig": {
"ApiKey": "YOUR_SONARR_API_KEY",
"BasePath": "/api/v3",
"Port": "8989"
},
"PlexConfig": {
"BaseUrl": "http://localhost:32400",
"Token": "YOUR_PLEX_TOKEN"
},
"McpServerConfig": {
"Port": 3000,
"UseHttps": false
}
}Note: The McpServerConfig settings are only used when running in HTTP mode.
To enable HTTPS for HTTP mode:
-
Trust the development certificate (one-time setup):
dotnet dev-certs https --trust
-
Enable HTTPS in config.json:
"McpServerConfig": { "Port": 3000, "UseHttps": true }
-
Run in HTTP mode:
dotnet run -- --http # Server will listen on https://localhost:3000
Note: HTTPS is only available in HTTP transport mode. stdio mode (default for Claude Desktop) does not use HTTPS.
Radarr API Key:
- Open Radarr in your browser
- Go to Settings → General → Security
- Copy the API Key
Sonarr API Key:
- Open Sonarr in your browser
- Go to Settings → General → Security
- Copy the API Key
radarr_get_all_movies- Get all movies in your libraryradarr_get_movie_by_id- Get details for a specific movieradarr_search_movies- Search for movies to addradarr_add_movie- Add a new movie to Radarrradarr_update_movie- Update movie settingsradarr_delete_movie- Delete a movie from Radarrradarr_get_queue- View the download queueradarr_get_missing_movies- Get monitored movies that are missingradarr_execute_command- Execute commands (MovieSearch, RefreshMovie, etc.)radarr_get_system_status- Get Radarr system informationradarr_get_root_folders- Get configured root foldersradarr_get_quality_profiles- Get quality profiles
sonarr_get_all_series- Get all TV series in your librarysonarr_get_series- Get details for a specific seriessonarr_add_series- Add a new TV series to Sonarrsonarr_update_series- Update series settingssonarr_get_episodes- Get episodes for a seriessonarr_get_missing_episodes- Get monitored episodes that are missingsonarr_execute_command- Execute commands (SeriesSearch, EpisodeSearch, etc.)sonarr_get_queue- View the download queuesonarr_get_system_status- Get Sonarr system informationsonarr_get_root_folders- Get configured root folderssonarr_get_quality_profiles- Get quality profiles
Once connected, you can ask ChatGPT or Claude:
- "What movies do I have in Radarr?"
- "Search for The Matrix and add it to Radarr"
- "What TV shows am I tracking in Sonarr?"
- "Show me my missing episodes"
- "Add Breaking Bad to Sonarr"
- "What's in my download queue?"
- "Update Game of Thrones to use the HD quality profile"
# Build the project
dotnet build
# Run the project
dotnet run --project RadarrSonarrMcp
# Publish a release build
.\publish.ps1# Run all tests
dotnet test
# Run tests with coverage
dotnet test /p:CollectCoverage=trueRadarrSonarrMcp/
├── Configuration/ # Configuration models
├── Models/ # Data models for Radarr/Sonarr
├── Services/ # API service implementations
├── RadarrTools.cs # Radarr MCP tool definitions
├── SonarrTools.cs # Sonarr MCP tool definitions
└── Program.cs # Main entry point
RadarrSonarrMcp.Tests/
├── Configuration/ # Config tests
├── Models/ # Model tests
└── Services/ # Service tests
- .NET 8.0 - Runtime
- C# 12 - Language
- ModelContextProtocol SDK - MCP implementation
- xUnit - Testing framework
- FluentAssertions - Assertion library
- Moq - Mocking framework
- The watched/watchlist status functionality assumes these are tracked using specific mechanisms in Radarr/Sonarr. You may need to adapt this to your specific setup.
- For security reasons, it's recommended to run this server only on your local network.