Skip to main content
Glama
LokerL

DouYuSearcher MCP Server

by LokerL
README.md
# DouYuSearcher MCP Server

![Python](https://img.shields.io/badge/Python-3.10+-blue.svg)
![License](https://img.shields.io/badge/License-MIT-green.svg)
![Status](https://img.shields.io/badge/Status-Active-brightgreen.svg)

一个轻量级的 MCP 服务器,支持通过斗鱼房间ID或关键词搜索获取斗鱼直播房间信息。

## 功能特性

- **房间信息查询**:通过 `get_room(room_id)` 工具,输入斗鱼房间ID,获取详细房间信息(包括头像、分区、主播、状态、热度等)。
- **关键词搜索房间**:通过 `search_rooms(keyword)` 工具,输入关键词,搜索相关斗鱼房间。
- **Markdown 表格输出**:所有信息均以美观的 Markdown 表格形式返回,支持图片展示。
![image](https://github.com/user-attachments/assets/f95d1a69-00b1-41ae-bf7d-f0012eb30fd4)

## 安装方法

### 前置条件
- Python 3.10+
- `pip`

### 安装步骤
1. 克隆本仓库:
   ```bash
   git clone https://github.com/LokerL/douyu-mcp-py.git
   cd douyu-mcp-py
   ```
2. 安装依赖:
   ```bash
   uv install
   ```

## 使用方法

### 运行和测试
- Windows下直接运行:
  ```bash
  ./inspector.cmd
  ```

### 工具说明

#### 工具:`get_room(room_id)`
根据斗鱼房间ID获取房间详细信息。
- **参数**:`room_id`(整数,斗鱼房间ID)
- **返回**:Markdown 表格,包含头像、房间ID、分区名、房间名、主播名、房间状态、热度、房间封面图、房间链接。
- **示例输出**:
  ```
  | 名称          | 信息             |
  |----------------|-------------------|
  | 头像           | ![Avatar](https://example.com/avatar.jpg) |
  | 房间ID         | 12345   |
  | 分区名         | 英雄联盟 |
  | 房间名         | 斗鱼最强 |
  | 主播名         | 张三 |
  | 房间状态       | 直播中 |
  | 热度           | 123456 |
  | 房间封面图     | ![Room Thumb](https://example.com/thumb.jpg) |
  | 房间链接       | [Link](https://www.douyu.com/71415) |
  ```

#### 工具:`search_rooms(keyword)`
通过关键词搜索斗鱼房间,返回第一个相关房间信息。
- **参数**:`keyword`(字符串,搜索关键词)
- **返回**:Markdown 表格,包含分区名、是否直播、关键词、主播昵称、房间ID。
- **示例输出**:
  ```
  | 名称          | 信息             |
  |----------------|-------------------|
  | 分区名         | 英雄联盟 |
  | 是否直播       | 直播中 |
  | 关键词         | 英雄联盟 |
  | 主播昵称       | 张三 |
  | 房间 ID       | 123456 |
  ```

## 许可证

MIT License. 详见 [LICENSE](LICENSE)。

TDQS

A4/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: get_room retrieves detailed information for a specific room by ID, while search_rooms finds multiple rooms by keyword with summary information. There is no overlap in functionality or ambiguity about when to use each tool.

Naming Consistency5/5

Both tools follow a consistent verb_noun naming pattern (get_room, search_rooms) using snake_case. The naming is predictable and follows the same convention throughout the tool set.

Tool Count2/5

With only 2 tools, this server feels underpowered for a comprehensive DouYu search/seamless experience. While the tools cover basic lookup and search, the domain suggests additional operations like filtering by category, trending rooms, or user profiles would be expected for a complete surface.

Completeness2/5

The tool surface is severely incomplete for a DouYu search domain. There are significant gaps: no ability to browse categories/partitions, get trending/hot rooms, filter search results, or access user/profile information. Agents will hit dead ends when trying to perform common exploration tasks beyond basic ID lookup and keyword search.

Maintenance

ActivityInactive
ResponsivenessNo issues