Skip to main content
Glama
WilliamQAQ0v0

hot-content-mcp

热门内容 MCP 服务器

🔥 为 Claude 和 Cherry Studio 提供多平台热门内容数据的 Model Context Protocol (MCP) 服务器。

支持平台:

  • 🔥 百度热搜榜

  • 📺 B站热门视频

开发日志

后续可能会支持更多平台

Related MCP server: Bilibili API MCP Server

⚡ 快速开始

⚠️ 重要:请先设置环境变量或创建配置文件再运行命令!

第一步:设置环境变量(推荐)

获取 API 凭据:请访问 API盒子 获取您的 API ID 和密钥。

方法1:设置环境变量(最简单)

# Linux/Mac
export HOT_CONTENT_API_ID="your_actual_api_id"
export HOT_CONTENT_API_KEY="your_actual_api_key"

# Windows
set HOT_CONTENT_API_ID=your_actual_api_id
set HOT_CONTENT_API_KEY=your_actual_api_key

使用cherry studio时,在环境变量内配置也可运行

HOT_CONTENT_API_ID=your_actual_api_id
HOT_CONTENT_API_KEY=your_actual_api_key

方法2:创建配置文件(传统方式)

如果不使用环境变量,可以创建 config.json 文件:

{
  "api": {
    "id": "your_actual_api_id", 
    "key": "your_actual_api_key"
  }
}

第二步:运行服务

环境变量或配置文件设置完成后,即可运行:

# 直接运行(无需安装)
npx hot-content-mcp@2.4.0

# 启动SSE模式用于Web应用
npx hot-content-mcp@2.4.0 sse 3000

# 使用自定义配置文件位置
npx hot-content-mcp@2.4.0 --config /path/to/config.json

本地开发

# 确保已设置环境变量或创建 config.json 文件后再运行
npm install && npm run build && npm run start

🎯 功能特性

百度热搜工具

  • get_baidu_hot_search - 获取百度热搜榜数据(支持count参数,默认10条,最大50条)

  • search_baidu_hot_search - 搜索包含特定关键词的百度热搜

  • clear_baidu_cache - 清除百度热搜数据缓存

B站热门视频工具

  • get_bilibili_hot - 获取B站热门视频数据(支持count参数,默认10条,最大50条)

  • search_bilibili_videos - 搜索B站视频(根据标题或UP主名称)

  • clear_bilibili_cache - 清除B站视频数据缓存

MCP 资源

  • baidu://hot-search/current - 当前完整热搜榜数据

  • baidu://hot-search/top5 - TOP5热搜数据

  • bilibili://videos/current - 当前B站热门视频数据

  • bilibili://videos/top5 - TOP5 B站热门视频

📖 配置方式

Cherry Studio

配置文件位置: Cherry Studio 设置 → MCP服务器

方式1:环境变量配置(推荐)

  1. 设置系统环境变量:

    • HOT_CONTENT_API_ID = your_actual_api_id

    • HOT_CONTENT_API_KEY = your_actual_api_key

  2. Cherry Studio MCP配置:

{
  "mcpServers": {
    "hot-content": {
      "command": "npx",
      "args": ["hot-content-mcp@2.4.0"]
    }
  }
}

方式2:配置文件

  1. 首先创建配置文件 config.json

    {
      "api": {
        "id": "your_actual_api_id",
        "key": "your_actual_api_key"
      }
    }
  2. 将配置文件保存到以下任一位置:

    • 用户目录 (推荐): C:\Users\用户名\config.json (Windows) 或 ~/config.json (Mac/Linux)

    • 应用数据目录: %APPDATA%\hot-content-mcp\config.json (Windows) 或 ~/.config/hot-content-mcp/config.json (Mac/Linux)

  3. Cherry Studio MCP配置:

{
  "mcpServers": {
    "hot-content": {
      "command": "npx",
      "args": ["hot-content-mcp@2.4.0"]
    }
  }
}

配置步骤:

  1. 打开 Cherry Studio 设置

  2. 找到 MCP 服务器 选项

  3. 点击 添加服务器

  4. 填写:

    • 名称: hot-content

    • 命令: npx

    • 参数: hot-content-mcp@2.4.0建议指定版本号确保使用最新版

  5. 保存并重启

版本更新说明

  • 如果遇到版本显示不正确,请在配置中指定版本号:hot-content-mcp@2.4.0

  • 或者清除npx缓存:npx clear-npx-cachenpm cache clean --force

高级选项:如需自定义配置文件位置,可以使用:

{
  "mcpServers": {
    "hot-content": {
      "command": "npx", 
      "args": ["hot-content-mcp@2.4.0", "--config", "/path/to/your/config.json"]
    }
  }
}

Claude Desktop

配置文件位置: ~/.claude/claude_desktop_config.json

{
  "mcpServers": {
    "hot-content": {
      "command": "npx",
      "args": ["hot-content-mcp"]
    }
  }
}

🔧 配置说明

