qBittorrent管理服务

qBittorrent MCP是一个基于FastMCP的服务,提供与qBittorrent WebUI API交互的功能接口,用于管理种子文件、跟踪器和速度控制。

  • by pickpppcc
  • Python
  • 本地部署
  • 29 星标
  • 更新于
在 GitHub 查看 pickpppcc/qbittorrent-mcp

使用说明

qBittorrent MCP服务

qBittorrent MCP是一项基于FastMCP的服务,提供与qBittornt WebUI API交互的功能接口。

功能列表

此服务提供以下功能:

洪流管理

  • add_torrent:将torrent文件添加到qBittorrent
  • delete_torrent:删除指定的种子(可选删除文件)
  • pause_torrent:暂停种子下载
  • resume_torrent:恢复种子下载
  • get_torrent_list:获取所有种子的列表
  • search_torrents:搜索种子

跟踪器和标签

  • get_torrent_trackers:获取torrent的跟踪列表
  • add_trackers_to_torrent:向torrent添加新跟踪器
  • add_torrent_tags:向torrent添加标签

速度和优先级控制

  • set_global_download_limit:设置全局下载速度限制
  • set_global_upload_limit:设置全局上传速度限制
  • set_torrent_download_limit:为特定种子设置下载速度限制
  • set_torrent_upload_limit:为特定种子设置上传速度限制
  • set_file_priority:设置特定文件的下载优先级

系统信息

  • get_application_version:获取qBittorrent应用程序版本

配置

该服务使用以下配置参数:

  • DEFAULT_HOST:qBittorrent WebUI主机地址
  • DEFAULT_USERNAME:qBittorrent WebUI用户名
  • DEFAULT_PASSWORD:qBittorrent WebUI密码

用法

  1. 确保安装了所需的依赖项:

    pip install httpx mcp
    
  2. 运行MCP服务:

    python main.py
    

发展

该服务分为两个主要文件:

  • main.py:定义MCP服务接口和配置参数
  • api.py:实现与qBittorrent WebUI的交互逻辑
   "mcp_servers": [
        {
            "command": "uv",
            "args": [
                "--directory",
                "/workspace/PC-Canary/apps/qBittorrent/qbittorrent_mcp",
                "run",
                "qbittorrent.py"
            ]
        }
    ]