arr助理mcp
MCP服务器,用于搜索电影和电视节目并将其添加到Radarr和Sonarr。
设置
需要Python 3.12+和 紫外线 为了地方发展。
git clone
cd arr-assistant-mcp
uv sync从源运行
将此添加到您的 claude_desktop_config.json 直接运行已签出的项目:
{
"mcpServers": {
"arr-assistant": {
"command": "uv",
"args": [
"run",
"--project",
"/path/to/arr-assistant-mcp",
"src/arr_assistant_mcp/main.py"
],
"env": {
"RADARR_URL": "http://your-ip:7878",
"RADARR_API_KEY": "your-radarr-api-key",
"SONARR_URL": "http://your-ip:8989",
"SONARR_API_KEY": "your-sonarr-api-key",
"QUALITY_PROFILE_ID": "1",
"RADARR_ROOT_FOLDER": "/storage/movies",
"SONARR_ROOT_FOLDER": "/storage/shows"
}
}
}
}尾随斜线 RADARR_URL 和 SONARR_URL 自动标准化。
构建MCP捆绑包
打包的发布工件现在应该使用 .mcpb 扩展。
npm install -g @anthropic-ai/mcpb
mcpb validate .
mcpb pack . arr-assistant-mcp.mcpb打开结果 .mcpb Claude Desktop中的文件来安装它。
配置说明
- Radarr/Sonarr API键:设置->常规->API密钥
- 质量概况:使用Radarr或Sonarr实例中的数字配置文件ID
- 根文件夹:如果省略,服务器将自动检测每个服务中的第一个可用根文件夹
- TVDB API密钥:当前实施不需要
工具
test_config()-Radarr和Sonarr的测试配置和连接search_movies(title)-按标题搜索电影add_movie_by_id(tmdb_id, root_folder=None)-将电影添加到Radarrsearch_and_add_show(description, auto_add=False)-搜索电视节目,并可选择自动将唯一匹配项添加到Sonarradd_show_by_tvdb_id(tvdb_id, title, root_folder=None)-向Sonarr添加节目get_server_status()-检查雷达和声纳状态
用法
search_movies("The Matrix")
add_movie_by_id(603)
# Specify a custom root folder
add_show_by_tvdb_id(123456, "Attack on Titan", "/storage/anime")如果没有提供根文件夹,则会从Radarr和Sonarr配置中自动检测到根文件夹,但仍然可以根据请求进行覆盖。