从 v2.3.1 开始,支持环境变量配置,无需创建配置文件!

配置优先级

  1. 环境变量(推荐) - 更安全、更方便

  2. 配置文件 - 传统方式

方式1:环境变量配置(推荐)

设置以下环境变量即可直接使用,无需创建配置文件:

# 设置环境变量
export HOT_CONTENT_API_ID="your_actual_api_id"
export HOT_CONTENT_API_KEY="your_actual_api_key"

# 直接运行
npx hot-content-mcp@2.4.0

Windows 用户:

set HOT_CONTENT_API_ID=your_actual_api_id
set HOT_CONTENT_API_KEY=your_actual_api_key
npx hot-content-mcp@2.4.0

方式2:配置文件

如果未设置环境变量,系统会自动查找配置文件:

当前配置格式(推荐)

{
  "api": {
    "id": "your_actual_api_id", 
    "key": "your_actual_api_key"
  }
}

配置文件位置

  • 默认位置: 运行命令的目录下的 config.json

  • 自定义位置: 使用 --config 参数指定路径

⚠️ 配置验证要求

  • ✅ 配置文件必须存在

  • ✅ API ID 和 Key 不能为空或纯空格

  • ✅ 不能使用示例值(如 your_api_idyour_actual_api_id 等)

如果配置不符合要求,服务器将拒绝启动并显示详细的错误信息。

🤖 AI 使用示例

百度热搜分析

请获取当前百度热搜榜前10条内容,并分析热点话题类型。

B站内容趋势

获取B站当前热门视频TOP5,分析内容类型和创作者特征。

综合热点分析

作为内容趋势分析师,请:
1. 获取百度热搜榜TOP5
2. 获取B站热门视频TOP5  
3. 对比分析两个平台的热点内容差异
4. 提供平台特色分析报告

关键词搜索

搜索关键词"游戏"在百度热搜和B站热门视频中的相关内容。

📋 项目结构

hot-content-mcp/
├── src/
│   ├── cli.ts           # CLI入口文件
│   ├── index.ts         # 主入口文件
│   ├── mcp-server.ts    # MCP服务器实现
│   ├── api.ts           # API服务(百度+B站)
│   └── config.ts        # 统一配置管理
├── dist/                # 编译输出
├── mcp-config.json      # MCP配置示例
├── bilibili_api_doc.md  # B站API技术文档
└── package.json         # 项目配置

🔗 相关链接

📄 许可证

MIT License

⚠️ 免责声明

本项目使用第三方 API 服务(API Hub)获取热门内容数据,仅供学习和研究使用。使用本项目时请注意:

  1. API 服务:本项目依赖第三方 API 服务,我们不对其可用性、稳定性或准确性承担责任。

  2. 数据来源:热门内容数据来源于各平台(百度、B站),本项目不对数据内容的真实性、完整性或时效性负责。

  3. 使用风险:用户自行承担使用本项目的风险,包括但不限于数据丢失、服务中断等。

  4. 商业使用:如需商业使用,请自行评估风险并遵守相关法律法规。

  5. API 费用:第三方 API 可能产生费用,请用户自行了解并承担相关成本。

本项目按"现状"提供,不提供任何明示或暗示的保证。

Available Tools

6 tools
clear_baidu_cacheB

清除百度热搜数据缓存

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior1/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It does not mention that clearing the cache is destructive, irreversible, or that it invalidates data for get_baidu_hot_search. The agent cannot infer side effects.

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 a single, concise sentence that immediately conveys the operation. Every word is informative, and there is no wasted text.

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

Completeness2/5

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

Given the simplicity of the tool, the description is minimal but does not explain why or when to clear the cache, nor what impact it has on other tools like get_baidu_hot_search. The lack of annotations and output schema makes this an incomplete context for an agent.

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 tool has zero parameters, so the schema already trivially covers everything. The description adds no parameter details, but none are needed. Baseline of 4 applies for zero-parameter tools.

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 ('清除' - clear) and the resource ('百度热搜数据缓存' - Baidu hot search data cache). It is specific and distinguishes itself from sibling tools like get_baidu_hot_search and clear_bilibili_cache.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool, such as after stale data or before regenerating cache. No alternatives or exclusions are mentioned, leaving the agent without context for choosing between this and related cache clearing tools.

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

clear_bilibili_cacheB

清除B站视频数据缓存

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It only states 'clear cache' without detailing whether data is permanently deleted, whether user settings are affected, whether the action is reversible, or if any confirmation is required. This is a significant gap for a potentially destructive operation.

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 a single concise sentence that directly communicates the tool's purpose without any redundant or filler content. It is perfectly sized for its trivial parameter structure.

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

Completeness2/5

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

