Skip to main content
Glama
07freedom

M-Team MCP Server

by 07freedom

mcp-server-mteam

中文 | English


中文文档

简介

mcp-server-mteam 是一个基于 FastMCP 框架开发的 MCP(Model Context Protocol)服务器,让 AI 助手(如 Claude、Cursor 等)能够直接调用 M-Team(馒头)私有种子站的 API,实现资源搜索、种子详情获取和种子文件下载功能。

功能列表

工具

说明

search_torrents

按关键词搜索种子资源,支持多种分类模式

get_torrent_detail

根据种子 ID 获取种子详细信息

download_torrent

根据种子 ID 下载 .torrent 文件到本地

安装

前置要求

  • Python 3.10 或以上版本(或安装 uv 由 uv 自动管理)

  • M-Team 账号及 API Key

安装步骤

方式一:使用 uv 零安装运行(推荐)

uvx mcp-server-mteam

首次运行会自动从 PyPI 拉取并执行,无需手动安装。若需持久安装:

uv tool install mcp-server-mteam

方式二:从源码安装

  1. 克隆或下载本项目:

git clone https://github.com/07freedom/mcp-server-mteam.git
cd mcp-server-mteam
  1. 安装依赖(使用 uv):

uv sync

或使用 pip:

pip install -e .
  1. 配置 API Key:

复制 .env_example.env,并填入你的 M-Team API Key:

cp .env_example .env

编辑 .env 文件:

MTEAM_API_KEY="your_mteam_api_key_here"

你可以在 M-Team 网站的个人设置 → API Key 处获取 API Key。

可选环境变量

变量名

默认值

说明

MTEAM_API_KEY

(必填)

M-Team API 鉴权密钥

MTEAM_API_BASE

https://api.m-team.cc/api

API 根地址

MTEAM_DOWNLOAD_DIR

./seed

种子文件保存目录

在 MCP 客户端中使用

Cursor / Claude Desktop 配置

在 MCP 客户端配置文件中添加:

{
  "mcpServers": {
    "mteam": {
      "command": "uvx",
      "args": ["mcp-server-mteam"],
      "env": {
        "MTEAM_API_KEY": "your_mteam_api_key_here"
      }
    }
  }
}

若从源码运行,可将 command 改为 uvargs 设为 ["run", "mcp-server-mteam"],或在项目目录下使用 ["run", "/path/to/mcp-server-mteam/server.py"]。也可不在配置中填写 env,在项目目录创建 .env 文件即可。

通过命令行启动

# 使用 uvx(推荐,零安装)
uvx mcp-server-mteam

# 项目内运行(需先 uv sync)
uv run mcp-server-mteam

# pip 安装后
mcp-server-mteam

从源码运行

uv run python server.py
# 或
uv run mcp-server-mteam

工具文档

search_torrents — 搜索种子

搜索 M-Team 上的种子资源。

输入参数

参数

类型

必填

默认值

说明

keyword

string

搜索关键词,支持中文和英文

mode

string

"normal"

搜索模式,可选值见下表

page_number

integer

1

页码(从 1 开始)

page_size

integer

20

每页结果数(最大 100)

mode 可选值

说明

normal

普通资源

adult

成人资源

movie

电影

music

音乐

tvshow

剧集

waterfall

瀑布流

rss

RSS

rankings

排行榜

all

全部

输出示例

Search results for "黑暗骑士" (mode=normal)
Total: 25  |  Page 1, showing 20 items
------------------------------------------------------------
[1125330] The Dark Knight 2008 IMAX UHD BluRay 2160p DDP 5.1 DV HDR x265-hallowed
  Size: 17.74 GB  Seeders: 17  Leechers: 0
  Labels: 中字, 4k, hdr10, DoVi  Discount: PERCENT_50
  IMDB: 9.1  Douban: 9.2
...

get_torrent_detail — 获取种子详情

根据种子 ID 获取完整的种子信息。

输入参数

参数

类型

必填

说明

torrent_id

string

种子 ID,如 "1125330"

输出示例

