qbittorrent-readonly-mcp
Provides read-only access to a qBittorrent instance, enabling health summaries, torrent listing and filtering, detailed torrent information, problem torrent identification, and analysis of the largest torrents.
Click on "Install 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-readonly-mcpWhat's the current health and any problem torrents?"
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 Read-only MCP
This is an independently maintained read-only MCP project for qBittorrent. It wraps qBittorrent Web API queries as local stdio MCP tools, enabling AI clients to perform real-time diagnostics directly.
Security Model
Supports
stdioonly; does not listen on any network port.The qBittorrent address and API Key are read only from the environment or an external secrets file; MCP tool arguments cannot override the connection target.
Clients are only allowed to use a fixed set of GET endpoints; there are no generic request, URL, or endpoint tools.
No write tools are registered for adding, pausing, resuming, verifying, deleting, moving, changing trackers, or changing settings.
Full tracker URLs, passkeys, magnet links, cookies, and authentication information never appear in tool results.
The qBittorrent API Key itself still has full Web API permissions; read-only behavior is guaranteed by the service's two-layer allowlist and tests.
This MCP does not perform recursive file system scans; its scope is limited to real-time qBittorrent queries.
Related MCP server: Bitcoin Node MCP Server
Tools
get_health_summary: Version, speed, torrent status, and exception summary.list_torrents: Filter torrents by status, category, minimum size, and days of inactivity.get_torrent_details: Retrieve safe fields, files, and tracker hostnames by an Info Hash prefix of at least 8 characters.list_problem_torrents: List torrents withmissingFiles, errors, and stalled incomplete torrents.analyze_largest_torrents: Analyze the Top N torrents by logical size.
Environment Requirements
Python 3.10+
uvThe following are expected to be present in a secrets file outside the project:
QBIT_URLQBIT_API_KEY
By default, they are read from the process environment. Alternatively, you can pass only the path to the secrets file:
export QBIT_MCP_ENV_FILE="/path/to/secrets/nas-audit.env"Do not copy the Key into this directory or into the Codex configuration.
Installation and Testing
cd /path/to/qbittorrent-readonly-mcp
uv sync
uv run pytestReal read-only smoke test (outputs only tool names and redaction check results):
uv run python scripts/live_smoke.py \
--env-file /path/to/secrets/nas-audit.envStart locally:
QBIT_MCP_ENV_FILE="/path/to/secrets/nas-audit.env" \
uv run qbittorrent-readonly-mcpOnce the service starts, it uses stdin/stdout to communicate via the MCP protocol; no ordinary interactive prompt is displayed.
Codex Configuration
Codex supports configuring a local STDIO MCP in a trusted project's .codex/config.toml. The following is an example configuration; only the secrets file path is passed here, and the API Key is not written into the configuration. The actual path should be maintained by the host project that uses this MCP:
[mcp_servers.qbittorrent_readonly]
command = "/path/to/qbittorrent-readonly-mcp/.venv/bin/qbittorrent-readonly-mcp"
args = []
cwd = "/path/to/qbittorrent-readonly-mcp"
enabled = true
required = false
startup_timeout_sec = 20
tool_timeout_sec = 60
default_tools_approval_mode = "auto"
enabled_tools = [
"get_health_summary",
"list_torrents",
"get_torrent_details",
"list_problem_torrents",
"analyze_largest_torrents",
]
[mcp_servers.qbittorrent_readonly.env]
QBIT_MCP_ENV_FILE = "/path/to/secrets/nas-audit.env"This repository does not store any Codex configuration or any credentials. Callers only need to reference this project's startup command and pass in the path to a secrets file located outside the project.
For Codex MCP configuration, refer to the OpenAI official documentation. The Python implementation uses the Model Context Protocol official Python SDK.
Development
Core layers:
MCP tools
-> ReadOnlyQbitService(筛选、聚合、固定输出)
-> QbitReadOnlyClient(固定 GET allowlist)
-> qBittorrent Web APIAny new endpoint must first be added to READ_ONLY_ENDPOINTS, and tests must be added for “non-allowlist rejection” and “no leakage of sensitive fields”.
Available Tools
5 toolsanalyze_largest_torrentsBRead-onlyIdempotent
Return the largest torrents, optionally limited to a minimum inactivity age.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| inactive_days | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already communicate read-only, idempotent, and non-destructive behavior. The description adds useful selection semantics (size-based ordering and the inactivity-age filter) but does not disclose details such as how results are capped or ordered beyond the word 'largest'.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The entire description is one front-loaded sentence with no filler. Every phrase contributes either the core behavior or the optional filter.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple two-parameter schema, the presence of an output schema, and annotations that cover safety/idempotency, the description covers the essential behavior. It is only missing explicit sibling differentiation and a more concrete statement of the limit parameter's effect.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description must compensate, and it does clarify inactive_days as a 'minimum inactivity age'. However, the limit parameter is not explained; its meaning is only implied by the word 'largest' and the schema's default of 20.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb and resource: 'Return the largest torrents', with an optional inactivity-age filter. It uniquely identifies the tool's role among siblings through the 'largest' qualifier, though it does not explicitly contrast it with list_torrents.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No when-to-use or when-not-to-use guidance is provided, and no alternatives are named. An agent is left to infer that this should be chosen over list_torrents or list_problem_torrents based solely on the phrase 'largest torrents'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_health_summaryARead-onlyIdempotent
Return versions, transfer speeds, task state counts, and read-only problem summary.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already establish readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the description does not need to repeat safety properties. It adds a little context with the list of returned aggregates, but no extra behavioral disclosures such as auth or failure modes.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One compact sentence with a strong verb and a clear list of result categories. No redundant qualifiers or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless read-only health summary with an output schema and full annotations, the description covers everything needed to invoke it. It does not need to elaborate on return layout since the schema exists.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, so no parameter documentation is required; the schema coverage is effectively complete. The description's mention of returned fields avoids any need to compensate for parameter gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Return' and names versions, transfer speeds, task state counts, and a problem summary, making the resource and scope clear. The system-level content clearly separates it from torrent-scoped siblings like list_torrents and analyze_largest_torrents.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No when-to-use or alternative-selection guidance is given. The description only states what is returned; it does not say when to prefer get_health_summary over get_torrent_details or list_problem_torrents.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_torrent_detailsARead-onlyIdempotent
Get safe details for one torrent using an 8+ character hexadecimal Info Hash prefix.
| Name | Required | Description | Default |
|---|---|---|---|
| identifier | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds little behavioral detail beyond the hash-prefix input requirement; 'safe' is redundant with the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One sentence with no filler. The primary action and scope are front-loaded, and the input format requirement is stated compactly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple: one parameter, clear annotations, and an output schema that can cover return values. The main missing piece is guidance on when to use this tool instead of siblings, but that is not critical for a single-parameter lookup.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must explain the opaque 'identifier' parameter. It does so clearly by specifying that it is an 8+ character hexadecimal Info Hash prefix, giving the agent a precise format to validate against.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states a specific verb ('get'), a specific resource ('details for one torrent'), and the required input form ('8+ character hexadecimal Info Hash prefix'). It distinguishes itself from sibling list/analysis tools by emphasizing single-torrent scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'for one torrent' implies the tool is appropriate when a single torrent's details are needed, but there is no explicit guidance about when not to use it or which sibling to prefer. Usage context is implied rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_problem_torrentsARead-onlyIdempotent
List missing, errored, unknown, or incomplete stalled/stopped torrents.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already disclose readOnly, idempotent, and non-destructive behavior, so the description does not repeat that. It adds filtering scope, but provides no extra behavioral context such as pagination, ordering, or result size details beyond the schema's default limit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no filler. It conveys the action and the precise inclusion criteria efficiently, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a low-complexity, read-only tool with no required parameters, an output schema, and clear annotations, the description is nearly complete. The main omission is guidance on the limit parameter, but the schema default and output schema mitigate the impact.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description says nothing about the 'limit' parameter. The parameter name and default value suggest the basic meaning, but the description does not clarify how limiting behaves, such as whether results are truncated or how a custom limit affects the response.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb, 'List', and identifies a distinct resource: problem torrents, explicitly naming the statuses included (missing, errored, unknown, or incomplete stalled/stopped). This clearly differentiates it from the generic sibling list_torrents.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The wording implies this tool is for finding torrents in problematic states, especially stalled or stopped ones, rather than for general listing. However, it does not explicitly mention sibling alternatives or state conditions for when this tool should not be used.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_torrentsCRead-onlyIdempotent
List torrents using local filters; no filter value is sent as an arbitrary API endpoint.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| state | No | ||
| category | No | ||
| min_size_gib | No | ||
| inactive_days | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover the safety profile (readOnlyHint=true, idempotentHint=true, destructiveHint=false). The description adds that filters are applied locally, but the phrase 'no filter value is sent as an arbitrary API endpoint' is vague and potentially confusing. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is brief and the main verb/resource is front-loaded, which is good. However, the second clause is cryptic and does not earn its place, and the overall terseness borders on under-specification rather than deliberate conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With five optional parameters, zero schema descriptions, and sibling tools that perform related listing/filtering tasks, the description is too sparse. It does not explain what the returned output contains, how filters interact, or when this tool is preferable to list_problem_torrents or analyze_largest_torrents.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for the five undocumented parameters, but it only says 'using local filters' without explaining limit, state, category, min_size_gib, or inactive_days. The parameter names are somewhat self-explanatory, but the description adds essentially no parameter-level meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the verb ('List') and resource ('torrents') clearly, and the phrase 'using local filters' signals that filtering is done client-side. However, the second clause about arbitrary API endpoints is confusing and does little to distinguish this tool from siblings like get_torrent_details or list_problem_torrents.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance is given for when to use this tool versus alternatives such as get_torrent_details, list_problem_torrents, or analyze_largest_torrents. The 'local filters' hint implies a listing use case, but there are no exclusions, prerequisites, or decision rules.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v0.1.0- First observed
analyze_largest_torrents - First observed
get_health_summary - First observed
get_torrent_details - First observed
list_problem_torrents - First observed
list_torrents
TDQS
Each tool targets a distinct monitoring concern: aggregate health, general torrent listing, per-torrent details, problem triage, and size/inactivity analysis. The two list-like tools are clearly differentiated by filtering to problem torrents versus all torrents.
All tool names follow a consistent snake_case verb_noun pattern (get_*, list_*, analyze_*). There are no mixed conventions or vague one-word identifiers.
Five tools is a well-scoped set for a read-only qBittorrent monitoring server. Each tool provides a distinct capability without redundancy.
The surface covers the main read-only workflow: health summary, listing, details, problem identification, and size analysis. Minor gaps exist around lower-level details like trackers or peer lists, but agents can accomplish core monitoring without dead ends.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
Read-only MCP tools for AI agent discovery, structured resources, and NIULAI information.
Read-only DERO blockchain MCP: 33 tools (12 composites) incl. TELA discovery + bundled docs.
Read-only developer, date, finance, and text utilities. Authless remote MCP server by Clean.tools.
Related MCP Servers
- FlicenseAqualityBmaintenanceRead-only MCP server for self-hosted Telegram access via Telethon. Enables reading messages, chats, and media but disallows any write operations.10-
- AlicenseNot gradedqualityCmaintenanceRead-only MCP server that monitors a Bitcoin Core full node via JSON-RPC, providing tools to check node status, network info, mempool, and peer information.MIT
- AlicenseNot gradedqualityDmaintenanceA locally-run, read-only MCP server that lets an LLM client diagnose a self-hosted *arr media stack by aggregating across Sonarr, Radarr, Prowlarr, qBittorrent, Tdarr, and Profilarr.Apache 2.0
- FlicenseBqualityCmaintenanceRead-only Proxmox VE MCP server providing 25 tools for VM, LXC, node, storage, and cluster inspection via stdio transport.25-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/XiaotaoGuo/qbittorrent-readonly-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server