torrent-mcp
Finds candidate movie/TV titles from IMDb list pages and uses IMDb IDs to check whether titles are already queued or in a Plex library.
Optionally checks candidates against a Plex export to identify titles already present in a Plex library.
Manages qBittorrent RSS queue profiles, including adding, removing, listing queue entries, switching Jackett indexers, archiving downloads, and backing up queue configuration.
Click on "Deploy 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., "@torrent-mcp Search Jackett for Interstellar 4K and add it to the movies queue"
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.
torrent-mcp
A personal movie/series torrent-queue pipeline — IMDb list scraping, OMDb title lookups, Jackett search, and qBittorrent RSS queue management — as a tested Python library, a CLI, and an MCP server so a natural-language client (a Telegram bot, Claude Desktop, etc.) can drive the whole thing in plain English.
This replaces a folder of ad hoc scripts (B6_imdb-torrents/) that each
hardcoded one person's Jackett API key, OMDb key, LAN IP, and /home/b/...
paths directly in source. All of that is now environment configuration —
see .env.sample — so the code itself has nothing sensitive in it.
What it does
Area | CLI command(s) | MCP tool(s) |
Find candidate titles from an IMDb list page |
|
|
Check IMDb ids against what's already queued (and, optionally, a Plex export) |
|
|
Add/remove/list a queue's |
|
|
Repoint a queue at a different Jackett indexer |
|
|
Jackett indexer discovery & search |
|
|
OMDb title lookups |
|
|
Library maintenance |
|
|
list_profiles (MCP only) reports which queue profiles are configured.
Related MCP server: Arr Suite MCP Server
Install
python -m venv .venv
source .venv/bin/activate
pip install -e .Copy .env.sample to .env and fill in your own OMDB_API_KEY,
JACKETT_URL/JACKETT_API_KEY, and TORRENT_MCP_PROFILES (one entry per
qBittorrent+Jackett RSS queue — movies, series, upgrades, ...). See the
comments in .env.sample for every setting.
CLI
torrent-mcp find-candidates "https://www.imdb.com/list/ls0123456789/"
torrent-mcp check-candidates movies tt1375666 tt0111161
torrent-mcp add-to-queue movies tt1375666 --indexer yts
torrent-mcp list-queue movies --resolve-titles
torrent-mcp switch-indexer movies yts torrentgalaxy
torrent-mcp lookup tt1375666
torrent-mcp --help # full command listMCP server
torrent-mcp-serverRuns over stdio, ready for any MCP client (Claude Desktop, the MCP
Inspector, a custom client) to spawn as a subprocess. Example
claude_desktop_config.json entry:
{
"mcpServers": {
"torrent-mcp": {
"command": "/absolute/path/to/.venv/bin/torrent-mcp-server",
"env": { "OMDB_API_KEY": "...", "JACKETT_API_KEY": "...", "...": "..." }
}
}
}Integration with ocabra_telegram
ocabra_telegram drives
this server the same way it already drives
homebox_mcp — over stdio via
a small JSON-RPC client (homebox_tools.McpStdioClient, reused as-is by
its torrent_tools.py) and bot.py's call_ocabra_with_tools tool-calling
loop, which now runs over whichever backends (Homebox, torrent-mcp, both)
are active for the current user. See that repo's README, "Torrent Queue
Integration", for the TORRENT_MCP_* env vars to set there. Once wired,
Telegram messages like "what's queued for movies?" or "add tt1375666 to
the movies queue" drive this project directly — this project only owns
the MCP server side; the client-side wiring lives in ocabra_telegram.
Development
pip install -e ".[dev]"
pytestTests mock all external HTTP (OMDb, Jackett, IMDb) with
respx and use tmp_path for
filesystem operations — nothing touches the network or a real queue.
Notes on the original scripts
manage_queue/queue_get-titles.pyusedimdbpyto scrape IMDb directly for titles; this project uses OMDb everywhere instead (already needed for other lookups), so there's one metadata dependency, not two.The ten near-identical
switchindexer_*.shscripts (one hardcoded path + container per direction) are now oneswitch-indexercommand parameterized by profile and indexer names.trackers/check_imdbsearch.pylogged into Jackett's dashboard with an admin password before calling its API; the API calls it made only ever needed the API key, so that login step (and the password) is gone.Nothing here runs
sudoor shells out todockerunlessDOCKER_RESTART_ENABLED=true, and then only for a container name from your ownTORRENT_MCP_PROFILESconfig — never a name supplied through a tool call.
Available Tools
18 toolsadd_to_queueA
Add an IMDb id to a queue profile's feeds.json so qBittorrent starts searching for it.
indexer selects which Jackett indexer the feed searches (defaults
to the profile's configured default, then Jackett's aggregate "all").
Fails if the id is already queued unless overwrite is set.
Inputs: imdb_id (required), profile (required), indexer, overwrite.
archive_downloadsA
Move finished downloads (by extension) out of the download client's folders into the archive.
Falls back to ARCHIVE_SOURCE_DIRS/ARCHIVE_DEST_DIR from the server's environment when not given explicitly.
Inputs: dest_dir, source_dirs.
backup_queueB
Back up a queue profile's feeds.json to a timestamped file.
Inputs: profile (required), dest_dir.
check_candidatesB
Split a list of IMDb ids into already-queued, already-in-Plex, and new.
plex_export_xml is optional; pass it to also check a Plex library
XML export for titles already owned but not currently queued.
Inputs: profile (required), imdb_ids (required), plex_export_xml.
check_imdb_search_supportB
Check whether a Jackett indexer supports searching by IMDb id.
Inputs: indexer_id (required).
diff_missing_urlsA
List IMDb title URLs present in an old library export but missing from a newer one.
Inputs: new_export_path (required), old_export_path (required). Returns: result
find_duplicate_filenamesB
Find likely-duplicate filenames in a media directory (e.g. movie.avi vs movie.mp4).
Inputs: directory (required), threshold. Returns: result
find_imdb_candidatesB
Scrape an IMDb list page (e.g. a "coming this year" list) for title ids.
Inputs: list_url (required). Returns: result
find_largest_torrentA
Find the largest-sized search result for an IMDb id on one indexer (highest quality heuristic).
Inputs: imdb_id (required), indexer_id (required). Returns: result
identify_titleB
Guess the IMDb id/title for a messy title (e.g. cleaned-up filename), via OMDb.
Inputs: title_hint (required), year. Returns: result
list_indexersB
List Jackett indexers known to the server.
Inputs: configured_only. Returns: result
list_profilesA
List the configured queue profile names (e.g. "movies", "series").
Inputs: no named parameters. Returns: result
list_queueA
List a queue profile's entries. Set resolve_titles=True to include title/year via OMDb (slower).
Inputs: profile (required), resolve_titles. Returns: result
lookup_titleA
Resolve an IMDb id to its title/year/type via OMDb.
Inputs: imdb_id (required).
remove_from_queueB
Remove an IMDb id from a queue profile's feeds.json.
Inputs: imdb_id (required), profile (required).
search_titleB
Fuzzy-search OMDb by title, optionally narrowed by year.
Inputs: title (required), year. Returns: result
search_torrentsA
Search one Jackett indexer (or "all") for torrents matching an IMDb id.
Inputs: imdb_id (required), indexer_id (required). Returns: result
switch_indexerA
Repoint every feed URL in a queue profile from one Jackett indexer to another.
Set restart to also restart the profile's configured docker
container so qBittorrent reloads feeds.json (requires
DOCKER_RESTART_ENABLED=true on the server).
Inputs: profile (required), new_indexer (required), old_indexer (required), restart.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Most tools are clearly separated by object (profiles, queue entries, indexers, titles, files), and descriptions specify exact inputs and outputs. The main potential confusion is between lookup_title/search_title/identify_title and search_torrents/find_largest_torrent, but their boundary conditions are stated clearly enough.
Every tool uses a consistent snake_case, imperative verb-first naming pattern such as list, add, remove, search, find, or check. Even longer names like check_imdb_search_support and find_duplicate_filenames follow the same convention, making the set predictable.
At 18 tools, this is slightly above the typical sweet spot, but the server spans queue management, indexer operations, metadata resolution, and media-file housekeeping. Each tool maps to a distinct operation, so the count feels broad rather than redundant.
The core pipeline—finding IMDb candidates, checking them against the queue/Plex, adding and removing queue entries, searching indexers, and archiving downloads—is well covered. Minor gaps such as profile creation/deletion and directly adding a found torrent to qBittorrent exist but can be worked around with the available tools.
Related MCP Connectors
Manage Superlist tasks and lists in plain language from any MCP-compatible AI agent.
The media memory layer for AI agents and their humans. Your AI client can search your collection, add and log what you've finished, update ratings and lists, and find patterns across everything you've read, watched, played, and listened to.
YouTube transcripts, IMDb search and podcast search as agent tools.
OMDb MCP — IMDB-derived movie / TV / episode data (BYO key)
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables interaction with qBittorrent through its Web API to search for torrents using search plugins and manage downloads. Supports torrent searching, downloading via URLs/magnet links, and torrent management operations like pause, resume, and delete.73-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to manage media automation services like Sonarr, Radarr, Prowlarr, Bazarr, Overseerr, and Plex through natural language commands.9MIT
- AlicenseBqualityFmaintenanceEnables natural language interaction with MoviePilot media library automation, supporting search, discovery, subscription management, download control, and media status queries.109MIT
- FlicenseAqualityDmaintenanceEnables users to manage Sonarr and Radarr instances through natural language, allowing search, addition, deletion, and monitoring of TV series and movies.60-