rqbit

by philogicae

Not rated
GitHub

About

Interact with the rqbit torrent client API. Requires a running rqbit instance.

Details

Author
philogicae
Categories
Communication, Developer Tools

Setup

Install rqbit in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/philogicae/rqbit-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

Python API Wrapper & MCP Server for rqbit

This repository provides a Python API wrapper and an MCP (Model Context Protocol) server for therqbittorrent client. It allows for easy integration into other applications or services.

- Features
-
Setup

- Prerequisites
-
Configuration
-
Installation

- Install from PyPI (Recommended)
-
For Local Development
-
For Docker

- As Python API Wrapper
-
As MCP Server
-
Via MCP Clients

- Example with Windsurf

- API wrapper for therqbittorrent client.
- MCP server interface for standardized communication (stdio, sse, streamable-http)
- Tools:

- list_torrents: List all torrents and their details.
- download_torrent: Download a torrent from a magnet link or a file.
- get_torrent_details: Get detailed information about a specific torrent.
- get_torrent_stats: Get stats/status of a specific torrent.
- pause_torrent: Pause a torrent.
- start_torrent: Start a torrent.
- forget_torrent: Forget a torrent, keeping the files.
- delete_torrent: Delete a torrent and its files.

- An running instance ofrqbit. (Included in docker compose)
- Python 3.10+ (required for PyPI install).
-
uv(for local development)

This application requires the URL of yourrqbitinstance.

Set Environment Variable: Copy.env.exampleto.envin your project's root directory and edit it with your settings. The application will automatically load variables from.env:

- MCP Server:

- RQBIT_URL: The URL of the rqbit instance (Default:http://localhost:3030).
- RQBIT_HTTP_BASIC_AUTH_USERPASS: If setup in rqbit instance.

- RQBIT_HTTP_BASIC_AUTH_USERPASS: The username and password for basic authentication, in the formatusername:password.
- RQBIT_HTTP_API_LISTEN_ADDR: The listen address for the HTTP API (e.g.,0.0.0.0:3030).
- RQBIT_UPNP_SERVER_ENABLE: Enables or disables the UPnP server (e.g.,trueorfalse).
- RQBIT_UPNP_SERVER_FRIENDLY_NAME: The friendly name for the UPnP server (e.g.,rqbit-media).
- RQBIT_EXPERIMENTAL_UTP_LISTEN_ENABLE: Enables or disables the uTP listener (Default:false).
- Check
rqbitfor other variables and more information.

Choose one of the following installation methods.

This method is best for using the package as a library or running the server without modifying the code.
- Create a.envfile in the directory where you'll run the application and add yourrqbitURL:

This method is for contributors who want to modify the source code. Usinguv:

git clone https://github.com/philogicae/rqbit-mcp.git cd rqbit-mcp

- Create your configuration file by copying the example and add your settings:

This method uses Docker to run the server in a container. compose.yaml includesrqbittorrent client.
- Clone the repository (if you haven't already):

git clone https://github.com/philogicae/rqbit-mcp.git cd rqbit-mcp

- Create your configuration file by copying the example and add your settings:
- Build and run the container using Docker Compose (default port: 8000):

import asyncio from rqbit_client.wrapper import RqbitClient async def main(): # Read the RQBIT_URL from the .env file or fallback to default (http://localhost:3030) async with RqbitClient() as client: # Download a torrent magnet_link = "magnet:?xt=urn:btih:..." torrent = await client.download_torrent(magnet_link) print(torrent) # Check status status = await client.get_torrent_stats(torrent["id"]) print(status) # List torrents torrents = await client.list_torrents() print(torrents) if __name__ == "__main__": asyncio.run(main())
from rqbit_client import RqbitMCP RqbitMCP.run(transport="sse") # 'stdio', 'sse', or 'streamable-http'

Usable with any MCP-compatible client. Available tools:

- list_torrents: List all torrents.
- download_torrent: Download a torrent via magnet link or file path.
- get_torrent_details: Get details of a specific torrent.
- get_torrent_stats: Get stats/status of a specific torrent.
- pause_torrent: Pause a torrent.
- start_torrent: Start a torrent.
- forget_torrent: Forget a torrent, keeping the files.
- delete_torrent: Delete a torrent and its files.

{ "mcpServers": { ... # with stdio (only requires uv) "rqbit-mcp": { "command": "uvx", "args": [ "rqbit-mcp" ], "env": { "RQBIT_URL": "http://localhost:3030", # (Optional) Default rqbit instance URL "RQBIT_HTTP_BASIC_AUTH_USERPASS": "username:password" # (Optional) Only if setup in rqbit instance } }, # with docker (only requires docker) "rqbit-mcp": { "command": "docker", "args": [ "run", "-i", "-p", "8000:8000", "-e", "RQBIT_URL=http://localhost:3030", "-e", "RQBIT_HTTP_BASIC_AUTH_USERPASS=username:password", "philogicae/rqbit-mcp:latest", "rqbit-mcp" ] }, # with sse transport (requires installation) "rqbit-mcp": { "serverUrl": "http://127.0.0.1:8000/sse" }, # with streamable-http transport (requires installation) "rqbit-mcp": { "serverUrl": "http://127.0.0.1:8000/mcp" }, ... } }

SeeCHANGELOG.mdfor a history of changes to this project.

Contributions are welcome! Please open an issue or submit a pull request.

This project is licensed under the MIT License - see theLICENSEfile for details.

MCP server for API documentation, supporting GraphQL, OpenAPI/Swagger, and gRPC from local files or remote URLs

Fetches random LGTM (Looks Good To Me) images for use in code reviews and developer communications.

Sends HTTP requests to endpoints on the local network.

A standalone proxy to connect STDIO-based MCP clients with HTTP (SSE) based MCP servers.

Enables AI models to prompt users for input directly within their code editor for interactive conversations.

Mobile proxies, SMS verifications, and global eSIM data plans for AI agents and MCP clients.

Create crafted UI components inspired by the best 21st.dev design engineers.

Bring agent evaluations, observability, and synthetic test set generation directly into your IDE for free with Galileo's new MCP server

An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.