Torrent Detail: [1125330]
============================================================
Name       : The Dark Knight 2008 IMAX UHD BluRay 2160p DDP 5.1 DV HDR x265-hallowed
Description: 蝙蝠侠:黑暗骑士崛起|类型: 剧情 / 动作 / 科幻 / 惊悚 / 犯罪
Size       : 17.74 GB  (1 file(s))
Labels     : 中字, 4k, hdr10, DoVi
Discount   : PERCENT_50
Seeders    : 17  Leechers: 0  Completed: 71
Created    : 2026-01-29 15:16:42
Visible    : True  Banned: False
IMDB       : https://www.imdb.com/title/tt0468569/  Rating: 9.1
Douban     : https://movie.douban.com/subject/1851857/  Rating: 9.2

download_torrent — 下载种子文件

根据种子 ID 下载 .torrent 文件。

输入参数

参数

类型

必填

说明

torrent_id

string

种子 ID,如 "1125330"

输出示例

成功时:

Torrent saved to: /home/user/mcp-server-mteam/seed/[M-TEAM]The.Dark.Knight.2008.IMAX.UHD.BluRay.2160p.DDP.5.1.DV.HDR.x265-hallowed.torrent

失败时:

Failed to get download token: {'code': '403', 'message': 'Forbidden'}

注意事项

  • 本工具仅供个人学习和合法使用,请遵守 M-Team 的使用条款。

  • API Key 属于敏感信息,请勿将 .env 文件提交到公开代码仓库。

  • 下载种子功能需要账号有足够的权限。


Related MCP server: yarr-media-stack-mcp

English Documentation

Introduction

M-Team MCP is a FastMCP-based MCP (Model Context Protocol) server that allows AI assistants (Claude, Cursor, etc.) to interact with the M-Team private torrent tracker API — enabling torrent search, detail retrieval, and .torrent file downloads.

Features

Tool

Description

search_torrents

Search torrents by keyword with optional category mode

get_torrent_detail

Get full details for a torrent by its ID

download_torrent

Download a .torrent file to local disk by torrent ID

Installation

Prerequisites

  • Python 3.10 or higher (or install uv for automatic management)

  • An M-Team account with a valid API Key

Steps

Option 1: Run with uv (no install, recommended)

uvx mcp-server-mteam

On first run, uv will fetch from PyPI and execute without manual install. To install persistently:

uv tool install mcp-server-mteam

Option 2: Install from source

  1. Clone or download this project:

git clone https://github.com/07freedom/mcp-server-mteam.git
cd mcp-server-mteam
  1. Install dependencies (with uv):

uv sync

Or with pip:

pip install -e .
  1. Configure your API Key:

Copy .env_example to .env and fill in your M-Team API Key:

cp .env_example .env

Edit .env:

MTEAM_API_KEY="your_mteam_api_key_here"

You can obtain your API Key from M-Team's user settings page under API Key.

Optional Environment Variables

Variable

Default

Description

MTEAM_API_KEY

(required)

M-Team API authentication key

MTEAM_API_BASE

https://api.m-team.cc/api

API base URL

MTEAM_DOWNLOAD_DIR

./seed

Directory to save downloaded torrent files

Integration with MCP Clients

Cursor / Claude Desktop

Add the following to your MCP client config file:

{
  "mcpServers": {
    "mteam": {
      "command": "uvx",
      "args": ["mcp-server-mteam"],
      "env": {
        "MTEAM_API_KEY": "your_mteam_api_key_here"
      }
    }
  }
}

For source install, use "command": "uv" with "args": ["run", "mcp-server-mteam"], or ["run", "/path/to/mcp-server-mteam/server.py"] in the project directory. You can also omit env and use a .env file in the project directory.

Command line

# With uvx (recommended, no install)
uvx mcp-server-mteam

or

# From project (after uv sync)
uv run mcp-server-mteam

or

# After pip install
mcp-server-mteam

From source

uv run python server.py
# or
uv run mcp-server-mteam

Tool Reference

search_torrents — Search Torrents

Search for torrents on M-Team by keyword.

