
MCP/API/WebUI用来程序化查找种子
概览
该仓库提供 Python API/WebUI 和 MCP(模型上下文协议)服务器,用于在 、 、 和 上以程序方式查找种子。它允许用户轻松集成到其他应用或服务中。 用 Docker 运行它,可以绕过常见的 DNS 问题 - 用于 、 、 和 的 API 包装器。- 用于标准化通信(stdio、sse、Streamable-http)的 MCP 服务器接口。- 用于替代 HTTP 访问的 API 服务器接口(例如,用于直接调用 API 调用或测试)。- CLI 模式,用于直接从终端进行一次性快速搜索。- 为 Web UI 交付,popular_torrents缓存 2 分钟;搜索从不缓存(只有相同的并发请求被合并),因此新结果会立即出现。- 内存内 1 小时、5000 条目的种子缓存,仅用于通过 get_torrent 解析磁性链接,无需重新抓取。- 磁性链接始终存储在内部;MCP 除非 INCLUDE_LINKS=true,否则会隐藏它们。- 通过环境变量进行可配置的源过滤。
概述(AI 翻译)
该仓库提供 Python API/WebUI 和 MCP(模型上下文协议)服务器,用于程序化地在 ThePirateBay、1337x、Nyaa、YTS、EZTV、FitGirl、SubsPlease 和 UIndex 上查找种子。它便于与其他应用或服务集成。
快速开始
如何与MCP客户端一起使用
用 Docker 运行,绕过常见的 DNS 问题
直接从命令行搜索
目录
- 特色
- 支持的来源
- 设置
- 先决条件
- 配置
- 安装
- 从 PyPI 安装(推荐)
- 地方发展
- 用于Docker
- 使用情况
- 作为CLI
- 作为 Python 包装器
- 作为MCP服务器
- 作为 API 服务器
- 通过MCP客户端
- 德文的例子
- 更新日志
- 贡献
- 许可证
特色
- ThePirateBay、1337x、Nyaa、YTS、EZTV、FitGirl、SubsPlease 和UIndex的API封装器。
- MCP服务器接口(FastMCP 4),通过
stdio或可流式HTTP(http)服务2026-07-28协议修订版,并自动协商旧握手版本和遗留传输别名(streamable-http、sse。 - 用于替代HTTP访问的API服务器接口(例如:
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Torrent Search MCP/API/WebUI
This repository provides a Python API/WebUI and an MCP (Model Context Protocol) server to find torrents programmatically on ThePirateBay, 1337x, Nyaa, YTS, EZTV, FitGirl, SubsPlease and UIndex. It allows for easy integration into other applications or services.
Quickstart
uvx torrent-search-mcp --mode cli "sample show"
# MCP server over stdio (default)
uvx torrent-search-mcp --mode stdio
# MCP server over streamable HTTP (port 8000, endpoint /mcp)
uvx torrent-search-mcp --mode http
# MCP server over SSE (port 8000, endpoint /sse, legacy)
uvx torrent-search-mcp --mode sse
# Standalone API server (port 8000)
uvx torrent-search-mcp --mode api
Table of Contents
Features
- API wrapper for ThePirateBay, 1337x, Nyaa, YTS, EZTV, FitGirl, SubsPlease and UIndex.
- MCP server interface (FastMCP 4) serving the
2026-07-28protocol revision overstdioor streamable HTTP (http), with automatic negotiation of older handshake revisions and legacy transport aliases (streamable-http,sse).
安装
uvx torrent-search-mcp配置
{
"mcpServers": {
...
# with stdio (only requires uv)
"torrent-search-mcp": {
"command": "uvx",
"args": [ "torrent-search-mcp" ]
},
# with streamable-http transport (Docker compose: MCP on port 8001; standalone server: 8000)
"torrent-search-mcp": {
"serverUrl": "http://127.0.0.1:8001/mcp"
},
# with sse transport (legacy; requires running server)
"torrent-search-mcp": {
"serverUrl": "http://127.0.0.1:8001/sse"
},
...
}
}