Given the absence of annotations and an output schema, the description should compensate by explaining the implications of clearing the cache (e.g., data loss, scope, reversibility). It currently only states the action, which is insufficient for an agent to fully understand the consequences and safe usage of a destructive 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 tool has zero parameters, so the input schema fully documents everything. The description correctly adds no parameter details, and the baseline score of 4 applies since there is nothing additional to explain.

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 (清除 = clear) and the target (B站视频数据缓存 = Bilibili video data cache), distinguishing it from sibling search and hot-list tools as well as the analogous clear_baidu_cache tool.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like clear_baidu_cache, nor any prerequisites, situations where it should be avoided, or expected side effects. The description is purely functional without contextual usage advice.

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

get_bilibili_hotB

获取B站热门视频数据

ParametersJSON Schema
NameRequiredDescriptionDefault
countNo要获取的视频数量,默认为10,最大50
use_cacheNo是否使用缓存数据,默认为true

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations present, the description carries the full burden of behavioral disclosure. It only states 'get hot video data' and does not mention caching behavior, return format, data freshness, or the fact that use_cache defaults to true.

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 a single, front-loaded sentence with no redundant wording. It is concise but very brief, omitting behavioral context that other dimensions capture; still, it is not padded or unclear.

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

Completeness2/5

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

Given no annotations, no output schema, and sibling tools for search and cache clearing, the description is incomplete. It leaves out caching semantics, what the returned data looks like, and how it differs from search_bilibili_videos.

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

Parameters3/5

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

The schema provides 100% description coverage for both parameters: count and use_cache. The tool description adds no parameter-level context beyond what the schema already explains, so the baseline score of 3 is appropriate.

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 uses an explicit verb '获取' (get) and a specific resource 'B站热门视频数据' (Bilibili hot video data). This clearly distinguishes it from sibling tools such as get_baidu_hot_search (different platform) and search_bilibili_videos (search vs. hot rankings).

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. There is no mention that it retrieves a trending/hot list rather than search results, nor any relationship to clear_bilibili_cache or search_bilibili_videos.

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

search_bilibili_videosA

搜索B站视频(根据标题或UP主名称)

ParametersJSON Schema
NameRequiredDescriptionDefault
keywordYes搜索关键词

TDQS

A3.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden for behavioral disclosure. It only states the search function and criteria, but does not mention whether results are read-only, pagination, output format, or any constraints. This leaves significant behavioral ambiguity for an agent.

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 a single short sentence that immediately conveys the tool's purpose and search criteria. There is no filler, redundant information, or unnecessary detail—every word earns its place.

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

Completeness3/5

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

The tool is simple with one parameter and no output schema, but the description does not mention what the response contains (e.g., list of videos, metadata, sorting). Without annotations or an output schema, the lack of return information leaves the agent guessing about the result format, making it adequate but not complete.

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 schema defines 'keyword' only as '搜索关键词' (search keyword). The description adds that the keyword matches title or UP主 name, giving meaningful semantic context beyond the bare parameter description. This helps the agent understand how to construct the keyword value.

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 '搜索B站视频(根据标题或UP主名称)' clearly states the action (search), the resource (Bilibili videos), and the specific scope (by title or UP主 name). This distinguishes it from siblings like get_bilibili_hot, which retrieves hot videos, making the purpose unambiguous.

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 parenthetical '根据标题或UP主名称' provides clear context for when to use this tool—when searching by title or uploader name. However, it does not explicitly mention alternatives or scenarios to avoid, so it lacks the explicit exclusions that would earn a 5.

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.

  1. 6 tool updatesv2.4.0
    • First observedclear_baidu_cache
    • First observedclear_bilibili_cache
    • First observedget_baidu_hot_search
    • First observedget_bilibili_hot
    • First observedsearch_baidu_hot_search
    • First observedsearch_bilibili_videos

TDQS

A3.6/5.0

Scored across 6 tools

Disambiguation5/5

Each tool has a clear, distinct purpose: fetching hot content, searching within it, and clearing cache for each platform (Baidu and Bilibili). No overlap or ambiguity between tools.

Naming Consistency4/5

Tool names follow a consistent verb_platform_object pattern (get/search/clear). Minor inconsistency: Baidu uses 'hot_search' while Bilibili uses 'hot' and 'videos', but this is understandable and does not cause confusion.

Tool Count5/5

Six tools is well-scoped for a hot-content aggregation server covering two platforms. Each tool has a specific purpose and the count feels appropriate, not excessive or thin.

Completeness5/5

The server covers the essential operations for a hot content service: retrieving hot items, searching, and cache management for both Baidu and Bilibili. There are no obvious missing features for the stated purpose.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables interaction with Bilibili (哔哩哔哩) through its API, supporting video search and recommendations, user search, dynamic feeds, video collections, and danmaku retrieval through natural language.
    5
    -
  • A
    license
    B
    quality
    D
    maintenance
    Provides real-time hot trending topics and heat indices from nine major Chinese social media and news platforms including Weibo, Zhihu, and Bilibili. It enables users to fetch markdown-formatted news summaries and clickable links via the get_hot_news tool.
    1
    1,019 npm
    3
    MIT