Input Parameters

Parameter

Type

Required

Default

Description

keyword

string

Yes

Search keyword (Chinese or English)

mode

string

No

"normal"

Search mode (see table below)

page_number

integer

No

1

Page number (1-based)

page_size

integer

No

20

Results per page (max 100)

Available mode Values

Value

Description

normal

General resources

adult

Adult content

movie

Movies

music

Music

tvshow

TV shows

waterfall

Waterfall view

rss

RSS

rankings

Rankings

all

All categories

Example Output

Search results for "The Dark Knight" (mode=movie)
Total: 25  |  Page 1, showing 20 items
------------------------------------------------------------
[1125330] The Dark Knight 2008 IMAX UHD BluRay 2160p DDP 5.1 DV HDR x265-hallowed
  Size: 17.74 GB  Seeders: 17  Leechers: 0
  Labels: 中字, 4k, hdr10, DoVi  Discount: PERCENT_50
  IMDB: 9.1  Douban: 9.2
...

get_torrent_detail — Get Torrent Details

Retrieve full information for a specific torrent.

Input Parameters

Parameter

Type

Required

Description

torrent_id

string

Yes

Torrent ID, e.g. "1125330"

Example Output

Torrent Detail: [1125330]
============================================================
Name       : The Dark Knight 2008 IMAX UHD BluRay 2160p DDP 5.1 DV HDR x265-hallowed
Description: 蝙蝠侠:黑暗骑士崛起|类型: 剧情 / 动作 / 科幻 / 惊悚 / 犯罪
Size       : 17.74 GB  (1 file(s))
Labels     : 中字, 4k, hdr10, DoVi
Discount   : PERCENT_50
Seeders    : 17  Leechers: 0  Completed: 71
Created    : 2026-01-29 15:16:42
Visible    : True  Banned: False
IMDB       : https://www.imdb.com/title/tt0468569/  Rating: 9.1
Douban     : https://movie.douban.com/subject/1851857/  Rating: 9.2

download_torrent — Download Torrent File

Download a .torrent file for the given torrent ID.

Input Parameters

Parameter

Type

Required

Description

torrent_id

string

Yes

Torrent ID, e.g. "1125330"

Example Output

On success:

Torrent saved to: /home/user/mcp-server-mteam/seed/[M-TEAM]The.Dark.Knight.2008.IMAX.UHD.BluRay.2160p.DDP.5.1.DV.HDR.x265-hallowed.torrent

On failure:

Failed to get download token: {'code': '403', 'message': 'Forbidden'}

License & Disclaimer

  • This project is for personal and lawful use only. Please comply with M-Team's Terms of Service.

  • Your API Key is sensitive — never commit your .env file to a public repository.

  • Torrent downloads require sufficient account privileges on M-Team.

Available Tools

3 tools
download_torrentA

Download a .torrent file for the given torrent ID.

This tool first obtains a temporary download token from the M-Team API, then downloads the .torrent file and saves it to the configured download directory (default: ./seed/).

Args: torrent_id: The numeric torrent ID (e.g. "1125330").

Returns: The absolute path to the saved .torrent file on success, or an error message on failure.

ParametersJSON Schema
NameRequiredDescriptionDefault
torrent_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description reveals internal steps (token acquisition, file save) and return value (path or error). It does not mention permissions or side effects, but for a download tool, this is adequate. No annotations are present, so description carries the full burden.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with a clear header and structured details (Args, Returns). It is front-loaded with the main action. Slightly verbose in explaining process, but overall efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given one parameter, no annotations, and an existing output schema, the description covers the tool's purpose, process, parameter, and return value. It could include more on error handling, but it is sufficiently complete for this simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter 'torrent_id' has no schema description, but the description adds meaning by specifying it is numeric and giving an example ('1125330'). This compensates for the 0% schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action 'Download a .torrent file for the given torrent ID,' which is a specific verb and resource. It distinguishes from siblings 'get_torrent_detail' and 'search_torrents' as these serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description outlines the process (obtain token, download, save to directory) and implies use for downloading torrent files. It does not explicitly state when not to use or alternatives, but the context is clear enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_torrent_detailA

