Radarr Sonarr 媒体管理
STDIO为AI助手提供影视数据访问的MCP服务器
为AI助手提供影视数据访问的MCP服务器
A Python-based Model Context Protocol (MCP) server that provides AI assistants like Claude with access to your Radarr (movies) and Sonarr (TV series) data.
This MCP server allows AI assistants to query your movie and TV show collection via Radarr and Sonarr APIs. Built with FastMCP, it implements the standardized protocol for AI context that Claude Desktop and other MCP-compatible clients can use.
Clone this repository:
git clone https://github.com/yourusername/radarr-sonarr-mcp.git cd radarr-sonarr-mcp-python
Install the package:
pip install -e .
pip install radarr-sonarr-mcp
Configure the server:
radarr-sonarr-mcp configure
Follow the prompts to enter your Radarr/Sonarr API keys and other settings.
Start the server:
radarr-sonarr-mcp start
Connect Claude Desktop:
http://localhost:3000
(or your configured port)The configuration wizard will guide you through setting up:
You can also manually edit the config.json
file:
{ "nasConfig": { "ip": "10.0.0.23", "port": "7878" }, "radarrConfig": { "apiKey": "YOUR_RADARR_API_KEY", "basePath": "/api/v3", "port": "7878" }, "sonarrConfig": { "apiKey": "YOUR_SONARR_API_KEY", "basePath": "/api/v3", "port": "8989" }, "server": { "port": 3000 } }
This server provides the following tools to Claude:
get_available_movies
- Get a list of movies with optional filterslookup_movie
- Search for a movie by titleget_movie_details
- Get detailed information about a specific movieget_available_series
- Get a list of TV series with optional filterslookup_series
- Search for a TV series by titleget_series_details
- Get detailed information about a specific seriesget_series_episodes
- Get episodes for a specific seriesThe server also provides standard MCP resources:
/movies
- Browse all available movies/series
- Browse all available TV seriesMost tools support various filtering options:
year
- Filter by release yearwatched
- Filter by watched status (true/false)downloaded
- Filter by download status (true/false)watchlist
- Filter by watchlist status (true/false)actors
- Filter by actor/cast nameactresses
- Filter by actress name (movies only)Once your MCP server is connected to Claude Desktop, you can ask questions like:
The package provides a command-line interface:
radarr-sonarr-mcp configure
- Run configuration wizardradarr-sonarr-mcp start
- Start the MCP serverradarr-sonarr-mcp status
- Show the current configurationTo run the test suite:
# Install development dependencies pip install -e ".[dev]" # Run tests pytest # Run tests with coverage pytest --cov=radarr_sonarr_mcp
For quick development and testing:
# Run directly without installation python run.py