qbittorrent-mcp
Provides tools to manage torrents through the qBittorrent WebUI API, including adding, deleting, pausing, and resuming torrents; inspecting and editing trackers, tags, and files; renaming torrents and their contents; setting file priorities and speed limits; and searching for torrents.
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., "@qbittorrent-mcp list all torrents that are currently downloading"
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.
qbittorrent-mcp
English | 简体中文
An MCP server that manages torrents through the qBittorrent WebUI API. Once connected, an AI assistant can add, pause, rate-limit and rename torrents directly, and search for resources.
Features
Category | Tools |
Torrent management |
|
Torrent details |
|
File management |
|
File priority |
|
Speed limits |
|
Search and info |
|
Related MCP server: qBittorrent MCP Server
Requirements
Python 3.14 or later
qBittorrent with the WebUI enabled, reachable from the machine running this server
For
search_torrents, a search plugin enabled in qBittorrent
Installation
git clone <repository-url>
cd qbittorrent-mcp
uv syncConfiguration
Set the following environment variables, for example in your shell profile or in the MCP client's env configuration:
export QBITTORRENT_HOST=http://127.0.0.1:8080
export QBITTORRENT_USERNAME=admin
export QBITTORRENT_PASSWORD=adminadminVariable | Description | Default |
| WebUI address, including protocol and port |
|
| WebUI username |
|
| WebUI password |
|
If a variable is not set, the default shown above is used.
Running
The server uses the stdio transport and is normally launched by an MCP client, so you do not need to run it manually. For a local check:
uv run qbittorrent-mcpConnecting an MCP client
Example using the mcpServers configuration format (such as Claude Desktop):
{
"mcpServers": {
"qbittorrent": {
"command": "/absolute/path/to/qbittorrent-mcp/.venv/bin/qbittorrent-mcp"
}
}
}Replace the path with the absolute path to this project's .venv/bin/qbittorrent-mcp (run uv sync first to create it). To pass credentials, add an env block to the server entry:
{
"mcpServers": {
"qbittorrent": {
"command": "/absolute/path/to/qbittorrent-mcp/.venv/bin/qbittorrent-mcp",
"env": {
"QBITTORRENT_HOST": "http://127.0.0.1:8080",
"QBITTORRENT_USERNAME": "admin",
"QBITTORRENT_PASSWORD": "adminadmin"
}
}
}
}Usage examples
Describe what you need in natural language, for example:
"List all torrents that are downloading"
"Pause the torrent with hash
xxx""Set the global upload limit to 1 MB/s"
"Show the files of a torrent and rename the first one to
movie.mkv""Search for Ubuntu 24.04 and list the results with the most seeders"
Notes
delete_torrentwithdelete_files=Truepermanently deletes downloaded files, andhashesset toalldeletes every torrent. Double-check before running.The
old_pathofrename_torrent_filemust exactly match the file's relative path inside the torrent, including directories. Useget_torrent_filesto get it.rename_torrent_folderrenames a folder inside a torrent and requires qBittorrent v4.4.0 or later.old_pathmust be an existing folder path relative to the torrent root.batch_renametakes a JSON array of{old_path, new_path, type}items (typeisfileorfolder, defaults tofile) and executes them sequentially in the given order. Renaming a folder changes the paths of everything inside it, so order operations accordingly. A failed item does not stop the rest.search_torrentsfilters out results larger thanmax_size_gb(default 5 GB) and returns the top 10 by seeders.Speed limits are in bytes per second.
Tool errors are returned to the client as strings and do not stop the server.
Project structure
src/qbittorrent_mcp/
├── api.py # Async functions that call the qBittorrent WebUI API
└── mcp.py # MCP server and tool registration; entry point is main()License
See LICENSE.
Available Tools
20 toolsadd_torrentB
Add torrent files to qBittorrent
Args: query: Query string containing torrent file path, supports the following formats: 1. JSON string: "{"file_paths": ["path/to/file1.torrent", "path/to/file2.torrent"]}" 2. JSON string: "["path/to/file1.torrent", "path/to/file2.torrent"]" 3. Single file path: "path/to/file.torrent"
Returns: Status and message of the add operation
Inputs: query (required). Returns: result
add_torrent_tagsB
Add torrent tags
Args: hash: Torrent hash value tags: Tag list, multiple tags separated by comma
Returns: Result message of adding torrent tags
Inputs: hash (required), tags (required). Returns: result
add_trackers_to_torrentC
Add trackers to torrent
Args: hash: Torrent hash value trackers: Tracker URL, multiple URLs separated by %0A
Returns: Result message of adding trackers
Inputs: hash (required), trackers (required). Returns: result
batch_renameA
Rename multiple files and folders inside a torrent in one batch
Args: hash: Torrent hash value renames: JSON array of rename operations, executed sequentially in the given order. Each item: {"old_path": "current/path", "new_path": "new/path", "type": "file" or "folder"} "type" is optional and defaults to "file". Note: renaming a folder changes the paths of everything inside it, so order the operations accordingly.
Returns: Summary with per-item results; a failed item does not stop the rest
Inputs: hash (required), renames (required). Returns: result
delete_torrentB
Delete torrents from qBittorrent
Args: hashes: Torrent hash values to delete, multiple hashes separated by |, or use 'all' to delete all torrents delete_files: If True, also delete downloaded files
Returns: Result message of delete operation
Inputs: hashes (required), delete_files. Returns: result
get_application_versionA
Get qBittorrent version
Returns: qBittorrent version
Inputs: no named parameters. Returns: result
get_torrent_filesA
List files inside a torrent
Args: hash: Torrent hash value
Returns: Formatted list of files with index (used as id for set_file_priority), name (used as old_path for rename_torrent_file), size, progress and priority
Inputs: hash (required). Returns: result
get_torrent_listC
Get torrent list
Inputs: no named parameters. Returns: result
get_torrent_trackersC
Get torrent trackers
Args: hash: Torrent hash value
Returns: String containing tracker information
Inputs: hash (required). Returns: result
pause_torrentB
Pause torrents
Args: hashes: Torrent hash values to pause, multiple hashes separated by |, or use 'all' to pause all torrents
Returns: Result message of pause operation
Inputs: hashes (required). Returns: result
rename_torrentA
Rename a torrent (the name shown in qBittorrent)
Args: hash: Torrent hash value name: New torrent name
Returns: Result message of renaming the torrent
Inputs: hash (required), name (required). Returns: result
rename_torrent_fileB
Rename a file inside a torrent
Args: hash: Torrent hash value old_path: Current file path inside the torrent (relative to the torrent root, get it from the file list) new_path: New file path inside the torrent (relative to the torrent root, keep the same directory structure)
Returns: Result message of renaming the file
Inputs: hash (required), new_path (required), old_path (required). Returns: result
rename_torrent_folderA
Rename a folder inside a torrent (requires qBittorrent v4.4.0 or later)
Args: hash: Torrent hash value old_path: Current folder path inside the torrent (relative to the torrent root) new_path: New folder path inside the torrent (relative to the torrent root, keep the same parent directory)
Returns: Result message of renaming the folder
Inputs: hash (required), new_path (required), old_path (required). Returns: result
resume_torrentB
Resume torrents
Args: hashes: Torrent hash values to resume, multiple hashes separated by |, or use 'all' to resume all torrents
Returns: Result message of resume operation
Inputs: hashes (required). Returns: result
search_torrentsA
搜索种子
Args: pattern: 搜索关键词 category: 搜索类别 (all, movies, anime, books, tv, software等),默认为all plugins: 搜索插件 (all或特定插件),默认为all max_size_gb: 最大文件大小限制(GB),默认为5GB。结果会过滤掉大于此大小的文件
Returns: 搜索结果的JSON字符串,包含过滤和排序后的top 10结果,按种子数(nbSeeders)降序排列
Inputs: pattern (required), plugins, category, max_size_gb. Returns: result
set_file_priorityB
Set file priority
Args: hash: Torrent hash value id: correspond to file position inside the array returned by torrent contents API, e.g. id=0 for first file, id=1 for second file, etc. priority: Value Description 0 Do not download 1 Normal priority 6 High priority 7 Maximal priority
Returns: Result message of setting file priority HTTP Status Code Scenario 400 Priority is invalid 400 At least one file id is not a valid integer 404 Torrent hash was not found 409 Torrent metadata hasn't downloaded yet 409 At least one file id was not found 200 All other scenarios
Inputs: id (required), hash (required), priority (required). Returns: result
set_global_download_limitC
Set global download speed limit
Args: limit: Speed limit value, in bytes/second
Returns: Result message of setting speed limit
Inputs: limit (required). Returns: result
set_global_upload_limitC
Set global upload speed limit
Args: limit: Speed limit value, in bytes/second
Returns: Result message of setting speed limit
Inputs: limit (required). Returns: result
set_torrent_download_limitC
Set torrent download speed limit
Args: hash: Torrent hash value limit: Speed limit value, in bytes/second
Returns: Result message of setting torrent download speed limit
Inputs: hash (required), limit (required). Returns: result
set_torrent_upload_limitC
Set torrent upload speed limit
Args: hash: Torrent hash value limit: Speed limit value, in bytes/second
Returns: Result message of setting torrent upload speed limit
Inputs: hash (required), limit (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Most tools have clearly distinct resource+action targets, and descriptions clarify the rename tiers (torrent vs file vs folder vs batch) and the four speed-limit tools. The main soft spot is get_torrent_list vs search_torrents, which sound like they both search torrents but actually hit local vs external indexers, and that distinction is buried in a Chinese-only description.
Strong, predictable verb_noun snake_case pattern (add_torrent, delete_torrent, pause_torrent, get_torrent_files, set_torrent_download_limit). Minor deviations like add_trackers_to_torrent and the object-order get_torrent_list keep it from a perfect score but remain readable and unambiguous.
20 tools sits in the borderline-heavy band for a single-client integration. There is visible granularity inflation: four speed-limit setters (global/torrent × up/down) and four rename variants where batch_rename already subsumes the file/folder cases.
Core lifecycle is covered (add, delete, pause, resume, list, files, trackers, tags, priority, limits, renames), so agents can do the main workflows. But there are notable gaps: no read-back for global/torrent limits, no torrent properties/info endpoint, no category management, and no removal of trackers or tags, which will dead-end common management tasks.
Maintenance
Related MCP Connectors
Read and write your own Microsoft To Do, Google Tasks or Todoist tasks from any AI agent.
Todoist tasks, projects and labels for AI assistants, plus AI prioritization. Needs a Todoist token.
Manage Superlist tasks and lists in plain language from any MCP-compatible AI agent.
Search photos and video moments by visual meaning, people, dates, and folders across local libraries, Apple Photos, and OneDrive. Manage collections, groups, favorites, people, and duplicate review. Synced metadata remains searchable while the desktop is offline; local and Apple Photos media access needs the owning device online with remote access enabled. OneDrive media can be accessed directly from the cloud. OAuth or Bearer API keys. Paid Cloud Access required; hosted visual search uses prepaid credits. Text-in-image search is semantic matching, not guaranteed exact OCR. Setup: https://organizewith.ai/en/guides/connect-ai-assistants
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA service that provides programmatic access to qBittorrent's WebUI API, enabling management of torrents, trackers, tags, speed controls, and system information through natural language.29-
- 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-
- AlicenseAqualityCmaintenanceEnables control of a qBittorrent instance via its WebUI API, supporting torrent management, category management, and transfer information with cookie-session authentication.141MIT
- AlicenseAqualityAmaintenanceManage qBittorrent from your agent: eleven intent-shaped tools across multiple instances, plus a qb_diagnose that explains why nothing is uploading.111Apache 2.0