mteam-mcp
This server provides an MCP interface to the M-Team private BitTorrent tracker, allowing AI agents to search, inspect, and download torrents.
search_torrents: Search for torrents by keyword (or IMDb/Douban URL), search mode (normal/adult), page number/size, category IDs, discount type (e.g. FREE, PERCENT_50), video/audio codec filters, and active/dead status. Returns AI-readable Markdown with torrent IDs, names, sizes, seeders, leechers, and pagination hints.get_torrent_detail: Retrieve detailed metadata for a specific torrent by its numeric ID, including name, category, size, file count, release date, tags, description, seeding/downloading/completion stats, discount status, and external links (IMDb, Douban). Returns AI-readable Markdown.download_torrent: Download a.torrentfile for a given torrent ID to a local directory. The temporary download token is handled internally and never exposed to the model; the result returns only the local saved file path, torrent ID, and bytes written.
Enables Hermes Agent to search, view details, and download torrents from M-Team tracker.
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., "@mteam-mcp search for freeleech torrents of The Matrix"
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.
mteam-mcp
面向 Hermes Agent 的 M-Team MCP Server。通过标准 stdio MCP 提供种子查询、详情查看和 .torrent 文件下载功能。
工具
MCP 工具 | 功能 |
| 按关键词、分区、分类、优惠、编码和存活状态查询种子,返回 AI 易读的 Markdown |
| 根据数字种子 ID 获取详情和做种状态,返回 AI 易读的 Markdown |
| 生成临时下载令牌并将 |
下载令牌只在进程内部使用,不会返回给模型。M-Team API Key 仅通过环境变量传入。
Related MCP server: Torrent Search MCP Server
API 环境
本项目默认并直接使用 M-Team 正式环境 API:
https://api.m-team.cc/api除非显式覆盖 MTEAM_API_BASE,客户端始终连接正式环境。
Markdown 输出格式
search_torrents 和 get_torrent_detail 都返回 Markdown 文本,而不是直接把原始 API JSON 交给模型。
搜索结果包含:
查询词、模式、当前页、每页数量、总结果和总页数
种子 ID、名称、大小、做种人数、下载人数、优惠和标签
查看详情、下载以及翻到下一页的明确调用提示
详情结果包含:
基本信息:种子 ID、名称、分类、大小、文件数量、发布时间和标签
简介
活跃状态:做种、下载、完成人次、可见状态和禁用状态
优惠状态
IMDb、豆瓣等合法外部链接
download_torrent的调用参数提示
M-Team 返回的标题、简介和标签会进行 Markdown 转义,并标记为外部元数据,避免被误当成系统操作指令。底层客户端仍保留结构化字典,因此不会影响下载和内部处理。
Hermes Agent 配置
需要先安装 uv。将以下内容加入 ~/.hermes/config.yaml:
mcp_servers:
mteam:
command: "uvx"
args:
- "--from"
- "git+https://github.com/TnZzZHlp/mteam-mcp.git"
- "mteam-mcp"
env:
MTEAM_API_KEY: "你的 API Key"
MTEAM_API_BASE: "https://api.m-team.cc/api"
MTEAM_DOWNLOAD_DIR: "~/.hermes/downloads/mteam"
MTEAM_TIMEOUT: "30"
MTEAM_MAX_TORRENT_BYTES: "33554432"
enabled: true
timeout: 120
connect_timeout: 30
supports_parallel_tool_calls: false
tools:
include: [search_torrents, get_torrent_detail, download_torrent]
resources: false
prompts: false修改后执行:
hermes mcp test mteam然后在 Hermes 会话中运行:
/reload-mcpHermes 注册后的工具名为:
mcp_mteam_search_torrents
mcp_mteam_get_torrent_detail
mcp_mteam_download_torrent本地运行
git clone https://github.com/TnZzZHlp/mteam-mcp.git
cd mteam-mcp
uv sync
MTEAM_API_KEY='你的 API Key' uv run mteam-mcp也可以复制环境变量模板:
cp .env.example .env本项目不会自动读取 .env。启动前应由 shell、systemd、容器或 Hermes 的 env 配置注入变量。
环境变量
变量 | 必填 | 默认值 | 说明 |
| 是 | 无 | M-Team API Key |
| 否 |
| 正式环境 API 根地址 |
| 否 |
|
|
| 否 |
| HTTP 超时秒数 |
| 否 |
| 单个种子文件最大字节数 |
查询参数示例
Hermes 可调用:
{
"keyword": "The Dark Knight",
"mode": "normal",
"page_number": 1,
"page_size": 20,
"visible": 1,
"categories": [],
"discount": "FREE"
}visible:
1:活种2:死种null:不筛选
开发和测试
uv sync --extra dev
uv run pytest -q安全说明
不要把真实 API Key 写入仓库、命令历史、日志或聊天内容。
download_torrent不会把临时下载 URL 返回给模型。临时下载请求不会携带
x-api-key,避免重定向到其他域名时泄露密钥。下载采用临时文件后原子替换,并限制最大文件大小。
仅用于你有权访问和下载的内容,并遵守站点规则及当地法律。
License
MIT
Available Tools
3 toolsdownload_torrentA
Download a .torrent file after the user explicitly requests it.
The temporary M-Team token remains internal. The result contains only the local saved path, torrent ID, and number of bytes written.
Inputs: torrent_id (required). Returns: object
get_torrent_detailC
Get one torrent's metadata as compact, AI-readable Markdown.
Inputs: torrent_id (required). Returns: Generic wrapper for non-object return types.
search_torrentsA
Search M-Team torrents and return compact, AI-readable Markdown.
Args:
keyword: Keyword, IMDb URL, or Douban URL. Empty text lists matching items.
mode: M-Team search mode, normally normal or adult.
page_number: One-based result page.
page_size: Number of results, from 1 to 100.
visible: 1 for active torrents, 2 for dead torrents, or null for no filter.
categories: Optional M-Team category IDs.
discount: Optional discount such as FREE, PERCENT_50, or PERCENT_70.
video_codecs: Optional video codec filters.
audio_codecs: Optional audio codec filters.
Inputs: mode, keyword, visible, discount, +5 more. Returns: Generic wrapper for non-object return types.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clear, distinct purpose: searching for torrents, viewing torrent details, and downloading torrent files. There is no overlap or ambiguity.
All three tool names follow a consistent verb_noun pattern (search_torrents, get_torrent_detail, download_torrent) using snake_case, making it predictable and easy to understand.
With 3 tools, the set is minimal but covers the core functionality of a torrent client (search, detail, download). It is at the lower end of the typical range but still appropriate for a focused server.
The tools cover the essential workflow of searching, inspecting, and downloading torrents. Minor gaps like torrent removal or user-specific features are absent, but the core operations are fully covered.
Maintenance
Related MCP Connectors
Remote MCP server for SeenThis AI Hub. Supports browsing, searching, and posting to AI boards.
An MCP server for deep research or task groups
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server for connecting agentic systems to search systems via searXNG.1132MIT
- AlicenseAqualityBmaintenanceA Python MCP server that allows programmatic interaction to find torrents programmatically on ThePirateBay, Nyaa and YggTorrent.7151 PyPI45PythonMIT
- AlicenseAqualityDmaintenanceMCP server for Metaso Search API, providing multi-scope search and webpage reading tools.213 npm2Apache 2.0
- FlicenseNot gradedqualityDmaintenanceMCP server providing web search, news search, and X/Twitter search capabilities via HTTP or stdio.-