Get detailed information for a specific torrent by its ID.

Args: torrent_id: The numeric torrent ID (e.g. "1125330").

Returns: A formatted string with full torrent details including name, size, description, ratings, file count, seeder/leecher counts, etc.

ParametersJSON Schema
NameRequiredDescriptionDefault
torrent_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations, so description carries burden. Lists return fields (name, size, etc.) indicating read-only behavior, but doesn't disclose error handling, permissions, or rate limits. Adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise, front-loaded purpose, clear Args/Returns structure. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Complete for a simple one-param read tool with no annotations: covers purpose, parameter, return. Lacks error info but acceptable for given complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but description adds full meaning: param is numeric ID, with example and explanation. Alone it fully documents the parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it retrieves detailed info for a specific torrent by ID, with a specific verb and resource. Distinguishes from siblings (search_torrents, download_torrent) by focusing on detail retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies use when you have a torrent ID via 'by its ID' and example, but no explicit when-not or alternatives. Context is clear but lacks exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_torrentsA

Search torrents on M-Team by keyword.

Args: keyword: Search keyword (supports Chinese / English). mode: Search mode. One of: normal, adult, movie, music, tvshow, waterfall, rss, rankings, all. Defaults to "normal". page_number: Page number (1-based). Defaults to 1. page_size: Number of results per page (max 100). Defaults to 20.

Returns: A formatted string listing matching torrents with their IDs, names, sizes, seeder/leecher counts, labels, ratings, and discount info.

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNonormal
keywordYes
page_sizeNo
page_numberNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full burden. It describes parameters, return format, and the search action, which is inherently read-only. However, it does not explicitly state that it is non-destructive, nor does it mention any potential side effects, auth requirements, or rate limits. The transparency is adequate but not exceptional.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured with a one-line summary followed by clear Args and Returns sections. Every sentence adds value; there is no redundant or missing information. It is appropriately sized and front-loaded with the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 4 parameters, no annotations, but an output schema, the description covers all necessary aspects: the search context (M-Team), parameter details, and return format (listing IDs, names, sizes, etc.). It is complete enough for an agent to use correctly, and the output schema is leveraged by describing the return value.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, but the description fully compensates by explaining each parameter: keyword supports Chinese/English, mode lists all allowed values (including default), page_number and page_size have defaults and max for page_size. This adds significant meaning beyond the raw schema types and defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Search torrents on M-Team by keyword', specifying the verb (search), resource (torrents on M-Team), and key parameter (keyword). It distinguishes itself from sibling tools like download_torrent (download) and get_torrent_detail (get detail of a single torrent), making it unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives. It implies usage through the name and siblings, but lacks explicit guidance like 'Use for searching; use download_torrent for downloading'. The usage context is inferred, not stated.

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.

  1. 3 tool updatesv0.1.0
    • Removeddownload_torrent
    • Removedget_torrent_detail
    • Removedsearch_torrents
  2. 3 tool updatesv0.1.1
    • First observeddownload_torrent
    • First observedget_torrent_detail
    • First observedsearch_torrents

TDQS

A4.2/5.0
Disambiguation5/5

Each tool serves a unique purpose: search finds torrents, detail retrieves information, and download fetches the torrent file. No overlap or ambiguity exists.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern (download_torrent, get_torrent_detail, search_torrents), making it predictable for agents.

Tool Count4/5

With 3 tools, the set is small but covers essential torrent operations (search, detail, download). Slightly under for full lifecycle but reasonable for a basic client.

Completeness3/5

The tools cover searching, viewing details, and downloading torrents, but miss uploads, deletions, or seed management. Notable gaps exist for a complete torrent management server.

Maintenance

ActivityInactive
ResponsivenessNo issues

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

Related MCP Servers

Latest Blog Posts

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/07freedom/mcp-server-mteam'

If you have feedback or need assistance with the MCP directory API, please join our Discord server